Make pg_waldump report replication origin ID, LSN, and timestamp.

2021-12-05 Thread Masahiko Sawada
Hi all, I realized that pg_waldump doesn't show replication origin ID, LSN, and timestamp of PREPARE TRANSACTION record. Commit 7b8a899bdeb improved pg_waldump two years ago so that it reports the detail of information of PREPARE TRANSACTION but ISTM that it overlooked showing replication origin

Re: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread Amit Langote
On Mon, Dec 6, 2021 at 3:55 PM houzj.f...@fujitsu.com wrote: > On Thursday, December 2, 2021 9:48 PM Amit Langote > wrote: > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > > wrote: > > > > Reading Alvaro's email at the top again gave me

Re: pg_replslotdata - a tool for displaying replication slot information

2021-12-05 Thread Michael Paquier
On Thu, Dec 02, 2021 at 08:32:08AM +0530, Bharath Rupireddy wrote: > On Thu, Dec 2, 2021 at 4:22 AM Andres Freund wrote: >>> I don't have any other compelling use- cases at the moment, but I will say >>> that it is typically nice from an administrative standpoint to be able to >>> inspect things

Re: GUC flags

2021-12-05 Thread Michael Paquier
On Sun, Dec 05, 2021 at 11:38:05PM -0600, Justin Pryzby wrote: > Thanks. One more item. The check_guc script currently outputs 68 false > positives - even though it includes a list of 20 exceptions. This is not > useful. Indeed. Hmm. This script does a couple of things: 1) Check the format

RE: Optionally automatically disable logical replication subscriptions on error

2021-12-05 Thread osumi.takami...@fujitsu.com
On Monday, December 6, 2021 1:38 PM Mark Dilger wrote: > > On Dec 1, 2021, at 8:48 PM, Amit Kapila wrote: > > > > The patch disables the subscription for non-transient errors. I am not > > sure if we can easily make the call to decide whether any particular > > error is transient or not. For

RE: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread houzj.f...@fujitsu.com
On Thursday, December 2, 2021 9:48 PM Amit Langote wrote: > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila wrote: > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > wrote: > > > Reading Alvaro's email at the top again gave me a pause to > > > reconsider what I had said in reply. It might indeed

Re: row filtering for logical replication

2021-12-05 Thread Amit Kapila
On Mon, Dec 6, 2021 at 12:06 PM Dilip Kumar wrote: > > On Mon, Dec 6, 2021 at 6:49 AM Euler Taveira wrote: > > > > On Fri, Dec 3, 2021, at 8:12 PM, Euler Taveira wrote: > > > > PS> I will update the commit message in the next version. I barely changed > > the > > documentation to reflect the

Re: preserve timestamps when installing headers

2021-12-05 Thread Tom Lane
Michael Paquier writes: > On Tue, Oct 12, 2021 at 01:22:50PM +0300, Alexander Kuzmenkov wrote: >> This patch adds `-p` switch to `cp` invocation in >> these files, to make it preserve timestamps. > The use of cp instead of $(INSTALL_DATA) for the installation of the > headers comes from a703269,

Re: row filtering for logical replication

2021-12-05 Thread Amit Kapila
On Sat, Dec 4, 2021 at 4:43 AM Euler Taveira wrote: > > On Thu, Dec 2, 2021, at 4:18 AM, Peter Smith wrote: > > PSA a new v44* patch set. > > We are actively developing this feature for some months and we improved this > feature a lot. This has been a good team work. It seems a good time to

Re: preserve timestamps when installing headers

2021-12-05 Thread Michael Paquier
On Tue, Oct 12, 2021 at 01:22:50PM +0300, Alexander Kuzmenkov wrote: > I noticed that `make install` updates modification time for all > installed headers. This leads to recompilation of all dependent > objects, which is inconvenient for example when working on a > third-party extension. A way to

Re: row filtering for logical replication

2021-12-05 Thread Dilip Kumar
On Mon, Dec 6, 2021 at 6:49 AM Euler Taveira wrote: > > On Fri, Dec 3, 2021, at 8:12 PM, Euler Taveira wrote: > > PS> I will update the commit message in the next version. I barely changed the > documentation to reflect the current behavior. I probably missed some changes > but I will fix in the

