From: Petr Jelinek <petr.jelinek@2ndquadrant.com>
To: Andres Freund <andres@anarazel.de>
To: pgsql-hackers@postgresql.org
To: Petr Jelinek <petr@2ndquadrant.com>
To: Peter Eisentraut <peter_e@gmx.net>
Subject: Re: walsender & parallelism
Date: Fri, 21 Apr 2017 04:20:26 +0200
Message-ID: <e41081d2-080f-b612-2084-549fa652fae2@2ndquadrant.com> (raw)
In-Reply-To: <20170421014030.fdzvvvbrz4nckrow@alap3.anarazel.de>
References: <20170421014030.fdzvvvbrz4nckrow@alap3.anarazel.de>
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-hackers>
On 21/04/17 03:40, Andres Freund wrote:
>
> Since [1] walsender (not receiver as commit message says) can execute
> SQL queries. While doing some testing of [2] I noticed that SQL queries
> in walsender get stuck if parallelism is used - I have not investigated
> why that is yet, but it surely is an issue. On first blush I'd suspect
> that some signalling is not wired up correctly (cf. am_walsender branches
> in PostgresMain() and such).
Looks like SIGUSR1 being different is problem here - it's normally used
to . I also noticed that we don't handle SIGINT (query cancel).
I'll write proper patch but can you try to just use
procsignal_sigusr1_handler for SIGUSR1 in walsender.c to see if it fixes
the issue?
BTW while looking at the code, I don't understand why we call
latch_sigusr1_handler after calling SetLatch(MyLatch), shouldn't just
the SetLatch be enough (they both end up calling sendSelfPipeByte()
eventually)?
--
Petr Jelinek http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-hackers@postgresql.org
Cc: petr.jelinek@2ndquadrant.com, andres@anarazel.de, petr@2ndquadrant.com, peter_e@gmx.net
Subject: Re: walsender & parallelism
In-Reply-To: <e41081d2-080f-b612-2084-549fa652fae2@2ndquadrant.com>
References: <20170421014030.fdzvvvbrz4nckrow@alap3.anarazel.de> <e41081d2-080f-b612-2084-549fa652fae2@2ndquadrant.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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