Re: should we document an example to set multiple libraries in shared_preload_libraries?

2021-12-08 Thread Maciek Sakrejda
On Wed, Dec 1, 2021 at 5:15 AM Tom Lane wrote: > > Justin Pryzby writes: > > +1 to document it, but it seems like the worse problem is allowing the > > admin to > > write a configuration which causes the server to fail to start, without > > having > > issued a warning. > > > I think you could

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

2021-12-08 Thread Dilip Kumar
On Thu, Dec 9, 2021 at 12:42 PM Ashutosh Sharma wrote: > > Hi, > > The issue here is that we are trying to create a table that exists inside a > non-default tablespace when doing ALTER DATABASE. I think this should be > skipped otherwise we will come across the error like shown below: > >

Re: Multi-Column List Partitioning

2021-12-08 Thread Amul Sul
On Thu, Dec 9, 2021 at 12:03 PM Amit Langote wrote: > > On Thu, Dec 9, 2021 at 3:12 PM Amul Sul wrote: > > On Thu, Dec 9, 2021 at 11:24 AM Amit Langote > > wrote: > > > > > [] > > > On Mon, Dec 6, 2021 at 10:57 PM Nitin Jadhav > > > wrote: > > > > > Looks difficult to understand at first

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

2021-12-08 Thread Ashutosh Sharma
Hi, The issue here is that we are trying to create a table that exists inside a non-default tablespace when doing ALTER DATABASE. I think this should be skipped otherwise we will come across the error like shown below: ashu@postgres=# alter database test set tablespace pg_default; ERROR: 58P02:

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

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 05:03:30PM +0900, Masahiko Sawada wrote: > Agreed. I've attached an updated patch that incorporated your review > comments. Please review it. That looks correct to me. One thing that I have noticed while reviewing is that we don't check XactCompletionApplyFeedback() in

Re: Is there a way (except from server logs) to know the kind of on-going/last checkpoint?