Re: Alter all tables in schema owner fix

2021-12-05 Thread Michael Paquier
On Fri, Dec 03, 2021 at 05:20:35PM +, Bossart, Nathan wrote: > On 12/2/21, 11:57 PM, "tanghy.f...@fujitsu.com" > wrote: > > Thanks for your patch. > > I tested it and it fixed this problem as expected. It also passed "make > > check-world". > > +1, the patch looks good to me, too. My only

Re: MSVC SSL test failure

2021-12-05 Thread Tom Lane
Andrew Dunstan writes: > On 12/5/21 12:50, Tom Lane wrote: >> This looks quite a bit like the sort of failure that commit >> 6051857fc was meant to forestall. I wonder whether reverting >> that commit changes the results? You might also try inserting >> a shutdown() call, as we'd decided not to

Re: Allow escape in application_name

2021-12-05 Thread Kyotaro Horiguchi
At Sat, 4 Dec 2021 00:07:05 +0900, Fujii Masao wrote in > > > On 2021/11/08 22:40, kuroda.hay...@fujitsu.com wrote: > > Attached patches are the latest version. > > Thanks for updating the patch! > > + buf = makeStringInfo(); > > This is necessary only when application_name is

Re: GUC flags

2021-12-05 Thread Justin Pryzby
On Fri, Dec 03, 2021 at 10:06:47AM +0900, Michael Paquier wrote: > On Wed, Dec 01, 2021 at 11:17:34PM -0600, Justin Pryzby wrote: > > I find it easier to read "wait before authentication ..." than "wait ... > > before > > authentication". > > I have a hard time seeing a strong difference here.

Re: parse_subscription_options - suggested improvements

2021-12-05 Thread Michael Paquier
On Mon, Dec 06, 2021 at 11:28:12AM +1100, Peter Smith wrote: > For the initialization of opts I put memset within the function to > make it explicit that the bit-masks will work as intended without > having to look back at calling code for the initial values. In any > case, I think the caller

Re: Skipping logical replication transactions on subscriber side

2021-12-05 Thread Amit Kapila
On Fri, Dec 3, 2021 at 12:12 PM Masahiko Sawada wrote: > > On Fri, Dec 3, 2021 at 11:53 AM Amit Kapila wrote: > > > > > But this syntax gives you flexibility, so we can also > > > start with a simple implementation. > > > > > > > Yeah, I also think so. BTW, what do you think of providing extra

Re: [PATCH] support tab-completion for single quote input with equal sign

2021-12-05 Thread Kyotaro Horiguchi
At Fri, 3 Dec 2021 15:16:55 +0900, Michael Paquier wrote in > On Fri, Sep 17, 2021 at 02:45:57AM +0900, Kyotaro Horiguchi wrote: > > This test fails for the same reason, but after fixing it the result > > contains \a (BEL) in the output on my CentOS8. I'm not sure what is > > happening here.. >

Re: pg_get_publication_tables() output duplicate relid

2021-12-05 Thread Amit Kapila
On Fri, Dec 3, 2021 at 6:04 PM Amit Langote wrote: > > On Fri, Dec 3, 2021 at 12:37 PM Amit Kapila wrote: > > On Thu, Dec 2, 2021 at 7:18 PM Amit Langote wrote: > > > On Thu, Dec 2, 2021 at 2:27 PM Amit Kapila > > > wrote: > > > > On Thu, Dec 2, 2021 at 8:42 AM Amit Langote > > > > wrote: >

Re: parallel vacuum comments

2021-12-05 Thread Amit Kapila
On Fri, Dec 3, 2021 at 6:06 PM Masahiko Sawada wrote: > > On Fri, Dec 3, 2021 at 6:03 PM Amit Kapila wrote: > > > > On Thu, Dec 2, 2021 at 6:01 PM Masahiko Sawada > > wrote: > > > > > > I've attached updated patches. > > > > > > > I have a few comments on v4-0001. > > Thank you for the

Re: preserving db/ts/relfilenode OIDs across pg_upgrade (was Re: storing an explicit nonce)

