pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Fix signal handling in logical replication workers
5+ messages / 4 participants
[nested] [flat]
* pgsql: Fix signal handling in logical replication workers
@ 2017-06-02 18:51 Peter Eisentraut <peter_e@gmx.net>
2017-06-02 23:04 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Peter Eisentraut @ 2017-06-02 18:51 UTC (permalink / raw)
To: pgsql-committers
Fix signal handling in logical replication workers
The logical replication worker processes now use the normal die()
handler for SIGTERM and CHECK_FOR_INTERRUPTS() instead of custom code.
One problem before was that the apply worker would not exit promptly
when a subscription was dropped, which could lead to deadlocks.
Author: Petr Jelinek <petr.jelinek@2ndquadrant.com>
Reported-by: Masahiko Sawada <sawada.mshk@gmail.com>
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/9fcf670c2efdf31233d429f557ab77937f0f1e6a
Modified Files
--------------
src/backend/replication/logical/launcher.c | 16 +++++++-------
src/backend/replication/logical/tablesync.c | 10 ++++-----
src/backend/replication/logical/worker.c | 34 ++++++++++++++++++++++++++---
src/backend/tcop/postgres.c | 5 +++++
src/include/replication/logicalworker.h | 2 ++
src/include/replication/worker_internal.h | 4 ----
6 files changed, 50 insertions(+), 21 deletions(-)
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix signal handling in logical replication workers
2017-06-02 18:51 pgsql: Fix signal handling in logical replication workers Peter Eisentraut <peter_e@gmx.net>
@ 2017-06-02 23:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 00:59 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2017-06-02 23:04 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers
Peter Eisentraut <peter_e@gmx.net> writes:
> Fix signal handling in logical replication workers
It looks like this broke buildfarm member nightjar.
Not clear why - I don't see anything especially platform-specific
in the patch.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix signal handling in logical replication workers
2017-06-02 18:51 pgsql: Fix signal handling in logical replication workers Peter Eisentraut <peter_e@gmx.net>
2017-06-02 23:04 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-06-03 00:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 01:13 ` Re: pgsql: Fix signal handling in logical replication workers Petr Jelinek <petr.jelinek@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Tom Lane @ 2017-06-03 00:59 UTC (permalink / raw)
To: Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers; Andrew Dunstan <andrew@dunslane.net>
I wrote:
> Peter Eisentraut <peter_e@gmx.net> writes:
>> Fix signal handling in logical replication workers
> It looks like this broke buildfarm member nightjar.
> Not clear why - I don't see anything especially platform-specific
> in the patch.
To muddy the waters further, I tried to duplicate the failure on
FreeBSD 11.0/x86_64, and it seems to pass just fine. Maybe Andrew
can look into why nightjar is failing.
regards, tom lane
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix signal handling in logical replication workers
2017-06-02 18:51 pgsql: Fix signal handling in logical replication workers Peter Eisentraut <peter_e@gmx.net>
2017-06-02 23:04 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 00:59 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
@ 2017-06-03 01:13 ` Petr Jelinek <petr.jelinek@2ndquadrant.com>
2017-06-05 12:27 ` Re: pgsql: Fix signal handling in logical replication workers Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 1 reply; 5+ messages in thread
From: Petr Jelinek @ 2017-06-03 01:13 UTC (permalink / raw)
To: Tom Lane <tgl@sss.pgh.pa.us>; Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers; Andrew Dunstan <andrew@dunslane.net>
On 03/06/17 02:59, Tom Lane wrote:
> I wrote:
>> Peter Eisentraut <peter_e@gmx.net> writes:
>>> Fix signal handling in logical replication workers
>
>> It looks like this broke buildfarm member nightjar.
>> Not clear why - I don't see anything especially platform-specific
>> in the patch.
>
> To muddy the waters further, I tried to duplicate the failure on
> FreeBSD 11.0/x86_64, and it seems to pass just fine. Maybe Andrew
> can look into why nightjar is failing.
>
There is still one locking patch pending (well pending to be written), I
would not be surprised if there is race condition in shutdown somewhere
before that's done.
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
* Re: pgsql: Fix signal handling in logical replication workers
2017-06-02 18:51 pgsql: Fix signal handling in logical replication workers Peter Eisentraut <peter_e@gmx.net>
2017-06-02 23:04 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 00:59 ` Re: pgsql: Fix signal handling in logical replication workers Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 01:13 ` Re: pgsql: Fix signal handling in logical replication workers Petr Jelinek <petr.jelinek@2ndquadrant.com>
@ 2017-06-05 12:27 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 0 replies; 5+ messages in thread
From: Andrew Dunstan @ 2017-06-05 12:27 UTC (permalink / raw)
To: Petr Jelinek <petr.jelinek@2ndquadrant.com>; Tom Lane <tgl@sss.pgh.pa.us>; Peter Eisentraut <peter_e@gmx.net>; +Cc: pgsql-committers
On 06/02/2017 09:13 PM, Petr Jelinek wrote:
> On 03/06/17 02:59, Tom Lane wrote:
>> I wrote:
>>> Peter Eisentraut <peter_e@gmx.net> writes:
>>>> Fix signal handling in logical replication workers
>>> It looks like this broke buildfarm member nightjar.
>>> Not clear why - I don't see anything especially platform-specific
>>> in the patch.
>> To muddy the waters further, I tried to duplicate the failure on
>> FreeBSD 11.0/x86_64, and it seems to pass just fine. Maybe Andrew
>> can look into why nightjar is failing.
>>
> There is still one locking patch pending (well pending to be written), I
> would not be surprised if there is race condition in shutdown somewhere
> before that's done.
>
nightjar has been having intermittent failures on the subscription tests
for some time. See
<https://buildfarm.postgresql.org/cgi-bin/show_history.pl?nm=nightjar&br=HEAD;.
It's only been running the tests for about 53 days.
I'm prepared to give any help needed, including access to nightjar if
required.
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers
^ permalink raw reply [nested|flat] 5+ messages in thread
end of thread, other threads:[~2017-06-05 12:27 UTC | newest]
Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-02 18:51 pgsql: Fix signal handling in logical replication workers Peter Eisentraut <peter_e@gmx.net>
2017-06-02 23:04 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 00:59 ` Tom Lane <tgl@sss.pgh.pa.us>
2017-06-03 01:13 ` Petr Jelinek <petr.jelinek@2ndquadrant.com>
2017-06-05 12:27 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox