Skip site navigation (1) Skip section navigation (2)

Re: pgsql: Use the regular main processing loop also in walsenders.

From: Thom Brown <thom(at)linux(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Use the regular main processing loop also in walsenders.
Date: 2012-10-06 21:52:18
Message-ID: CAA-aLv7KBrNXpvHknyb2CP-U7oQVjyY=hJQwRRTNOZDUfDmk-w@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-committers
On 5 October 2012 15:26, Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi> wrote:
> Use the regular main processing loop also in walsenders.
>
> The regular backend's main loop handles signal handling and error recovery
> better than the current WAL sender command loop does. For example, if the
> client hangs and a SIGTERM is received before starting streaming, the
> walsender will now terminate immediately, rather than hang until the
> connection times out.

This commit seems to have broken the WAL sender in at least one
scenario.  I have a primary and 2 standbys, standby 1 receiving WAL
stream from the primary, and standby 2 receiving WAL stream from
standby 1 (chain configuration).  If I attempt to restart standby 1,
it hangs and the WAL sender process on standby 1 uses 100% CPU.

The following error is logged too:
FATAL:  terminating walreceiver process due to administrator command

I can shut down standby 1 without issue only if I shut down standby 2 before it.
-- 
Thom


In response to

Responses

pgsql-committers by date

Next:From: Tatsuo IshiiDate: 2012-10-07 00:05:12
Subject: pgsql: Add API for 64-bit large object access. Now users can access up
Previous:From: Peter EisentrautDate: 2012-10-06 01:22:11
Subject: pgsql: Improve LDAP authentication documentation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group