Re: Diagnostic comment in LogicalIncreaseXminForSlot

2021-05-20 Thread Amit Kapila
On Thu, May 20, 2021 at 5:43 PM Ashutosh Bapat wrote: > > Hi > LogicalIncreaseRestartDecodingForSlot() has a debug log to report a > new restart_lsn. But the corresponding function for catalog_xmin. > Here's a patch to add the same. > I think this can be useful. One minor comment: + elog(DEBUG1,

Re: Fdw batch insert error out when set batch_size > 65535

2021-05-20 Thread Bharath Rupireddy
On Fri, May 21, 2021 at 8:18 AM houzj.f...@fujitsu.com wrote: > > Hi, > > When reading the code, I noticed some possible issue about fdw batch insert. > When I set batch_size > 65535 and insert more than 65535 rows into foreign > table, > It will throw an error: > > For example: > >

Re: parallel vacuum - few questions on docs, comments and code

2021-05-20 Thread Amit Kapila
On Fri, May 14, 2021 at 6:00 PM Bharath Rupireddy wrote: > > On Fri, May 14, 2021 at 10:43 AM Dilip Kumar wrote: > > > > > > Your changes look good. About changing the "non-negative integer" to > > "greater than or equal to zero", there is another thread [1], I am not > > sure that have we

Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS

2021-05-20 Thread Amit Kapila
On Fri, May 21, 2021 at 6:29 AM Michael Paquier wrote: > > On Thu, May 20, 2021 at 02:57:40PM -0400, Tom Lane wrote: > > Here's a version that does it like that. I'm not entirely convinced > > whether this is better or not. > > Hmm. I think that this is better. This makes the code easier to >

Re: Re[3]: On login trigger: take three

2021-05-20 Thread Greg Nancarrow
On Thu, May 20, 2021 at 2:45 PM Ivan Panchenko wrote: > > I have upgraded the patch for the 14th version. > I have some feedback on the patch: (1) The patch adds 3 whitespace errors ("git apply " reports 3 warnings) (2) doc/src/sgml/catalogs.sgml CURRENTLY: This flag is used to avoid extra

Re: Transactions involving multiple postgres foreign servers, take 2

2021-05-20 Thread Masahiko Sawada
On Fri, May 21, 2021 at 12:45 PM Masahiro Ikeda wrote: > > > > On 2021/05/21 10:39, Masahiko Sawada wrote: > > On Thu, May 20, 2021 at 1:26 PM Masahiro Ikeda > > wrote: > >> > >> > >> On 2021/05/11 13:37, Masahiko Sawada wrote: > >>> I've attached the updated patches that incorporated comments

Re: Addition of authenticated ID to pg_stat_activity

2021-05-20 Thread Michael Paquier
On Tue, May 18, 2021 at 11:20:49AM +0900, Michael Paquier wrote: > So that would mean the addition of one new catalog view, called > pg_stat_connection, with the following fields: > - PID > - all three client_* > - authn ID > I can live with this split. Thoughts from others? Just to make the

Re: Multi-Column List Partitioning

2021-05-20 Thread Amit Langote
Hello Nitin, On Thu, May 6, 2021 at 11:03 PM Nitin Jadhav wrote: > > Hi, > > While reviewing one of the 'Table partitioning' related patches, I found that > Postgres does not support multiple column based LIST partitioning. Based on > this understanding, I have started working on this feature.

Re: Transactions involving multiple postgres foreign servers, take 2

2021-05-20 Thread Masahiro Ikeda
On 2021/05/21 10:39, Masahiko Sawada wrote: > On Thu, May 20, 2021 at 1:26 PM Masahiro Ikeda > wrote: >> >> >> On 2021/05/11 13:37, Masahiko Sawada wrote: >>> I've attached the updated patches that incorporated comments from >>> Zhihong and Ikeda-san. >> >> Thanks for updating the patches! >>

Re: "Multiple table synchronizations are processed serially" still happens

2021-05-20 Thread Amit Kapila
On Fri, May 21, 2021 at 1:30 AM Guillaume Lelarge wrote: > > >> If so, the >> problem might be that copying the data of the first table creates a >> transaction which blocks creation of the slot for second table copy. > > > I don't understand how a transaction could block the creation of a slot.

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Amit Kapila
On Thu, May 20, 2021 at 5:55 PM Andrew Dunstan wrote: > > On 5/20/21 7:15 AM, Michael Paquier wrote: > > On Thu, May 20, 2021 at 07:05:05AM -0400, Andrew Dunstan wrote: > >> Your version of perl is apparently too old for this. Looks like that > >> needs to be 5.22 or later:

Re: Commitfest app vs. pgsql-docs

2021-05-20 Thread Julien Rouhaud
On Thu, May 20, 2021 at 8:39 AM Michael Paquier wrote: > > On Wed, May 19, 2021 at 03:35:00PM -0400, Tom Lane wrote: > > Magnus Hagander writes: > >> Changing that to look globally can certainly be done. It takes a bit > >> of work I think, as there are no API endpoints today that will do > >>

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Tom Lane
Andrew Dunstan writes: > On 5/20/21 9:49 PM, Michael Paquier wrote: >> Are older versions of the perl MSI that activestate provides hard to >> come by? FWIW, I would not mind if this README and the docs are >> updated to mention that on Windows we require a newer version for this >> set of MSIs.

Fdw batch insert error out when set batch_size > 65535

2021-05-20 Thread houzj.f...@fujitsu.com
Hi, When reading the code, I noticed some possible issue about fdw batch insert. When I set batch_size > 65535 and insert more than 65535 rows into foreign table, It will throw an error: For example: -- CREATE FOREIGN TABLE vzdalena_tabulka2(a int, b varchar)   SERVER omega_db

Re: Race condition in recovery?

2021-05-20 Thread Kyotaro Horiguchi
At Thu, 20 May 2021 13:49:10 -0400, Robert Haas wrote in > On Tue, May 18, 2021 at 1:33 AM Dilip Kumar wrote: > > Yeah, it will be a fake 1-element list. But just to be clear that > > 1-element can only be "ControlFile->checkPointCopy.ThisTimeLineID" and > > nothing else, do you agree to

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Andrew Dunstan
On 5/20/21 9:49 PM, Michael Paquier wrote: > On Thu, May 20, 2021 at 08:25:45AM -0400, Andrew Dunstan wrote: >> 5.8 is ancient. Yes I know it's what's in the Msys1 DTK, but the DTK >> perl seems happy with the list form of pipe open - it's only native >> windows perl's that aren't. > Respect to

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 08:25:45AM -0400, Andrew Dunstan wrote: > 5.8 is ancient. Yes I know it's what's in the Msys1 DTK, but the DTK > perl seems happy with the list form of pipe open - it's only native > windows perl's that aren't. Respect to the Msys1 DTK for that. > Maybe it's time to

Re: Force disable of SSL renegociation in the server

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 02:15:52PM +0200, Daniel Gustafsson wrote: > On 20 May 2021, at 13:00, Michael Paquier wrote: >> - SSL_OP_NO_RENEGOTIATION controls that. It is present in OpenSSL >= >> 1.1.1 and has been backported in 1.1.0h (it is not present in older >> versions of 1.1.0). > > For

Re: Transactions involving multiple postgres foreign servers, take 2

2021-05-20 Thread Masahiko Sawada
On Thu, May 20, 2021 at 1:26 PM Masahiro Ikeda wrote: > > > On 2021/05/11 13:37, Masahiko Sawada wrote: > > I've attached the updated patches that incorporated comments from > > Zhihong and Ikeda-san. > > Thanks for updating the patches! > > > I have other comments including trivial things. > > >

Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 02:57:40PM -0400, Tom Lane wrote: > Here's a version that does it like that. I'm not entirely convinced > whether this is better or not. Hmm. I think that this is better. This makes the code easier to follow, and the extra information is useful for debugging. The

Re: Alias collision in `refresh materialized view concurrently`

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 09:14:45PM +0530, Bharath Rupireddy wrote: > On Thu, May 20, 2021 at 7:52 PM Bernd Helmle wrote: >> "mv" looks like a very common alias (i use it all over the time when >> testing or playing around with materialized views, so i'm wondering why >> i didn't see this issue

Re: Installation of regress.so?

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 09:30:37AM -0400, Tom Lane wrote: > I'd be okay with it being some sort of non-default option. Okay. It would be possible to control that with an environment variable. However I am wondering if it would not be more user-friendly for automated environments if we had a

Re: PG 14 release notes, first draft

2021-05-20 Thread Bruce Momjian
On Thu, May 20, 2021 at 04:19:50PM -0700, Peter Geoghegan wrote: > On Thu, May 20, 2021 at 2:37 PM Bruce Momjian wrote: > > I went with this text: > > > > Reduce the default value of > linkend="guc-vacuum-cost-page-miss"> from 10 milliseconds > > to 2 > > (Peter

Re: array_cat anycompatible change is breaking xversion upgrade tests

2021-05-20 Thread Tom Lane
Justin Pryzby writes: > On Wed, Nov 04, 2020 at 07:43:51PM -0500, Tom Lane wrote: >> As was discussed in the thread leading up to that commit, modifying the >> signature of array_cat and friends could break user-defined operators >> and aggregates based on those functions. It seems to me that

Re: array_cat anycompatible change is breaking xversion upgrade tests

2021-05-20 Thread Justin Pryzby
On Wed, Nov 04, 2020 at 07:43:51PM -0500, Tom Lane wrote: > crake is showing xversion upgrade failures since 9e38c2bb50: > > pg_restore: error: could not execute query: ERROR: function > array_cat(anyarray, anyarray) does not exist > Command was: CREATE AGGREGATE

Re: PG 14 release notes, first draft

2021-05-20 Thread Peter Geoghegan
On Thu, May 20, 2021 at 2:37 PM Bruce Momjian wrote: > I went with this text: > > Reduce the default value of linkend="guc-vacuum-cost-page-miss"> from 10 milliseconds > to 2 > (Peter Geoghegan) > > I think with numbers, and the fact we are saying "decrease" havint them

Re: PG 14 release notes, first draft

2021-05-20 Thread Bruce Momjian
On Thu, May 20, 2021 at 04:35:07PM -0400, Álvaro Herrera wrote: > On 2021-May-20, Bruce Momjian wrote: > > > On Thu, May 20, 2021 at 02:55:18PM -0500, Justin Pryzby wrote: > > > On Thu, May 20, 2021 at 03:44:46PM -0400, Bruce Momjian wrote: > > > > > | Reduce the default value of

Re: Postgres perl module namespace

2021-05-20 Thread Tom Lane
Andrew Dunstan writes: > While solving a problem with the Beta RPMs, I noticed that they export > our perl test modules as capabilities like this: > [andrew@f34 x86_64]$ rpm -q --provides -p > postgresql14-devel-14-beta1_PGDG.fc34.x86_64.rpm | grep ^perl > perl(PostgresNode) >

Re: PG 14 release notes, first draft

2021-05-20 Thread Alvaro Herrera
On 2021-May-20, Bruce Momjian wrote: > On Thu, May 20, 2021 at 02:55:18PM -0500, Justin Pryzby wrote: > > On Thu, May 20, 2021 at 03:44:46PM -0400, Bruce Momjian wrote: > > > > | Reduce the default value of vacuum_cost_page_miss (Peter Geoghegan) > > > > | This new default better reflects

Re: "Multiple table synchronizations are processed serially" still happens

2021-05-20 Thread Guillaume Lelarge
Hi, Le jeu. 20 mai 2021 à 12:09, Amit Kapila a écrit : > On Wed, Apr 28, 2021 at 2:43 PM Guillaume Lelarge > wrote: > > > > And it logs the "still waiting" message as long as the first table is > being synchronized. Once this is done, it releases the lock, and the > synchronization of the

Re: PG 14 release notes, first draft

2021-05-20 Thread Bruce Momjian
On Thu, May 20, 2021 at 02:55:18PM -0500, Justin Pryzby wrote: > On Thu, May 20, 2021 at 03:44:46PM -0400, Bruce Momjian wrote: > > > | Reduce the default value of vacuum_cost_page_miss (Peter Geoghegan) > > > | This new default better reflects current hardware capabilities. > > > Also say: the

Re: PG 14 release notes, first draft

2021-05-20 Thread Justin Pryzby
On Thu, May 20, 2021 at 03:44:46PM -0400, Bruce Momjian wrote: > > | Reduce the default value of vacuum_cost_page_miss (Peter Geoghegan) > > | This new default better reflects current hardware capabilities. > > Also say: the previous default was 10. > > Uh, we didn't report the new value, so

Postgres perl module namespace

2021-05-20 Thread Andrew Dunstan
While solving a problem with the Beta RPMs, I noticed that they export our perl test modules as capabilities like this: [andrew@f34 x86_64]$ rpm -q --provides -p postgresql14-devel-14-beta1_PGDG.fc34.x86_64.rpm | grep ^perl perl(PostgresNode) perl(PostgresVersion)

Re: PG 14 release notes, first draft

2021-05-20 Thread Bruce Momjian
On Wed, May 19, 2021 at 09:39:08AM -0500, Justin Pryzby wrote: > These sound weird since markup was added in 6a5bde7d4: > https://www.postgresql.org/docs/devel/release-14.html > | Remove server and Chapter 34 support for the version 2 wire protocol > (Heikki Linnakangas) > ... > | Pass doubled

Re: Subscription tests fail under CLOBBER_CACHE_ALWAYS

2021-05-20 Thread Tom Lane
I wrote: > Michael Paquier writes: >> On Wed, May 19, 2021 at 04:23:55PM -0400, Tom Lane wrote: >>> * Replace the edata->resultRelInfo field with two fields, one for >>> the original parent and one for the actual/current target. Perhaps >>> this is worth doing, not sure. >> This one sounds more

Re: SSL Tests for sslinfo extension

2021-05-20 Thread Daniel Gustafsson
> On 19 May 2021, at 21:05, Andrew Dunstan wrote: > > On 5/19/21 1:01 PM, Dagfinn Ilmari Mannsåker wrote: >> Daniel Gustafsson writes: >> >>> In order to be able to test extensions with SSL connections, allow >>> configure_test_server_for_ssl to create any extensions passed as >>> comma

Re: CALL versus procedures with output-only arguments

2021-05-20 Thread Pavel Stehule
čt 20. 5. 2021 v 19:53 odesílatel Tom Lane napsal: > I'm not too happy with this: > > regression=# create procedure p1(out x int) language plpgsql > regression-# as 'begin x := 42; end'; > CREATE PROCEDURE > > regression=# call p1(); > ERROR: procedure p1() does not exist > LINE 1: call p1(); >

Re: cutting down the TODO list thread

2021-05-20 Thread Bruce Momjian
On Wed, May 19, 2021 at 01:52:03PM -0400, John Naylor wrote: > Related to the above, but has a more specific approach in mind. The discussion > thread is not useful for getting one's head around how to think about the > problem, much less to decide if it's worth working on -- it's mostly >

Re: Query about time zone patterns in to_char

2021-05-20 Thread Bruce Momjian
On Thu, May 20, 2021 at 12:21:12PM +0530, Nitin Jadhav wrote: > Thanks Suraj for reviewing the patch. > > > 1: > > +RESET timezone; > > + > > + > > CREATE TABLE TIMESTAMPTZ_TST (a int , b timestamptz); > > > > Extra line. > > > > 2: > > +SET timezone = '00:00'; > > +SELECT to_char(now(), 'of') as

CALL versus procedures with output-only arguments

2021-05-20 Thread Tom Lane
I'm not too happy with this: regression=# create procedure p1(out x int) language plpgsql regression-# as 'begin x := 42; end'; CREATE PROCEDURE regression=# call p1(); ERROR: procedure p1() does not exist LINE 1: call p1(); ^ HINT: No procedure matches the given name and argument

Re: Race condition in recovery?

2021-05-20 Thread Robert Haas
On Tue, May 18, 2021 at 1:33 AM Dilip Kumar wrote: > Yeah, it will be a fake 1-element list. But just to be clear that > 1-element can only be "ControlFile->checkPointCopy.ThisTimeLineID" and > nothing else, do you agree to this? Because we initialize > recoveryTargetTLI to this value and we

Function scan FDW pushdown

2021-05-20 Thread Alexander Pyhalov
Hi. The attached patch allows pushing joins with function RTEs to PostgreSQL data sources. This makes executing queries like this create foreign table f_pgbench_accounts (aid int, bid int, abalance int, filler char(84)) SERVER local_srv OPTIONS (table_name 'pgbench_accounts'); select * from

Re: Added missing tab completion for alter subscription set option

2021-05-20 Thread Tom Lane
vignesh C writes: > On Tue, May 18, 2021 at 9:20 PM Alvaro Herrera > wrote: >> I wish we didn't have to keep knowledge in the psql source on which >> option names are to be used for each command. If we had some function >> SELECT pg_completion_options('alter subscription set'); >> that

Re: Added missing tab completion for alter subscription set option

2021-05-20 Thread vignesh C
On Tue, May 18, 2021 at 9:20 PM Alvaro Herrera wrote: > > On 2021-May-14, vignesh C wrote: > > > While I was reviewing one of the logical decoding features, I found > > Streaming and binary options were missing in tab completion for the > > alter subscription set option, the attached patch has

Re: Clarify how triggers relate to transactions

2021-05-20 Thread Laurenz Albe
On Wed, 2021-05-05 at 11:55 +0200, Laurenz Albe wrote: > On Wed, 2021-04-28 at 13:24 +0200, Laurenz Albe wrote: > > On Tue, 2021-04-27 at 14:26 +, PG Doc comments form wrote: > > > https://www.postgresql.org/docs/current/sql-createtrigger.html mentions > > > the > > > word "transaction" only

Re: Update maintenance_work_mem/autovacuum_work_mem to reflect the 1GB limitation with VACUUM

2021-05-20 Thread Laurenz Albe
On Wed, 2021-05-05 at 12:03 +0200, Laurenz Albe wrote: > On Mon, 2021-05-03 at 13:48 -0300, Martín Marqués wrote: > > We should add a line that indicates that there is a limitation (that > > should be IMO, backported to documentation of earlier versions as it > > affects all supported versions),

Re: Alias collision in `refresh materialized view concurrently`

2021-05-20 Thread Bharath Rupireddy
On Thu, May 20, 2021 at 7:52 PM Bernd Helmle wrote: > > Am Mittwoch, dem 19.05.2021 um 18:06 +0530 schrieb Bharath Rupireddy: > > > The corresponding Code is in `matview.c` in function > > > `refresh_by_match_merge`. With adding a prefix like `_pg_internal_` > > > we > > > could make collisions

Re: Synchronous commit behavior during network outage

2021-05-20 Thread Ondřej Žižka
On 06/05/2021 06:09, Andrey Borodin wrote: I could not understand your reasoning about 2 and 4 nodes. Can you please clarify a bit how 4 node setup can help prevent visibility of commited-locall-but-canceled transactions? Hello Andrey, The initial request (for us) was to have a geo cluster

Re: Bug in query rewriter - hasModifyingCTE not getting set

2021-05-20 Thread Tom Lane
"tsunakawa.ta...@fujitsu.com" writes: > From: Tom Lane >> I think either the bit about rule_action is unnecessary, or most of >> the code immediately above this is wrong, because it's only updating >> flags in sub_action. Why do you think it's necessary to change >> rule_action in addition to

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Andrew Dunstan
On 5/20/21 9:53 AM, Tom Lane wrote: > Michael Paquier writes: >> On Thu, May 20, 2021 at 07:05:05AM -0400, Andrew Dunstan wrote: >>> Your version of perl is apparently too old for this. Looks like that >>> needs to be 5.22 or later: >> Hmm.

RE: Bug in query rewriter - hasModifyingCTE not getting set

2021-05-20 Thread tsunakawa.ta...@fujitsu.com
From: Tom Lane > I think either the bit about rule_action is unnecessary, or most of > the code immediately above this is wrong, because it's only updating > flags in sub_action. Why do you think it's necessary to change > rule_action in addition to sub_action? Finally, I think I've understood

Re: Alias collision in `refresh materialized view concurrently`

2021-05-20 Thread Bernd Helmle
Am Mittwoch, dem 19.05.2021 um 18:06 +0530 schrieb Bharath Rupireddy: > > The corresponding Code is in `matview.c` in function > > `refresh_by_match_merge`. With adding a prefix like `_pg_internal_` > > we > > could make collisions pretty unlikely, without intrusive changes. > > > > The appended

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Tom Lane
Michael Paquier writes: > On Thu, May 20, 2021 at 07:05:05AM -0400, Andrew Dunstan wrote: >> Your version of perl is apparently too old for this. Looks like that >> needs to be 5.22 or later: > Hmm. src/test/perl/README tells about 5.8.0. That's quite a

Re: Installation of regress.so?

2021-05-20 Thread Tom Lane
Andrew Dunstan writes: > On 5/19/21 10:24 PM, Tom Lane wrote: >> Michael Paquier writes: >>> Could it be possible to install regress.so at least in the same >>> location as pg_regress? >> I don't think this is a great idea. ... > I do agree that we should not install regress.so by default.

Re: Installation of regress.so?

2021-05-20 Thread Andrew Dunstan
On 5/19/21 10:24 PM, Tom Lane wrote: > Michael Paquier writes: >> Could it be possible to install regress.so at least in the same >> location as pg_regress? > I don't think this is a great idea. Aside from the fact that > we'd be littering the install tree with a .so of no use to end > users,

Re: pg_rewind fails if there is a read only file.

2021-05-20 Thread Andrew Dunstan
On 5/20/21 6:17 AM, Paul Guo wrote: >> Presumably the user has a reason for adding the file read-only to the >> data directory, and we shouldn't lightly ignore that. >> >> Michael's advice is reasonable. This seems like a case of: > I agree. Attached is a short patch to handle the case. The

Re: Forget close an open relation in ReorderBufferProcessTXN()

2021-05-20 Thread Amit Langote
On Thu, May 20, 2021 at 5:59 PM osumi.takami...@fujitsu.com wrote: > On Tuesday, May 18, 2021 3:30 PM Amit Langote wrote: > > While doing so, it occurred to me (maybe not for the first time) that we are > > *unnecessarily* doing send_relation_and_attrs() for a relation if the > > changes > >

RE: Forget close an open relation in ReorderBufferProcessTXN()

2021-05-20 Thread osumi.takami...@fujitsu.com
On Tuesday, May 18, 2021 3:30 PM Amit Langote wrote: > On Mon, May 17, 2021 at 9:45 PM osumi.takami...@fujitsu.com > wrote: > > On Monday, May 17, 2021 6:52 PM Amit Langote > wrote: > > > Both patches are attached. > > The patch for PG13 can be applied to it cleanly and the RT succeeded. > > >

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Andrew Dunstan
On 5/20/21 7:15 AM, Michael Paquier wrote: > On Thu, May 20, 2021 at 07:05:05AM -0400, Andrew Dunstan wrote: >> Your version of perl is apparently too old for this. Looks like that >> needs to be 5.22 or later: > Hmm. src/test/perl/README tells about

Re: Freenode woes

2021-05-20 Thread Joe Conway
On 5/19/21 4:27 PM, Robert Treat wrote: On Wed, May 19, 2021 at 10:19 AM Christoph Berg wrote: Fwiw, if the PostgreSQL projects is considering moving the #postgresql IRC channel(s) elsewhere given [1,2], I'm a member of OFTC.net's network operations committee and would be happy to help. [1]

Re: Skip partition tuple routing with constant partition key

2021-05-20 Thread Amit Langote
Hou-san, On Thu, May 20, 2021 at 7:35 PM houzj.f...@fujitsu.com wrote: > From: Amit Langote > Sent: Wednesday, May 19, 2021 9:17 PM > > I guess it would be nice if we could fit in a solution for the use case > > that houjz > > mentioned as a special case. BTW, houjz, could you please check if

Re: Force disable of SSL renegociation in the server

2021-05-20 Thread Daniel Gustafsson
> On 20 May 2021, at 13:00, Michael Paquier wrote: > - SSL_OP_NO_RENEGOTIATION controls that. It is present in OpenSSL >= > 1.1.1 and has been backported in 1.1.0h (it is not present in older > versions of 1.1.0). For OpenSSL 1.1.0 versions < 1.1.0h it will be silently accepted without

Diagnostic comment in LogicalIncreaseXminForSlot

2021-05-20 Thread Ashutosh Bapat
Hi LogicalIncreaseRestartDecodingForSlot() has a debug log to report a new restart_lsn. But the corresponding function for catalog_xmin. Here's a patch to add the same. -- Best Wishes, Ashutosh Bapat From 5d211016367fe352871647225ead64a2215c3184 Mon Sep 17 00:00:00 2001 From: Ashutosh Bapat

Re: Logical Replication - behavior of TRUNCATE ... CASCADE

2021-05-20 Thread Amit Kapila
On Fri, May 7, 2021 at 6:06 PM Dilip Kumar wrote: > > On Mon, May 3, 2021 at 6:08 PM Bharath Rupireddy > wrote: > > > > Having said that, isn't it good if we can provide a subscription > > (CREATE/ALTER) level option say "cascade"(similar to other options > > such as binary, synchronous_commit,

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Amit Kapila
On Thu, May 20, 2021 at 4:43 PM Andrew Dunstan wrote: > > On 5/20/21 7:05 AM, Andrew Dunstan wrote: > >> > > Your version of perl is apparently too old for this. Looks like that > > needs to be 5.22 or later: > > > > > > However, we could probably rewrite

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Michael Paquier
On Thu, May 20, 2021 at 07:05:05AM -0400, Andrew Dunstan wrote: > Your version of perl is apparently too old for this. Looks like that > needs to be 5.22 or later: Hmm. src/test/perl/README tells about 5.8.0. That's quite a jump. -- Michael

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Andrew Dunstan
On 5/20/21 7:05 AM, Andrew Dunstan wrote: > On 5/20/21 4:36 AM, Amit Kapila wrote: >> On Thu, Apr 22, 2021 at 8:43 PM Andrew Dunstan wrote: >>> On 4/22/21 2:52 AM, Michael Paquier wrote: On Wed, Apr 21, 2021 at 10:04:40AM -0400, Andrew Dunstan wrote: > Here's a patch with these things

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Andrew Dunstan
On 5/20/21 4:36 AM, Amit Kapila wrote: > On Thu, Apr 22, 2021 at 8:43 PM Andrew Dunstan wrote: >> On 4/22/21 2:52 AM, Michael Paquier wrote: >>> On Wed, Apr 21, 2021 at 10:04:40AM -0400, Andrew Dunstan wrote: Here's a patch with these things attended to. >>> Thanks. Reading through it,

Force disable of SSL renegociation in the server

2021-05-20 Thread Michael Paquier
Hi all, Robert has mentioned https://nvd.nist.gov/vuln/detail/CVE-2021-3449 on the -security list where a TLS server could crash with some crafted renegociation message. We already disable SSL renegociation initialization for some time now, per 48d23c72, but we don't prevent the server from

RE: Skip partition tuple routing with constant partition key

2021-05-20 Thread houzj.f...@fujitsu.com
From: Amit Langote Sent: Wednesday, May 19, 2021 9:17 PM > I gave a shot to implementing your idea and ended up with the attached PoC > patch, which does pass make check-world. > > I do see some speedup: > > -- creates a range-partitioned table with 1000 partitions create unlogged > table >

Re: Skip partition tuple routing with constant partition key

2021-05-20 Thread David Rowley
On Thu, 20 May 2021 at 20:49, Amit Langote wrote: > > On Thu, May 20, 2021 at 9:31 AM David Rowley wrote: > > Wondering what your thoughts are on, instead of caching the last used > > ResultRelInfo from the last call to ExecFindPartition(), to instead > > cached the last looked up partition

Re: pg_rewind fails if there is a read only file.

2021-05-20 Thread Paul Guo
> Presumably the user has a reason for adding the file read-only to the > data directory, and we shouldn't lightly ignore that. > > Michael's advice is reasonable. This seems like a case of: I agree. Attached is a short patch to handle the case. The patch was tested in my dev environment.

Re: "Multiple table synchronizations are processed serially" still happens

2021-05-20 Thread Amit Kapila
On Wed, Apr 28, 2021 at 2:43 PM Guillaume Lelarge wrote: > > And it logs the "still waiting" message as long as the first table is being > synchronized. Once this is done, it releases the lock, and the > synchronization of the second table starts. > > Is there something I didn't understand on

Re: Skip partition tuple routing with constant partition key

2021-05-20 Thread Amit Langote
On Thu, May 20, 2021 at 9:20 AM tsunakawa.ta...@fujitsu.com wrote: > From: Amit Langote > > On Tue, May 18, 2021 at 11:11 AM houzj.f...@fujitsu.com > > wrote: > > > For some big data scenario, we sometimes transfer data from one table(only > > store not expired data) > > > to another

Re: Slow standby snapshot

2021-05-20 Thread Kirill Reshke
sorry, forgot to add a patch to the letter чт, 20 мая 2021 г. в 13:52, Кирилл Решке : > Hi, > I recently ran into a problem in one of our production postgresql cluster. > I had noticed lock contention on procarray lock on standby, which causes > WAL replay lag growth. > To reproduce this, you

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-20 Thread Bharath Rupireddy
On Thu, May 20, 2021 at 1:44 PM Kyotaro Horiguchi wrote: > > At Wed, 19 May 2021 21:48:56 +0530, Bharath Rupireddy > wrote in > > On Wed, May 19, 2021 at 5:20 PM Fujii Masao > > wrote: > > > I'm fine to convert "non-negative" word to "greater than" or "greater than > > > or equal to" in the

Re: Adaptive Plan Sharing for PreparedStmt

2021-05-20 Thread Tomas Vondra
Hi, On 5/20/21 5:43 AM, Andy Fan wrote: Currently we are using a custom/generic strategy to handle the data skew issue. However, it doesn't work well all the time. For example:  SELECT * FROM t WHERE a between $1 and $2. We assume the selectivity is 0.0025, But users may provide a large range

RE: Forget close an open relation in ReorderBufferProcessTXN()

2021-05-20 Thread osumi.takami...@fujitsu.com
On Tuesday, May 18, 2021 3:30 PM Amit Langote wrote: > While doing so, it occurred to me (maybe not for the first time) that we are > *unnecessarily* doing send_relation_and_attrs() for a relation if the changes > will be published using an ancestor's schema. In that case, sending only the >

Slow standby snapshot

2021-05-20 Thread Кирилл Решке
Hi, I recently ran into a problem in one of our production postgresql cluster. I had noticed lock contention on procarray lock on standby, which causes WAL replay lag growth. To reproduce this, you can do the following: 1) set max_connections to big number, like 10 2) begin a transaction on

