Re: [HACKERS] CLUSTER command progress monitor

2019-09-14 Thread Tattsu Yama
Hi Michael! > Attached file is WIP patch.In my patch, I added "command id" to all APIs > of > > progress reporting to isolate commands. Therefore, it doesn't allow to > > cascade updating system views. And my patch is on WIP so it needs > clean-up > > and test. > > I share it anyway. :) > > +

Re: pg_rewind docs correction

2019-09-14 Thread James Coleman
On Sat, Sep 14, 2019 at 12:20 AM Michael Paquier wrote: > > On Fri, Sep 13, 2019 at 01:47:03PM -0400, James Coleman wrote: > > So I've attached a patch to summarize more correctly as well as > > document clearly the state of the cluster after the operation and also > > the operation sequencing

Re: Rethinking opclass member checks and dependency strength

2019-09-14 Thread Tom Lane
Alexander Korotkov writes: > On Sun, Aug 18, 2019 at 10:00 PM Tom Lane wrote: >> * Are the specific ways that the entries are getting set up appropriate? >> Note in particular that I left btree/hash alone, feeling that the default >> (historical) behavior was designed for them and is not

Re: Extending range type operators to cope with elements

2019-09-14 Thread Corey Huinker
> > > >- @> contains range/element > >- <@ element/range is contained by > I'm not a heavy user or range types, so I can't really judge how useful > that is in practice, but it seems like a fairly natural extension of the > existing operators. I mean, if I understand it correctly, the proposed >

Re: Standby Replication and Replication Delay

2019-09-14 Thread Thomas Rosenstein
On 14 Sep 2019, at 22:08, Tomas Vondra wrote: On Sat, Sep 14, 2019 at 09:26:26PM +0200, Thomas Rosenstein wrote: Hi Tomas, I'm using Postgresql 10.10 on the standbys and 10.5 on the primary. On 14 Sep 2019, at 21:16, Tomas Vondra wrote: On Sat, Sep 14, 2019 at 06:03:34PM +0200, Thomas

Re: Extending range type operators to cope with elements

2019-09-14 Thread Tomas Vondra
On Fri, Sep 13, 2019 at 08:50:18AM +0200, Esteban Zimanyi wrote: Dear all While developing MobilityDB we needed to extend the range type operators so they cope with elements. In the same way that currently the range types support both - @> contains range/element - <@ element/range is contained

Re: Create collation reporting the ICU locale display name

2019-09-14 Thread Peter Geoghegan
On Sat, Sep 14, 2019 at 8:13 AM Tom Lane wrote: > The advantage of describe_collation(oid) is that we would not be > building knowledge into the callers about which columns of pg_collation > matter for this purpose. I'm not even convinced that the two you posit > here are sufficient --- the

Re: Standby Replication and Replication Delay

2019-09-14 Thread Thomas Rosenstein
Hi Tomas, I'm using Postgresql 10.10 on the standbys and 10.5 on the primary. On 14 Sep 2019, at 21:16, Tomas Vondra wrote: On Sat, Sep 14, 2019 at 06:03:34PM +0200, Thomas Rosenstein wrote: Hi, so I got two questions: 1) I have multiple Postgresql Standby servers replicating over WAN,

Re: Standby Replication and Replication Delay

2019-09-14 Thread Tomas Vondra
On Sat, Sep 14, 2019 at 09:26:26PM +0200, Thomas Rosenstein wrote: Hi Tomas, I'm using Postgresql 10.10 on the standbys and 10.5 on the primary. On 14 Sep 2019, at 21:16, Tomas Vondra wrote: On Sat, Sep 14, 2019 at 06:03:34PM +0200, Thomas Rosenstein wrote: Hi, so I got two questions: 1)

Re: Standby Replication and Replication Delay

2019-09-14 Thread Tomas Vondra
On Sat, Sep 14, 2019 at 06:03:34PM +0200, Thomas Rosenstein wrote: Hi, so I got two questions: 1) I have multiple Postgresql Standby servers replicating over WAN, and I would like to reduce that to a single connection. Presumably the standbys are all located on the same LAN / in the same

Re: Primary keepalive message not appearing in Logical Streaming Replication

2019-09-14 Thread Virendra Negi
I forgot to mention the plugin I have been using along with logical replication its wal2json. On Friday, September 13, 2019, Virendra Negi wrote: > Implemented the Logical Streaming Replication thing are working fine I see > the XLogData message appearing and I'm able to parse them. > > But I

Standby Replication and Replication Delay

2019-09-14 Thread Thomas Rosenstein
Hi, so I got two questions: 1) I have multiple Postgresql Standby servers replicating over WAN, and I would like to reduce that to a single connection. Is there a utility that can be put in between and store the wal files from the primary and provide it to the standby server, even if they are

Re: Add "password_protocol" connection parameter to libpq

2019-09-14 Thread Jeff Davis
On Fri, 2019-09-06 at 16:05 +0900, Michael Paquier wrote: > Nit here: "scram-sha-256" refers to the HBA entry. I would > just use "SCRAM" instead. Done. > In pg_SASL_init(), if the server sends SCRAM-SHA-256-PLUS as SASL > mechanism over a non-SSL connection, should we complain even if > the

Re: logical decoding : exceeded maxAllocatedDescs for .spill files

2019-09-14 Thread Amit Khandekar
On Fri, 13 Sep 2019 at 22:01, Robert Haas wrote: > On Fri, Sep 13, 2019 at 12:14 PM Tom Lane wrote: > > Again, though, the advice that's been given here is that we should > > fix logical decoding to use the VFD API as it stands, not change > > that API. I concur with that. > > A reasonable

Re: Create collation reporting the ICU locale display name