2021-12-08 Thread Bharath Rupireddy
On Wed, Dec 8, 2021 at 7:43 AM Bharath Rupireddy wrote: > > On Wed, Dec 8, 2021 at 7:34 AM Tomas Vondra > wrote: > > >> I agree it might be useful to provide information about the nature of > > >> the checkpoint, and perhaps even PID of the backend that triggered it > > >> (although that may be

Re: Multi-Column List Partitioning

2021-12-08 Thread Amit Langote
On Thu, Dec 9, 2021 at 3:12 PM Amul Sul wrote: > On Thu, Dec 9, 2021 at 11:24 AM Amit Langote wrote: > > > [] > > On Mon, Dec 6, 2021 at 10:57 PM Nitin Jadhav > > wrote: > > > > Looks difficult to understand at first glance, how about the following: > > > > > > > > if (b1->isnulls !=

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 05:47:39PM -0700, David G. Johnston wrote: > Yeah, I was treating the leading dash as being silent...the syntax dash(es) > for single and multi-character arguments seems unimportant to read aloud in > the general sense. If one does read them then yes, "a" is correct. >

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Bharath Rupireddy
On Thu, Dec 9, 2021 at 11:28 AM Bharath Rupireddy wrote: > > On Thu, Dec 9, 2021 at 7:56 AM Michael Paquier wrote: > > > > On Wed, Dec 08, 2021 at 04:57:49PM +0530, Bharath Rupireddy wrote: > > > Done in the attached v5 patch. > > > > Thanks for the new version. FWIW, as the information logged

Re: Multi-Column List Partitioning

2021-12-08 Thread Amul Sul
On Thu, Dec 9, 2021 at 11:24 AM Amit Langote wrote: > [] > On Mon, Dec 6, 2021 at 10:57 PM Nitin Jadhav > wrote: > > > Looks difficult to understand at first glance, how about the following: > > > > > > if (b1->isnulls != b2->isnulls) > > >return false; > > I don't think having this

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Bharath Rupireddy
On Thu, Dec 9, 2021 at 7:56 AM Michael Paquier wrote: > > On Wed, Dec 08, 2021 at 04:57:49PM +0530, Bharath Rupireddy wrote: > > Done in the attached v5 patch. > > Thanks for the new version. FWIW, as the information logged when > recovering a WAL segment from the local pg_wal could be rather >

Re: Multi-Column List Partitioning

2021-12-08 Thread Amit Langote
On Thu, Dec 9, 2021 at 2:54 PM Amit Langote wrote: > > Hi Nitin, > > Was looking at warnings generated by v8: > > partbounds.c:971:17: warning: unused variable 'b1_isnull' [-Wunused-variable] > boolb1_isnull = false; >

Re: Multi-Column List Partitioning

2021-12-08 Thread Amit Langote
Hi Nitin, Was looking at warnings generated by v8: partbounds.c:971:17: warning: unused variable 'b1_isnull' [-Wunused-variable] boolb1_isnull = false; ^ partbounds.c:972:17: warning: unused variable 'b2_isnull'

Re: Non-superuser subscription owners

2021-12-08 Thread Amit Kapila
On Tue, Dec 7, 2021 at 8:25 PM Mark Dilger wrote: > > > On Dec 7, 2021, at 2:29 AM, Amit Kapila wrote: > > > > Okay, let me try to explain again. Following is the text from docs > > [1]: " (a) To create a subscription, the user must be a superuser. (b) > > The subscription apply process will run

Re: Optionally automatically disable logical replication subscriptions on error

2021-12-08 Thread Amit Kapila
On Wed, Dec 8, 2021 at 9:22 PM Mark Dilger wrote: > > > > On Dec 8, 2021, at 5:10 AM, Amit Kapila wrote: > > > > I think if we are really worried about transient errors then probably > > the idea "disable only if the same error has occurred more than X > > times" seems preferable as compared to

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

2021-12-08 Thread Neha Sharma
On Thu, Dec 9, 2021 at 4:26 AM Greg Nancarrow wrote: > On Thu, Dec 9, 2021 at 6:57 AM Neha Sharma > wrote: > > > > While testing the v7 patches, I am observing a crash with the below test > case. > > > > Test case: > > create tablespace tab location '/test_dir'; > > create tablespace tab1

Re: Is there any documentation on how to correctly create extensions in HA(primary-standby) setup?

2021-12-08 Thread Bharath Rupireddy
On Tue, Dec 7, 2021 at 9:16 PM Peter Eisentraut wrote: > > On 03.12.21 15:28, Bharath Rupireddy wrote: > > I'm thinking of adding the above steps into the "Additional Supplied > > Modules" section documentation. Any thoughts please? > > > > [1] - https://www.postgresql.org/docs/devel/contrib.html

Re: Skipping logical replication transactions on subscriber side

2021-12-08 Thread Amit Kapila
On Wed, Dec 8, 2021 at 4:36 PM Masahiko Sawada wrote: > > On Wed, Dec 8, 2021 at 5:54 PM Amit Kapila wrote: > > > > On Wed, Dec 8, 2021 at 12:36 PM Masahiko Sawada > > wrote: > > > > > > On Wed, Dec 8, 2021 at 3:50 PM Amit Kapila > > > wrote: > > > > > > > > On Wed, Dec 8, 2021 at 11:48 AM

Re: port conflicts when running tests concurrently on windows.

2021-12-08 Thread Thomas Munro
On Thu, Dec 9, 2021 at 11:46 AM Andres Freund wrote: > Is it perhaps time to to use unix sockets on windows by default > (i.e. PG_TEST_USE_UNIX_SOCKETS), at least when on a new enough windows? Makes sense. As a data point, it looks like this feature is in all supported releases of Windows. It

RE: row filtering for logical replication

2021-12-08 Thread houzj.f...@fujitsu.com
On Wednesday, December 8, 2021 7:52 PM Ajin Cherian > On Tue, Dec 7, 2021 at 5:36 PM Peter Smith wrote: > > > > We were mid-way putting together the next v45* when your latest > > attachment was posted over the weekend. So we will proceed with our > > original plan to post our v45* (tomorrow). >

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 04:57:49PM +0530, Bharath Rupireddy wrote: > Done in the attached v5 patch. Thanks for the new version. FWIW, as the information logged when recovering a WAL segment from the local pg_wal could be rather confusing at bootstrap phase, I would suggest to simplify things as

Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?

2021-12-08 Thread Bharath Rupireddy
On Wed, Dec 8, 2021 at 11:02 PM Bossart, Nathan wrote: > > On 12/8/21, 3:29 AM, "Bharath Rupireddy" > wrote: > > Thanks for your thoughts. I'm fine either way, hence attaching two > > patches here with and I will leave it for the committer 's choice. > > 1)

Re: Why doesn't GiST VACUUM require a super-exclusive lock, like nbtree VACUUM?

2021-12-08 Thread Peter Geoghegan
On Tue, Nov 30, 2021 at 5:09 PM Peter Geoghegan wrote: > Attached draft patch attempts to explain things in this area within > the nbtree README. There is a much shorter comment about it within > vacuumlazy.c. I am concerned about GiST index-only scans themselves, > of course, but I discovered

Re: port conflicts when running tests concurrently on windows.

2021-12-08 Thread Andres Freund
Hi, On 2021-12-08 17:03:07 -0800, Andres Freund wrote: > On 2021-12-08 16:36:14 -0800, Andres Freund wrote: > > On 2021-12-08 14:45:50 -0800, Andres Freund wrote: > > > Is it perhaps time to to use unix sockets on windows by default > > > (i.e. PG_TEST_USE_UNIX_SOCKETS), at least when on a new

Re: Question on not-in and array-eq

2021-12-08 Thread Zhenghua Lyu
Thanks for your explanation. From: David G. Johnston Sent: Wednesday, December 8, 2021 11:39 PM To: Zhenghua Lyu Cc: pgsql-hackers@lists.postgresql.org Subject: Re: Question on not-in and array-eq On Wed, Dec 8, 2021 at 8:15 AM Zhenghua Lyu

Re: port conflicts when running tests concurrently on windows.

2021-12-08 Thread Andres Freund
Hi, On 2021-12-08 16:36:14 -0800, Andres Freund wrote: > On 2021-12-08 14:45:50 -0800, Andres Freund wrote: > > Is it perhaps time to to use unix sockets on windows by default > > (i.e. PG_TEST_USE_UNIX_SOCKETS), at least when on a new enough windows? > > On its own PG_TEST_USE_UNIX_SOCKETS

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread David G. Johnston
On Wed, Dec 8, 2021 at 5:32 PM Greg Nancarrow wrote: > On Thu, Dec 9, 2021 at 11:25 AM David G. Johnston > wrote: > > > >> - # safe: cross compilers may not add the suffix if given an `-o' > >> + # safe: cross compilers may not add the suffix if given a `-o' > >> # argument, so we may

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Peter Smith
On Thu, Dec 9, 2021 at 11:12 AM Michael Paquier wrote: > > On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote: > > Some regex exposed a bunch of typos scattered across PG comments and docs. > > > > They are all of the "uses-an-instead-of-a" (or vice versa) variety. > > > > PSA a small

Re: port conflicts when running tests concurrently on windows.

2021-12-08 Thread Andres Freund
Hi, On 2021-12-08 14:45:50 -0800, Andres Freund wrote: > Is it perhaps time to to use unix sockets on windows by default > (i.e. PG_TEST_USE_UNIX_SOCKETS), at least when on a new enough windows? On its own PG_TEST_USE_UNIX_SOCKETS doesn't work at all on windows - it fails trying to use /tmp/ as

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Greg Nancarrow
On Thu, Dec 9, 2021 at 11:25 AM David G. Johnston wrote: > >> - # safe: cross compilers may not add the suffix if given an `-o' >> + # safe: cross compilers may not add the suffix if given a `-o' >> # argument, so we may need to know it at that point already. >> On this one, I think that

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

2021-12-08 Thread Greg Nancarrow
On Thu, Dec 9, 2021 at 6:57 AM Neha Sharma wrote: > > While testing the v7 patches, I am observing a crash with the below test case. > > Test case: > create tablespace tab location '/test_dir'; > create tablespace tab1 location '/test_dir1'; > create database test tablespace tab; > \c test >

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread David G. Johnston
On Wed, Dec 8, 2021 at 5:12 PM Michael Paquier wrote: > On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote: > > - # safe: cross compilers may not add the suffix if given an `-o' > + # safe: cross compilers may not add the suffix if given a `-o' > # argument, so we may need to

Re: cutting down the TODO list thread

2021-12-08 Thread Masahiko Sawada
On Thu, Dec 9, 2021 at 2:40 AM John Naylor wrote: > > - Improve autovacuum tuning > http://www.postgresql.org/message-id/5078ad6b.8060...@agliodbs.com > http://www.postgresql.org/message-id/20130124215715.ge4...@alvh.no-ip.org > > I'm kind of on the fence about these. The title is way too broad,

Re: Transparent column encryption

2021-12-08 Thread Jacob Champion
On Wed, 2021-12-08 at 02:58 +0100, Tomas Vondra wrote: > > On 12/8/21 00:26, Jacob Champion wrote: > > On Tue, 2021-12-07 at 22:21 +0100, Tomas Vondra wrote: > > > IMO it's impossible to solve this attack within TCE, because it requires > > > ensuring consistency at the row level, but TCE

Re: Fix typos - "an" instead of "a"

2021-12-08 Thread Michael Paquier
On Thu, Dec 09, 2021 at 07:30:48AM +1100, Peter Smith wrote: > Some regex exposed a bunch of typos scattered across PG comments and docs. > > They are all of the "uses-an-instead-of-a" (or vice versa) variety. > > PSA a small patch to fix them. Good catches. - # safe: cross compilers may not

Re: A test for replay of regression tests

2021-12-08 Thread Thomas Munro
On Sun, Dec 5, 2021 at 4:16 AM Andrew Dunstan wrote: > TAP tests are passed a path to pg_regress as $ENV{PG_REGRESS}. You > should be using that. On non-MSVC, the path to a non-installed psql is > in this case "$TESTDIR/../../bin/psql" - this should work for VPATH > builds as well as non-VPATH.

Re: row filtering for logical replication

2021-12-08 Thread Peter Smith
On Thu, Sep 23, 2021 at 10:33 PM Tomas Vondra wrote: > > Hi, > > I finally had time to take a closer look at the patch again, so here's > some review comments. The thread is moving fast, so chances are some of > the comments are obsolete or were already raised in the past. > ... > 11) extra

port conflicts when running tests concurrently on windows.

2021-12-08 Thread Andres Freund
Hi, With the meson patch applied the tests on windows run concurrently by default. Unfortunately that fails semi-regularly. The reason for this basically is that windows defaults to using TCP in tests, and that the tap-test port determination is very racy: > # When selecting a port, we

Re: Use generation context to speed up tuplesorts

2021-12-08 Thread Tomas Vondra
On 12/8/21 16:51, Ronan Dunklau wrote: > Le jeudi 9 septembre 2021, 15:37:59 CET Tomas Vondra a écrit : >> And now comes the funny part - if I run it in the same backend as the >> "full" benchmark, I get roughly the same results: >> >> block_size | chunk_size | mem_allocated | alloc_ms |

Fix typos - "an" instead of "a"

2021-12-08 Thread Peter Smith
Hi. Some regex exposed a bunch of typos scattered across PG comments and docs. They are all of the "uses-an-instead-of-a" (or vice versa) variety. PSA a small patch to fix them. -- Kind Regards, Peter Smith. Fujitsu Australia v1-0001-Fix-typos-for-an-versus-a.patch Description: Binary

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

2021-12-08 Thread Neha Sharma
Hello Dilip, While testing the v7 patches, I am observing a crash with the below test case. Test case: create tablespace tab location '/test_dir'; create tablespace tab1 location '/test_dir1'; create database test tablespace tab; \c test create table t( a int PRIMARY KEY,b text); CREATE OR

Re: Cross DB query

2021-12-08 Thread David G. Johnston
On Wednesday, December 8, 2021, Marcos Pegoraro wrote: > A question I always have, and I didn´t find anybody answering it. If it´s > possible > select * from MyDB.MySchema.MyTable; > No, if you specify MyDB is must match the database you’ve chosen to log into. > Everything I found was how to

Re: speed up verifying UTF-8

2021-12-08 Thread John Naylor
It occurred to me that the DFA + ascii quick check approach could also be adapted to speed up some cases where we currently walk a string counting characters, like this snippet in text_position_get_match_pos(): /* Convert the byte position to char position. */ while (state->refpoint <

Cross DB query

2021-12-08 Thread Marcos Pegoraro
A question I always have, and I didn´t find anybody answering it. If it´s possible select * from MyDB.MySchema.MyTable; And from user point of view ... all databases are accessible for the same postgres instance, user just says connect to this or that database, why is it not possible to do select

Re: Appetite for Frama-C annotations?

2021-12-08 Thread Chapman Flack
On 12/08/21 12:13, Colin Gilbert wrote: > Hi! Thanks for the quick reply. Are you doing any of this work in a > public repository? If so, could we have a link? There is a similar > idea in Java Modelling Language. It also uses its own annotations to > describe additional requirements. Are you

Re: cutting down the TODO list thread

2021-12-08 Thread John Naylor
It's been a while, but here are a few more suggested removals/edits/additions to the TODO list. Any objections or new information, let me know: - Auto-fill the free space map by scanning the buffer cache or by checking pages written by the background writer

Re: Allow escape in application_name

2021-12-08 Thread Fujii Masao
On 2021/12/07 18:48, kuroda.hay...@fujitsu.com wrote: Yeah, I followed your suggestion. But we deiced to keep codes clean, hence I removed the if-statements. +1 because neither application_name, user_name nor database_name should be NULL for current usage. But if it's better to check

Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?

2021-12-08 Thread Bossart, Nathan
On 12/8/21, 3:29 AM, "Bharath Rupireddy" wrote: > Thanks for your thoughts. I'm fine either way, hence attaching two > patches here with and I will leave it for the committer 's choice. > 1) v1-0001-Add-DB_IN_END_OF_RECOVERY_CHECKPOINT-state-for-co.patch -- > adds new db state

Re: Readd use of TAP subtests

2021-12-08 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > The only cases where an explicit plan adds value is if you're running > tests in a loop and care about the number of iterations, or have a > callback with a test inside that you want to make sure gets called. For > these, it's better to

Re: suboverflowed subtransactions concurrency performance optimize

2021-12-08 Thread Simon Riggs
On Fri, 3 Dec 2021 at 06:27, Dilip Kumar wrote: > > On Tue, Nov 30, 2021 at 5:49 PM Simon Riggs > wrote: > > > transam.c uses a single item cache to prevent thrashing from repeated > > lookups, which reduces problems with shared access to SLRUs. > > multitrans.c also has similar. > > > > I

Re: Appetite for Frama-C annotations?

2021-12-08 Thread Chapman Flack
On 12/07/21 13:32, Colin Gilbert wrote: > I've been becoming more and more interested in learning formal methods > and wanted to find a good project to which I could contribute. Would > the development team appreciate someone adding ACSL annotations to the > codebase? My ears perked up ... I have

Re: Optionally automatically disable logical replication subscriptions on error

2021-12-08 Thread Mark Dilger
> On Dec 8, 2021, at 5:10 AM, Amit Kapila wrote: > > I think if we are really worried about transient errors then probably > the idea "disable only if the same error has occurred more than X > times" seems preferable as compared to taking a decision on which > error_codes fall in the

Re: Use generation context to speed up tuplesorts

2021-12-08 Thread Ronan Dunklau
Le jeudi 9 septembre 2021, 15:37:59 CET Tomas Vondra a écrit : > And now comes the funny part - if I run it in the same backend as the > "full" benchmark, I get roughly the same results: > > block_size | chunk_size | mem_allocated | alloc_ms | free_ms >

Re: Question on not-in and array-eq

2021-12-08 Thread David G. Johnston
On Wed, Dec 8, 2021 at 8:15 AM Zhenghua Lyu wrote: > I run the SQL without array expr in other DBs(orcale, sqlite, ...), they > all behave > the same as Postgres. > > It seems a bit confusing for me that 'not in' and 'in' the same subquery > both return 0 > rows, but the table contains data. >

Re: suboverflowed subtransactions concurrency performance optimize

2021-12-08 Thread Simon Riggs
On Wed, 1 Dec 2021 at 06:41, Andrey Borodin wrote: > > On review, I think it is also possible that we update subtrans ONLY if > > someone uses >PGPROC_MAX_CACHED_SUBXIDS. > > This would make subtrans much smaller and avoid one-entry-per-page > > which is a major source of cacheing. > > This

Re: Readd use of TAP subtests

2021-12-08 Thread Tom Lane
Andrew Dunstan writes: > On 12/8/21 09:08, Dagfinn Ilmari Mannsåker wrote: >> Either way, I think we should be switching tests to done_testing() >> whenever it would otherwise have to adjust the test count, to avoid >> having to do that again and again and again going forward. > I'm not so sure.

Re: Appetite for Frama-C annotations?

2021-12-08 Thread Tom Lane
Colin Gilbert writes: > I've been becoming more and more interested in learning formal methods > and wanted to find a good project to which I could contribute. Would > the development team appreciate someone adding ACSL annotations to the > codebase? Most likely not. It might be interesting to

Question on not-in and array-eq

2021-12-08 Thread Zhenghua Lyu
Hi, I run the following SQL in Postgres (14_STABLE), and got the results: zlyu=# create table t1(a int, b int); CREATE TABLE zlyu=# create table t2(a int, b int); CREATE TABLE zlyu=# insert into t1 values (null, 1); INSERT 0 1 zlyu=# insert into t2 values (1, 1); INSERT 0 1 zlyu=# select *

Re: Readd use of TAP subtests

2021-12-08 Thread Dagfinn Ilmari Mannsåker
Andrew Dunstan writes: > On 12/8/21 09:08, Dagfinn Ilmari Mannsåker wrote: >> >> Either way, I think we should be switching tests to done_testing() >> whenever it would otherwise have to adjust the test count, to avoid >> having to do that again and again and again going forward. >> > > I'm not

Appetite for Frama-C annotations?

2021-12-08 Thread Colin Gilbert
I've been becoming more and more interested in learning formal methods and wanted to find a good project to which I could contribute. Would the development team appreciate someone adding ACSL annotations to the codebase? Are such pull requests likely to be upstreamed? I ask this because it uses

Re: Shouldn't postgres_fdw report warning when it gives up getting result from foreign server?

2021-12-08 Thread Fujii Masao
On 2021/12/06 20:50, Bharath Rupireddy wrote: On Mon, Dec 6, 2021 at 1:47 PM Fujii Masao wrote: Yeah, I agree that's not elegant.. So I'd like to propose new patch with different design from what I proposed before. Patch attached. This patch changes pgfdw_exec_cleanup_query() so that it

Re: Readd use of TAP subtests

2021-12-08 Thread Andrew Dunstan
On 12/8/21 09:08, Dagfinn Ilmari Mannsåker wrote: > > Either way, I think we should be switching tests to done_testing() > whenever it would otherwise have to adjust the test count, to avoid > having to do that again and again and again going forward. > I'm not so sure. I don't think its

Re: Readd use of TAP subtests

2021-12-08 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: >> On 8 Dec 2021, at 14:49, Dagfinn Ilmari Mannsåker wrote: >> >> Peter Eisentraut writes: >> >>> Now that subtests in TAP are supported again, I want to correct the >>> great historical injustice of 7912f9b7dc9e2d3f6cd81892ef6aa797578e9f06 >>> and put those

Re: enable certain TAP tests for MSVC builds

2021-12-08 Thread Andrew Dunstan
On 12/8/21 03:14, Michael Paquier wrote: > On Tue, Dec 07, 2021 at 03:40:29PM -0500, Andrew Dunstan wrote: >> All done. > bowerbird is complaining here with the tests of pg_basebackup: > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird=2021-12-08%2004%3A52%3A27 > > tar: Cannot

Re: Readd use of TAP subtests

2021-12-08 Thread Andrew Dunstan
On 12/8/21 08:26, Peter Eisentraut wrote: > > Now that subtests in TAP are supported again, I want to correct the > great historical injustice of 7912f9b7dc9e2d3f6cd81892ef6aa797578e9f06 > and put those subtests back. > > Much more work like this is possible, of course.  I just wanted to get >

Re: Readd use of TAP subtests

2021-12-08 Thread Daniel Gustafsson
> On 8 Dec 2021, at 14:49, Dagfinn Ilmari Mannsåker wrote: > > Peter Eisentraut writes: > >> Now that subtests in TAP are supported again, I want to correct the >> great historical injustice of 7912f9b7dc9e2d3f6cd81892ef6aa797578e9f06 >> and put those subtests back. > > The updated

Re: Readd use of TAP subtests

2021-12-08 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > Now that subtests in TAP are supported again, I want to correct the > great historical injustice of 7912f9b7dc9e2d3f6cd81892ef6aa797578e9f06 > and put those subtests back. The updated Test::More version requirement also gives us done_testing() (added in 0.88), which

Readd use of TAP subtests

2021-12-08 Thread Peter Eisentraut
Now that subtests in TAP are supported again, I want to correct the great historical injustice of 7912f9b7dc9e2d3f6cd81892ef6aa797578e9f06 and put those subtests back. Much more work like this is possible, of course. I just wanted to get this out of the way since the code was already

Re: Optionally automatically disable logical replication subscriptions on error

2021-12-08 Thread Amit Kapila
On Tue, Dec 7, 2021 at 5:52 AM Greg Nancarrow wrote: > > On Tue, Dec 7, 2021 at 3:06 AM Mark Dilger > wrote: > > > > My concern about disabling a subscription in response to *any* error is > > that people may find the feature does more harm than good. Disabling the > > subscription in

Re: GUC flags

2021-12-08 Thread Peter Eisentraut
On 08.12.21 07:27, Michael Paquier wrote: I saw that Tom updated it within the last 12 months, which I took to mean that it was still being maintained. But I'm okay with removing it. Yes, I saw that as of bf8a662. With 42 incorrect reports, I still see more evidence with removing it. Before

Re: Is it correct to update db state in control file as "shutting down" during end-of-recovery checkpoint?

2021-12-08 Thread Bharath Rupireddy
On Wed, Dec 8, 2021 at 1:05 PM Kyotaro Horiguchi wrote: > > At Wed, 8 Dec 2021 11:47:30 +0530, Bharath Rupireddy > wrote in > > On Wed, Dec 8, 2021 at 10:59 AM Bossart, Nathan wrote: > > > >> Another option we might want to consider is to just skip updating the > > > >> state entirely for

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Bharath Rupireddy
On Wed, Dec 8, 2021 at 2:08 PM Michael Paquier wrote: > > Do you want me to add "received from stream" in general? > > "from stream" would be fine, IMHO. Done in the attached v5 patch. > > How about we invent a new GUC log_recovery, with default set to false, > > similar to log_checkpoints?

Re: Skipping logical replication transactions on subscriber side

2021-12-08 Thread Masahiko Sawada
On Wed, Dec 8, 2021 at 4:05 PM Masahiko Sawada wrote: > > Okay, I understand those cases but note always checking if the > > prepared xact exists during commit prepared has a cost and that is why > > we avoided it at the first place. BTW what costs were we concerned about? Looking at

Re: row filtering for logical replication

2021-12-08 Thread Ashutosh Bapat
On Wed, Dec 8, 2021 at 10:54 AM Amit Kapila wrote: > > Do we really need to perform a separate fetch for this? In > get_rel_sync_entry(), we already have this information, can't we > someway stash that in the corresponding RelationSyncEntry so that same > can be used later for row filtering. > >

Re: Skipping logical replication transactions on subscriber side

2021-12-08 Thread Masahiko Sawada
On Wed, Dec 8, 2021 at 5:54 PM Amit Kapila wrote: > > On Wed, Dec 8, 2021 at 12:36 PM Masahiko Sawada wrote: > > > > On Wed, Dec 8, 2021 at 3:50 PM Amit Kapila wrote: > > > > > > On Wed, Dec 8, 2021 at 11:48 AM Masahiko Sawada > > > wrote: > > > > > > > > > > > > > > Can't we think of just

Re: Fix a bug in DecodeAbort() and improve input data check on subscriber.

2021-12-08 Thread Amit Kapila
On Tue, Dec 7, 2021 at 6:06 AM Masahiko Sawada wrote: > > Hi all, > > While updating the patch I recently posted[1] to make pg_waldump > report replication origin ID, LSN, and timestamp, I found a bug that > replication origin timestamp is not set in ROLLBACK PREPARED case. > Commit 8bdb1332eb5

Re: [PATCH] Partial foreign key updates in referential integrity triggers

2021-12-08 Thread Peter Eisentraut
On 02.12.21 01:17, Paul Martinez wrote: Regarding that specific example, in a production scenario, yes, the DELETE command should reference both columns. And if used for documentation both columns should be referenced for clarity/correctness. Ok, thanks. I have updated your example

Re: pg_get_publication_tables() output duplicate relid

2021-12-08 Thread Amit Kapila
On Thu, Dec 2, 2021 at 8:42 AM Amit Langote wrote: > > On Thu, Dec 2, 2021 at 9:44 houzj.f...@fujitsu.com > wrote: > > On Wed, Dec 1, 2021 3:01 PM Amit Kapila wrote: > > > > > On Mon, Nov 22, 2021 at 12:55 PM Amit Langote > > > > > wrote: > > > > > > On second thought, I agree that

Re: Alter all tables in schema owner fix

2021-12-08 Thread Amit Kapila
On Tue, Dec 7, 2021 at 11:20 PM Bossart, Nathan wrote: > > On 12/7/21, 2:47 AM, "Greg Nancarrow" wrote: > > On Tue, Dec 7, 2021 at 9:01 PM Amit Kapila wrote: > >> > >> Thanks, the patch looks mostly good to me. I have slightly modified it > >> to incorporate one of Michael's suggestions, ran

Re: logical decoding and replication of sequences

2021-12-08 Thread Peter Eisentraut
On 08.12.21 01:23, Tomas Vondra wrote: The argument "create" for fill_seq_with_data() is always true (and patch 0002 removes it).  So I'm not sure if it's needed.  If it is, it should be documented somewhere. Good point. I think it could be removed, but IIRC it'll be needed when adding

Re: Skipping logical replication transactions on subscriber side

2021-12-08 Thread Amit Kapila
On Wed, Dec 8, 2021 at 12:36 PM Masahiko Sawada wrote: > > On Wed, Dec 8, 2021 at 3:50 PM Amit Kapila wrote: > > > > On Wed, Dec 8, 2021 at 11:48 AM Masahiko Sawada > > wrote: > > > > > > > > > > > Can't we think of just allowing prepare in this case and updating the > > > > skip_xid only at

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Michael Paquier
On Wed, Dec 08, 2021 at 02:00:12PM +0530, Bharath Rupireddy wrote: > For standby, "received from primary" makes sense. For cascading > standby too it makes sense because the standby still acts as primary > for cascading standby, no? And we don't distinguish any other existing > messages for a

Re: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display

2021-12-08 Thread Bharath Rupireddy
On Wed, Dec 8, 2021 at 12:52 PM Michael Paquier wrote: > > On Wed, Dec 08, 2021 at 10:47:57AM +0530, Bharath Rupireddy wrote: > > Thanks for taking a look at the patch. How about the attached v4? > > > > I added a CF entry - https://commitfest.postgresql.org/36/3443/ > > + else if (source

Re: enable certain TAP tests for MSVC builds

2021-12-08 Thread Michael Paquier
On Tue, Dec 07, 2021 at 03:40:29PM -0500, Andrew Dunstan wrote: > All done. bowerbird is complaining here with the tests of pg_basebackup: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=bowerbird=2021-12-08%2004%3A52%3A27 tar: Cannot execute remote shell: No such file or directory tar:

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

2021-12-08 Thread Masahiko Sawada
On Wed, Dec 8, 2021 at 4:31 PM Michael Paquier wrote: > > On Mon, Dec 06, 2021 at 11:24:09PM +0900, Masahiko Sawada wrote: > > On Mon, Dec 6, 2021 at 5:09 PM Michael Paquier wrote: > >> Shouldn't you check for parsed.origin_lsn instead? The replication > >> origin is stored there as far as I