2021-12-05 Thread Sadhuprasad Patro
On Tue, Oct 26, 2021 at 6:55 PM Shruthi Gowda wrote: > > > I have revised the patch w.r.t the way 'create_storage' is interpreted > in heap_create() along with some minor changes to preserve the DBOID > patch. > Hi Shruthi, I am reviewing the attached patches and providing a few comments here

Re: Optionally automatically disable logical replication subscriptions on error

2021-12-05 Thread Mark Dilger
> On Dec 1, 2021, at 8:48 PM, Amit Kapila wrote: > > The patch disables the subscription for non-transient errors. I am not > sure if we can easily make the call to decide whether any particular > error is transient or not. For example, DISK_FULL or OUT_OF_MEMORY > might not rectify itself.

Disallow quorum uncommitted (with synchronous standbys) txns in logical replication subscribers

2021-12-05 Thread Bharath Rupireddy
Hi, It looks like the logical replication subscribers are receiving the quorum uncommitted transactions even before the synchronous (sync) standbys. Most of the times it is okay, but it can be a problem if the primary goes down/crashes (while the primary is in SyncRepWaitForLSN) before the quorum

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-12-05 Thread Dilip Kumar
On Mon, Dec 6, 2021 at 9:17 AM Ashutosh Sharma wrote: > > Here are few more review comments: Thanks for reviewing it. > 1) It seems that we are not freeing the memory allocated for buf.data in > CreateDirAndVersionFile(). Yeah this was a problem in v6 but I have fixed in v7, can you check

Re: Optionally automatically disable logical replication subscriptions on error

2021-12-05 Thread Greg Nancarrow
On Sat, Dec 4, 2021 at 12:20 AM osumi.takami...@fujitsu.com wrote: > > Hi, I've made a new patch v11 that incorporated suggestions described above. > Some review comments for the v11 patch: doc/src/sgml/ref/create_subscription.sgml (1) Possible wording improvement? BEFORE: + Specifies whether

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-12-05 Thread Ashutosh Sharma
Here are few more review comments: 1) It seems that we are not freeing the memory allocated for buf.data in CreateDirAndVersionFile(). -- + */ +static void +CreateDirAndVersionFile(char *dbpath, Oid dbid, Oid tsid, bool isRedo) +{ 2) Do we need to pass dbpath here? I mean why not reconstruct

Re: [Proposal] Fully WAL logged CREATE DATABASE - No Checkpoints

2021-12-05 Thread Ashutosh Sharma
On Fri, Dec 3, 2021 at 8:28 PM Dilip Kumar wrote: > On Fri, Dec 3, 2021 at 7:38 PM Ashutosh Sharma > wrote: > > > > I see that this patch is reducing the database creation time by almost > 3-4 times provided that the template database has some user data in it. > However, there are couple of

Re: MSVC SSL test failure

2021-12-05 Thread Andrew Dunstan
On 12/5/21 12:50, Tom Lane wrote: > Andrew Dunstan writes: >> I am getting this test failure 001_ssltests.pl on my test MSVC system >> when SSL tests are enabled: >> not ok 110 - certificate authorization fails with revoked client cert >> with server-side CRL directory: matches >> #

Re: [PATCH] Don't block HOT update by BRIN index

2021-12-05 Thread Tom Lane
Tomas Vondra writes: > On 12/5/21 21:16, Tom Lane wrote: >> Oh, geez. *Please* let us not add another regression failure mode >> like the ones that afflict stats.sql. We do not need a doubling >> of that failure rate. I suggest just removing this test. > Whooops. Agreed, I'll get rid of that

Re: On login trigger: take three

2021-12-05 Thread Greg Nancarrow
On Tue, Nov 16, 2021 at 4:38 PM Greg Nancarrow wrote: > > I've attached an updated patch with these changes. > I've attached a re-based version (no functional changes from the previous) to fix cfbot failures. Regards, Greg Nancarrow Fujitsu Australia

Re: Is ssl_crl_file "SSL server cert revocation list"?