2019-09-14 Thread Tom Lane
"Daniel Verite" writes: > Tom Lane wrote: >> I think that's a useful function, but it's a different function from >> the one first proposed, which was to tell you the properties of a >> collation you already installed (which might not be ICU, even). >> Perhaps we should have both. > The

Re: [PATCH] Improve performance of NOTIFY over many databases (v2)

2019-09-14 Thread Tom Lane
Martijn van Oosterhout writes: > On Fri, 13 Sep 2019 at 22:04, Tom Lane wrote: >> But, really ... do we need the backendTryAdvanceTail flag at all? > There are multiple issues here. asyncQueueReadAllNotifications() is > going to be called by each listener simultaneously, so each listener > is

Re: Create collation reporting the ICU locale display name

2019-09-14 Thread Daniel Verite
Tom Lane wrote: > > This output tend to reveal mistakes with tags, which is why I thought > > to expose it as a NOTICE. It addresses the case of a user > > who wouldn't suspect an error, so the "in-your-face" effect is > > intentional. With the function approach, the user must be > >

Re: [PATCH] Improve performance of NOTIFY over many databases (v2)

2019-09-14 Thread Martijn van Oosterhout
Hoi Tom, On Fri, 13 Sep 2019 at 22:04, Tom Lane wrote: > > This throws multiple compiler warnings for me: Fixed. > Also, I don't exactly believe this bit: [snip] > It seems unlikely that insertion would stop exactly at a page boundary, > but that seems to be what this is looking for. This is

Re: Create collation reporting the ICU locale display name

2019-09-14 Thread Daniel Verite
Tom Lane wrote: > I think that's a useful function, but it's a different function from > the one first proposed, which was to tell you the properties of a > collation you already installed (which might not be ICU, even). > Perhaps we should have both. The pre-create use case would look

Re: pgbench - allow to create partitioned tables

2019-09-14 Thread Fabien COELHO
Hello Amit, I'm ensuring that there is always a one line answer, whether it is partitioned or not. Maybe the count(*) should be count(something in p) to get 0 instead of 1 on non partitioned tables, though, but this is hidden in the display anyway. Sure, but I feel the code will be

Re: range test for hash index?

2019-09-14 Thread Amit Kapila
On Sat, Sep 14, 2019 at 12:48 AM Paul A Jungwirth wrote: > > Hello, > > I noticed the tests for range types do this: > > create table numrange_test2(nr numrange); > create index numrange_test2_hash_idx on numrange_test2 (nr); > > Does that need a `using hash`? It seems like that's the intention.

Re: pgbench - allow to create partitioned tables

2019-09-14 Thread Amit Kapila
On Fri, Sep 13, 2019 at 11:06 PM Fabien COELHO wrote: > > Hello Amit, > > >>> + res = PQexec(con, > >>> + "select p.partstrat, count(*) " > >>> + "from pg_catalog.pg_class as c " > >>> + "left join pg_catalog.pg_partitioned_table as p on (p.partrelid = > >>> c.oid) " > >>> + "left join

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2019-09-14 Thread Michael Paquier
On Sat, Sep 14, 2019 at 03:03:57PM +0900, Michael Paquier wrote: > On Sat, Sep 14, 2019 at 11:18:37AM +0530, Amit Kapila wrote: >> Won't 'Lateral' clause be helpful here as the patch contains it in one >> of its tests? > > Ah true, I forgot that. If we are redesigning the interface, here are two

Re: refactoring - share str2*int64 functions

2019-09-14 Thread Fabien COELHO
Bonjour Michaël, - Switching INT to use pg_strtoint32() causes a set of warnings as for example with AttrNumber: 72 | (void) pg_strtoint32(token, _node->fldname) | ^ | | |

Re: Psql patch to show access methods info

2019-09-14 Thread Alexander Korotkov
On Sat, Sep 14, 2019 at 10:39 AM Alexander Korotkov wrote: > On Sat, Sep 14, 2019 at 12:36 AM Alvaro Herrera > wrote: > > On 2019-Aug-06, Alexander Korotkov wrote: > > > > > Revised patch is attached. Changes to \dA+ command are reverted. It > > > also contains some minor improvements. > > > >

Re: Psql patch to show access methods info

2019-09-14 Thread Alexander Korotkov
On Sat, Sep 14, 2019 at 12:36 AM Alvaro Herrera wrote: > On 2019-Aug-06, Alexander Korotkov wrote: > > > Revised patch is attached. Changes to \dA+ command are reverted. It > > also contains some minor improvements. > > > > Second patch looks problematic for me, because it provides index > >

Re: Close stdout and stderr in syslogger

2019-09-14 Thread Святослав Ермилин
Hi Tom, Thank you for quick reply. > I'm quite certain that the current behavior is intentional, if only > because closing the syslogger's stderr would make it impossible to > debug problems inside the syslogger. Developer who debugs syslogger, probably, can remove fclose() calls. Maybe we can

Re: [HACKERS] [PATCH] pageinspect function to decode infomasks

2019-09-14 Thread Michael Paquier
On Sat, Sep 14, 2019 at 11:18:37AM +0530, Amit Kapila wrote: > Won't 'Lateral' clause be helpful here as the patch contains it in one > of its tests? Ah true, I forgot that. -- Michael signature.asc Description: PGP signature

Re: refactoring - share str2*int64 functions

2019-09-14 Thread Michael Paquier
On Fri, Sep 13, 2019 at 06:38:31PM -0700, Andres Freund wrote: > On 2019-09-10 12:05:25 +0900, Michael Paquier wrote: >> On Mon, Sep 09, 2019 at 05:27:04AM -0700, Andres Freund wrote: >> Attached is an updated patch? How does it look? I have left the >> parts of readfuncs.c for now as there are