Re: Skip partition tuple routing with constant partition key

2021-05-20 Thread Amit Langote
On Thu, May 20, 2021 at 9:31 AM David Rowley wrote: > On Thu, 20 May 2021 at 01:17, Amit Langote wrote: > > I gave a shot to implementing your idea and ended up with the attached > > PoC patch, which does pass make check-world. > > I only had a quick look at this. > > + if

Re: multi-install PostgresNode fails with older postgres versions

2021-05-20 Thread Amit Kapila
On Thu, Apr 22, 2021 at 8:43 PM Andrew Dunstan wrote: > > On 4/22/21 2:52 AM, Michael Paquier wrote: > > On Wed, Apr 21, 2021 at 10:04:40AM -0400, Andrew Dunstan wrote: > >> Here's a patch with these things attended to. > > Thanks. Reading through it, that seems pretty much fine to me. I > >

Re: [PATCH v3 1/1] Fix detection of preadv/pwritev support for OSX.

2021-05-20 Thread Dave Page
On Tue, Mar 30, 2021 at 6:58 AM Tom Lane wrote: > Thomas Munro writes: > > I'll move it when committing. I'll let this patch sit for another day > > to see if any other objections show up. > > FWIW, I remain fairly strongly against this, precisely because of the > point that it requires us to

