Re: Minimal logical decoding on standbys

2019-06-09 Thread Amit Khandekar
On Tue, 4 Jun 2019 at 21:28, Andres Freund wrote: > > Hi, > > On 2019-06-04 15:51:01 +0530, Amit Khandekar wrote: > > After giving more thought on this, I think it might make sense to > > arrange for the xl_running_xact record to be sent from master to the > > standby, when a logical slot is to

Fix testing on msys when builddir is under /c mount point

2019-06-09 Thread Noah Misch
Several TAP test suites have a need to translate from an msys path to a Windows path. They currently use two ways to do that: 1. TestLib::real_dir, new in v11, is sound but works for directories only. 2. The $vfs_path approach is semi-private to PostgresNode.pm and 017_shm.pl, and it does not

pg_upgrade: prep_status doesn't translate messages

2019-06-09 Thread Kyotaro Horiguchi
Hello. In pg_upgrade, prep statuts is shown in English even if LANG is set to other languages. $ LANG=ja_JP.UTF8 pg_upgrade ... <"Performing Consistency Checks on Old Live Server" in Japanese> -- Checking cluster versions

Re: [PATCH] Fix potential memoryleak in guc.c

2019-06-09 Thread Tom Lane
"Zhang, Jie" writes: > In src\backend\utils\misc\guc.c, I found a potential memory leak. > make_absolute_path() return a malloc'd copy, we should free memory before the > function return false. If SelectConfigFiles were executed more than once per postmaster launch, this might be worth adding

doc: clarify "pg_signal_backend" default role

2019-06-09 Thread Ian Barwick
Hi Currently the documentation for the default role "pg_signal_backend" states, somewhat ambiguously, "Send signals to other backends (eg: cancel query, terminate)", giving the impression other signals (e.g. SIGHUP) can be sent too, which is currently not the case. Attached patch clarifies

[PATCH] Fix potential memoryleak in guc.c

2019-06-09 Thread Zhang, Jie
Hi all In src\backend\utils\misc\guc.c, I found a potential memory leak. make_absolute_path() return a malloc'd copy, we should free memory before the function return false. SelectConfigFiles(const char *userDoption,

[PATCH] memory leak in ecpglib

2019-06-09 Thread Zhang, Jie
Hi all Memory leaks occur when the ecpg_update_declare_statement() is called the second time. FILE:postgresql\src\interfaces\ecpg\ecpglib\prepare.c void ecpg_update_declare_statement(const char *declared_name, const char *cursor_name, const int lineno) { struct declared_statement *p =

Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-06-09 Thread Tom Lane
Andres Freund writes: > On June 9, 2019 8:36:37 AM PDT, Tom Lane wrote: >> I think you are mistaken that doing transactional updates in pg_index >> is OK. If memory serves, we rely on xmin of the pg_index row for >> purposes such as detecting whether a concurrently-created index is safe >> to

Re: Custom table AMs need to include heapam.h because of BulkInsertState

2019-06-09 Thread David Rowley
On Sat, 8 Jun 2019 at 04:51, Andres Freund wrote: > > On 2019-06-07 09:48:29 -0400, Robert Haas wrote: > > However, it looks to me as though copy.c can create a bunch of > > BulkInsertStates but only call finish_bulk_insert() once, so unless > > that's a bug in need of fixing I don't quite see

Re: Temp table handling after anti-wraparound shutdown (Was: BUG #15840)

2019-06-09 Thread Andres Freund
Hi, (on postgres lists, please do not top-quote). On 2019-06-08 04:06:39 -0500, Thierry Husson wrote: > In fact, I suppose all temporary tables and their content could be > completly ignored by MVCC principles as they are not subject to > concurrency being unmodifiable/unreadable by other

GiST limits on contrib/cube with dimension > 100?

2019-06-09 Thread Siarhei Siniak
I've been using cube extension recompiled with #define MAX_DIM 256. But with a version 11.3 I'm getting the following error:failed to add item to index page in There's a regression unit test in contrib/cube/expected/cube.out: CREATE TABLE test_cube (c cube); \copy test_cube from

Re: Bloom Indexes - bit array length and the total number of bits (or hash functions ?? ) !

2019-06-09 Thread Avinash Kumar
Thanks Fabien, But the 2 direct questions i have are : 1. What is the structure of the Bloom Index ? Can you please let me know what are the fields of a Bloom Index ? Is it just the Item Pointer and BloomSignatureWord ? When i describe my bloom index it looks like following. postgres=# \d+

Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-06-09 Thread Andres Freund
Hi, On June 9, 2019 8:36:37 AM PDT, Tom Lane wrote: >"Goel, Dhruv" writes: >I think you are mistaken that doing transactional updates in pg_index >is OK. If memory serves, we rely on xmin of the pg_index row for >purposes >such as detecting whether a concurrently-created index is safe to use

Re: Avoiding deadlock errors in CREATE INDEX CONCURRENTLY

2019-06-09 Thread Tom Lane
"Goel, Dhruv" writes: > Yes, you are correct. The test case here was that if a tuple is inserted > after the reference snapshot is taken in Phase 2 and before the index is > marked ready. If this tuple is deleted before the reference snapshot of Phase > 3, it will never make it to the index. I

Re: Use of reloptions by EXTENSIONs

2019-06-09 Thread Tom Lane
Dent John writes: > I guess my question is, and I correctly understanding that reloptions are > basically off-limits to EXTENSIONS? IIRC that's basically true. There's a lot of dissatisfaction with the current implementation of reloptions, although I think that it's been mainly focused on the

Re: Why does pg_checksums -r not have a long option?

2019-06-09 Thread Tomas Vondra
On Thu, Jun 06, 2019 at 06:01:21PM +0900, Michael Paquier wrote: On Wed, Jun 05, 2019 at 10:31:54PM +0200, Peter Eisentraut wrote: I think -r/--relfilenode was actually a good suggestion. Because it doesn't actually check a *file* but potentially several files (forks, segments). The -f naming

Re: Binary support for pgoutput plugin

2019-06-09 Thread Tomas Vondra
On Sat, Jun 08, 2019 at 08:40:43PM -0400, Dave Cramer wrote: On Sat, 8 Jun 2019 at 20:09, Andres Freund wrote: Hi, On 2019-06-08 19:41:34 -0400, Dave Cramer wrote: > So the reason we are discussing using pgoutput plugin is because it is part > of core and guaranteed to be in cloud providers