2021-12-05 Thread Kyotaro Horiguchi
At Fri, 3 Dec 2021 14:32:54 +0100, Daniel Gustafsson wrote in > > On 2 Dec 2021, at 16:04, Peter Eisentraut > > wrote: > > > This change looks correct to me. > > Thanks for review, I've pushed this backpatched (in part) down to 10. Thanks for revising and comitting this. regards. --

Re: [PATCH] Don't block HOT update by BRIN index

2021-12-05 Thread Tomas Vondra
On 12/5/21 21:16, Tom Lane wrote: Justin Pryzby writes: brin.sql's new brin_hot test is failing sometimes. Evidently because: | 2021-12-01 04:02:01.096 CET [61a6e587.3106b1:4] LOG: wait_for_hot_stats delayed 33.217301 seconds It seems like maybe the UDP packet lost to the stats collector got

Re: pg_dump versus ancient server versions

2021-12-05 Thread Tom Lane
I ran a new set of experiments concerning building back branches on modern platforms, this time trying Fedora 35 (gcc 11.2.1) on x86_64. I widened the scope of the testing a bit by adding "--enable-nls --with-perl" and running check-world not just the core tests. Salient results: * Everything

Re: parse_subscription_options - suggested improvements

2021-12-05 Thread Peter Smith
On Fri, Dec 3, 2021 at 11:02 AM Bossart, Nathan wrote: > > On 8/8/21, 11:54 PM, "Peter Smith" wrote: > > v11 -> v12 > > > > * A rebase was needed due to some recent pgindent changes on HEAD. > > The patch looks correct to me. I have a couple of small comments. Thank you for taking an interest

Re: enable certain TAP tests for MSVC builds

2021-12-05 Thread Noah Misch
On Sun, Dec 05, 2021 at 06:00:08PM -0500, Andrew Dunstan wrote: > On 12/5/21 14:47, Noah Misch wrote: > > On Sun, Dec 05, 2021 at 11:57:31AM -0500, Andrew Dunstan wrote: > >> Certain TAP tests rely on settings that the Make files provide for them. > >> However vcregress.pl doesn't provide those

Re: MSVC SSL test failure

2021-12-05 Thread Daniel Gustafsson
> On 5 Dec 2021, at 23:44, Andrew Dunstan wrote: > Can you show me the cirrus.yml file you're using to test with? I used the 0001 patch from this thread: https://www.postgresql.org/message-id/20211101055720.7mzwtkhzxmorpxth%40alap3.anarazel.de > A URL ref to the results would also help. I

Re: enable certain TAP tests for MSVC builds

2021-12-05 Thread Andrew Dunstan
On 12/5/21 14:47, Noah Misch wrote: > On Sun, Dec 05, 2021 at 11:57:31AM -0500, Andrew Dunstan wrote: >> Certain TAP tests rely on settings that the Make files provide for them. >> However vcregress.pl doesn't provide those settings. This patch remedies >> that, and I propose to apply it shortly

Re: MSVC SSL test failure

2021-12-05 Thread Andrew Dunstan
On 12/5/21 15:14, Daniel Gustafsson wrote: >> On 5 Dec 2021, at 18:03, Andrew Dunstan wrote: >> I am getting this test failure 001_ssltests.pl on my test MSVC system >> when SSL tests are enabled: >> >>not ok 110 - certificate authorization fails with revoked client cert >> with

Re: The "char" type versus non-ASCII characters

2021-12-05 Thread Chapman Flack
On 12/05/21 14:51, Tom Lane wrote: > Uh, what? > > regression=# select '\n'::bytea; > ERROR: invalid input syntax for type bytea Wow, I was completely out to lunch there somehow. Sorry. None of those other escaped forms are known to byteain, other than '\\' and according to table 8.7. I

Re: [PATCH] Don't block HOT update by BRIN index

2021-12-05 Thread Tom Lane
Justin Pryzby writes: > brin.sql's new brin_hot test is failing sometimes. > Evidently because: > | 2021-12-01 04:02:01.096 CET [61a6e587.3106b1:4] LOG: wait_for_hot_stats > delayed 33.217301 seconds > It seems like maybe the UDP packet lost to the stats collector got lost ? > It fails less

Re: MSVC SSL test failure

2021-12-05 Thread Daniel Gustafsson
> On 5 Dec 2021, at 18:03, Andrew Dunstan wrote: > I am getting this test failure 001_ssltests.pl on my test MSVC system > when SSL tests are enabled: > >not ok 110 - certificate authorization fails with revoked client cert with > server-side CRL directory: matches > ># Failed test

Re: The "char" type versus non-ASCII characters

2021-12-05 Thread Tom Lane
Chapman Flack writes: > On 12/05/21 12:01, Tom Lane wrote: >> regression=# select '\'::bytea; >> ERROR: invalid input syntax for type bytea >> >> which would be incompatible with "char"'s existing behavior. But as >> long as we don't do that, I'd be okay with having high-bit-set char >> values

Re: enable certain TAP tests for MSVC builds

2021-12-05 Thread Noah Misch
On Sun, Dec 05, 2021 at 11:57:31AM -0500, Andrew Dunstan wrote: > Certain TAP tests rely on settings that the Make files provide for them. > However vcregress.pl doesn't provide those settings. This patch remedies > that, and I propose to apply it shortly (when we have a fix for the SSL > tests

ExecTypeSetColNames is fundamentally broken

2021-12-05 Thread Tom Lane
Changing Fcc: +inbox I looked into the failure reported at [1]. Basically what's happening there is that we're allowing a composite datum of type RECORD to get stored into a table, whereupon other backends can't make sense of it since they lack the appropriate typcache entry. The

Re: The "char" type versus non-ASCII characters

2021-12-05 Thread Chapman Flack
On 12/05/21 12:01, Tom Lane wrote: > regression=# select '\'::bytea; > ERROR: invalid input syntax for type bytea > > which would be incompatible with "char"'s existing behavior. But as > long as we don't do that, I'd be okay with having high-bit-set char > values map to

Re: MSVC SSL test failure

2021-12-05 Thread Tom Lane
Andrew Dunstan writes: > I am getting this test failure 001_ssltests.pl on my test MSVC system > when SSL tests are enabled: > not ok 110 - certificate authorization fails with revoked client cert > with server-side CRL directory: matches > # Failed test 'certificate authorization

MSVC SSL test failure

2021-12-05 Thread Andrew Dunstan
I am getting this test failure 001_ssltests.pl on my test MSVC system when SSL tests are enabled: not ok 110 - certificate authorization fails with revoked client cert with server-side CRL directory: matches # Failed test 'certificate authorization fails with revoked client cert

Re: The "char" type versus non-ASCII characters

2021-12-05 Thread Tom Lane
Chapman Flack writes: > On 12/04/21 11:34, Tom Lane wrote: >> So I'm visualizing it as a uint8 that we happen to like to store >> ASCII codes in, and that's what prompts the thought of using a >> numeric representation for non-ASCII values. > I'm in substantial agreement, though I also see that

enable certain TAP tests for MSVC builds

2021-12-05 Thread Andrew Dunstan
Certain TAP tests rely on settings that the Make files provide for them. However vcregress.pl doesn't provide those settings. This patch remedies that, and I propose to apply it shortly (when we have a fix for the SSL tests that I will write about separately) and backpatch it appropriately.

Re: [PATCH] Don't block HOT update by BRIN index

2021-12-05 Thread Justin Pryzby
On Tue, Nov 30, 2021 at 08:11:03PM +0100, Tomas Vondra wrote: > OK, > > I've polished the last version of the patch a bit (added a regression test > with update of attribute in index predicate and docs about the new flag into > indexam.sgml) and pushed. brin.sql's new brin_hot test is failing

Re: Add id's to various elements in protocol.sgml

2021-12-05 Thread Daniel Gustafsson
> On 5 Dec 2021, at 16:51, Brar Piening wrote: > The attached patch adds id's to various elements in protocol.sgml to > make them more accesssible via the public html documentation interface. Off the cuff without having checked the compiled results yet, it seems like a good idea. — Daniel

Add id's to various elements in protocol.sgml

2021-12-05 Thread Brar Piening
When working with the Frontend/Backend Protocol implementation in Npgsql and discussing things with the team, I often struggle with the fact that you can't set deep links to individual message formats in the somewhat lengthy html docs pages. The attached patch adds id's to various elements in