Re: Inaccurate error message when set fdw batch_size to 0

2021-05-20 Thread Kyotaro Horiguchi
At Wed, 19 May 2021 21:48:56 +0530, Bharath Rupireddy wrote in > On Wed, May 19, 2021 at 5:20 PM Fujii Masao > wrote: > > I'm fine to convert "non-negative" word to "greater than" or "greater than > > or equal to" in the messages. But this change also seems to get rid of > > the information

RE: "ERROR: deadlock detected" when replicating TRUNCATE

2021-05-20 Thread tanghy.f...@fujitsu.com
On Thursday, May 20, 2021 3:05 PM, Amit Kapila wrote: > Okay, I have prepared the patches for all branches (11...HEAD). Each > version needs minor changes in the test, the code doesn't need much > change. Some notable changes in the tests: > 1. I have removed the conf change for

Re: Query about time zone patterns in to_char

2021-05-20 Thread Nitin Jadhav
Thanks Suraj for reviewing the patch. > 1: > +RESET timezone; > + > + > CREATE TABLE TIMESTAMPTZ_TST (a int , b timestamptz); > > Extra line. > > 2: > +SET timezone = '00:00'; > +SELECT to_char(now(), 'of') as "Of", to_char(now(), 'tzh:tzm') as "tzh:tzm"; I have fixed these comments. > I am not

