Re: pgsql: postgres_fdw: Fix handling of pending asynchronous requests.

2021-08-01 Thread Etsuro Fujita
On Sun, Aug 1, 2021 at 1:41 AM Tom Lane  wrote:
> I tried this patch on a spare machine that seems prone to showing
> the failure: on HEAD, postgres_fdw's installcheck failed 3 times
> in 4 attempts.  With the patch, it's gotten through 23 consecutive
> tries without a failure.  So this is at least way better ...

I retried to reproduce the failure in my environment but I couldn’t.
But I plan on applying the patch tomorrow.

Thanks for the testing!

Best regards,
Etsuro Fujita




Re: pgsql: Enable TAP tests of pg_receivewal for ZLIB on Windows, take thre

2021-08-01 Thread Andrew Dunstan


On 7/31/21 11:32 PM, Michael Paquier wrote:
> On Sat, Jul 31, 2021 at 07:16:22AM -0400, Andrew Dunstan wrote:
>> And now jacana is unhappy. I'll get it fixed shortly. If it ends up that
>> we have somehow found a situation where Msys/Mingw and MSVC can no
>> longer share a zlib implementation I'm going to be unhappy too.
> In the worse case, could it be possible to do things so as we skip
> tests only with $is_msys2 or a new flag?  It would be really nice to
> keep some coverage here for some of the Windows builds.



It won't be necessary.


cheers


andrew


--
Andrew Dunstan
EDB: https://www.enterprisedb.com





pgsql: Silence perl warning about uninitialized value

2021-08-01 Thread Andrew Dunstan
Silence perl warning about uninitialized value

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/0d1401931868e03342ed4689b5af2522eb40f750

Modified Files
--
src/test/modules/ssl_passphrase_callback/t/001_testfunc.pl | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)



pgsql: Fix test failure in 021_twophase.pl.

2021-08-01 Thread Amit Kapila
Fix test failure in 021_twophase.pl.

The test is expecting two prepared transactions corresponding to two
subscriptions but it waits to catch up for just one subscription. Fix it
by allowing to wait for both subscriptions.

Reported-by: Michael Paquier, as per buildfarm
Author: Ajin Cherian
Reviewed-By: Amit Kapila, Vignesh C, Peter Smith
Discussion: 
https://postgr.es/m/CAA4eK1+_0iNQ8Z=KVTjmmAqNX-hyv+1+fnZ-Yx8CVP=uace...@mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/eaf5321c352478266cebe2aa50ea4c34a8fdd2c7

Modified Files
--
src/test/subscription/t/021_twophase.pl | 2 ++
1 file changed, 2 insertions(+)



pgsql: Fix oversight in commit 1ec7fca8592178281cd5cdada0f27a340fb813fc

2021-08-01 Thread Etsuro Fujita
Fix oversight in commit 1ec7fca8592178281cd5cdada0f27a340fb813fc.

I failed to account for the possibility that when
ExecAppendAsyncEventWait() notifies multiple async-capable nodes using
postgres_fdw, a preceding node might invoke process_pending_request() to
process a pending asynchronous request made by a succeeding node.  In
that case the succeeding node should produce a tuple to return to the
parent Append node from tuples fetched by process_pending_request() when
notified.  Repair.

Per buildfarm via Michael Paquier.  Back-patch to v14, like the previous
commit.

Thanks to Tom Lane for testing.

Discussion: https://postgr.es/m/YQP0UPT8KmPiHTMs%40paquier.xyz

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/a8ed9bd59d48c13da50ed2358911721b2baf1de3

Modified Files
--
contrib/postgres_fdw/postgres_fdw.c | 22 ++
src/backend/executor/nodeAppend.c   | 22 --
2 files changed, 30 insertions(+), 14 deletions(-)



pgsql: Fix oversight in commit 1ec7fca8592178281cd5cdada0f27a340fb813fc

2021-08-01 Thread Etsuro Fujita
Fix oversight in commit 1ec7fca8592178281cd5cdada0f27a340fb813fc.

I failed to account for the possibility that when
ExecAppendAsyncEventWait() notifies multiple async-capable nodes using
postgres_fdw, a preceding node might invoke process_pending_request() to
process a pending asynchronous request made by a succeeding node.  In
that case the succeeding node should produce a tuple to return to the
parent Append node from tuples fetched by process_pending_request() when
notified.  Repair.

Per buildfarm via Michael Paquier.  Back-patch to v14, like the previous
commit.

Thanks to Tom Lane for testing.

Discussion: https://postgr.es/m/YQP0UPT8KmPiHTMs%40paquier.xyz

Branch
--
REL_14_STABLE

Details
---
https://git.postgresql.org/pg/commitdiff/fb234086fe81fb1848934b6e1f6382611fc9ad4f

Modified Files
--
contrib/postgres_fdw/postgres_fdw.c | 22 ++
src/backend/executor/nodeAppend.c   | 22 --
2 files changed, 30 insertions(+), 14 deletions(-)



Re: pgsql: postgres_fdw: Fix handling of pending asynchronous requests.

2021-08-01 Thread Etsuro Fujita
On Sun, Aug 1, 2021 at 4:59 PM Etsuro Fujita  wrote:
> But I plan on applying the patch tomorrow.

Done, in hopes of making the buildfarm back to green.

Best regards,
Etsuro Fujita




pgsql: Remove misplaced comment from AuxiliaryProcessMain().

2021-08-01 Thread Andres Freund
Remove misplaced comment from AuxiliaryProcessMain().

The comment didn't make sense anymore since at least 626eb021988. As it didn't
actually explain anything anyway, just remove it.

Author: Andres Freund 

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/8b1de88b7ce9fe0458d3950121a797fd3d988f6c

Modified Files
--
src/backend/bootstrap/bootstrap.c | 3 ---
1 file changed, 3 deletions(-)



pgsql: Run checkpointer and bgwriter in crash recovery.

2021-08-01 Thread Thomas Munro
Run checkpointer and bgwriter in crash recovery.

Start up the checkpointer and bgwriter during crash recovery (except in
--single mode), as we do for replication.  This wasn't done back in
commit cdd46c76 out of caution.  Now it seems like a better idea to make
the environment as similar as possible in both cases.  There may also be
some performance advantages.

Reviewed-by: Robert Haas 
Reviewed-by: Aleksander Alekseev 
Tested-by: Jakub Wartak 
Discussion: 
https://postgr.es/m/CA%2BhUKGJ8NRsqgkZEnsnRc2MFROBV-jCnacbYvtpptK2A9YYp9Q%40mail.gmail.com

Branch
--
master

Details
---
https://git.postgresql.org/pg/commitdiff/7ff23c6d277d1d90478a51f0dd81414d343f3850

Modified Files
--
src/backend/access/transam/xlog.c | 33 -
src/backend/postmaster/bgwriter.c |  3 ---
src/backend/postmaster/checkpointer.c |  3 ---
src/backend/postmaster/postmaster.c   | 17 +++--
src/backend/storage/sync/sync.c   | 30 +++---
src/include/storage/sync.h|  1 -
6 files changed, 22 insertions(+), 65 deletions(-)