Re: Re: Parallel scan with SubTransGetTopmostTransaction assert coredump

2021-05-20 Thread Greg Nancarrow
On Thu, May 20, 2021 at 11:18 AM Pengchengliu wrote: > > Hi Greg, >Thanks a lot for you explanation and your fix. > >I think your fix can resolve the core dump issue. As with your fix, > parallel process reset Transaction Xmin from ActiveSnapshot. >But it will change Transaction

Re: Rewriting the test of pg_upgrade as a TAP test - take three - remastered set

2021-05-20 Thread Michael Paquier
On Tue, May 18, 2021 at 10:49:39AM +0900, Michael Paquier wrote: > Makes sense. For now, I'll update this patch set so as it is possible > to use custom dumps, as an option in parallel of pg_regress when > specifying a different source code path. I'll also decouple the > business with probin

Re: "ERROR: deadlock detected" when replicating TRUNCATE

2021-05-20 Thread Amit Kapila
On Tue, May 18, 2021 at 6:52 AM Peter Smith wrote: > > > > > Yeah, have you checked it in the back branches? > > > > Yes, the apply_handle_truncate function was introduced in April/2018 [1]. > > REL_11_0 was tagged in Oct/2018. > > The "ERROR: deadlock detected" log is reproducible in PG 11.0. >