Re: Sync Rep and shutdown Re: Sync Rep v19
Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
From: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Simon Riggs <simon@2ndquadrant.com>, Fujii Masao <masao.fujii@gmail.com>, Yeb Havinga <yebhavinga@gmail.com>, Jaime Casanova <jaime@2ndquadrant.com>, PostgreSQL-development <pgsql-hackers@postgresql.org>
Date: 2011-03-17T12:24:43Z
Lists: pgsql-hackers
Commits
Same data as JSON:
GET /api/v1/messages/:b64id/commits
the thread's linked commits as JSON, with link sources.
API reference →
-
Document guc context values, and reference them from the config doc section.
- e148443ddd95 9.1.0 cited
On 16.03.2011 19:35, Robert Haas wrote: > 3. If synchronous_standby_names is changed to '' by editing > postgresql.conf and issuing pg_ctl reload, then cancel all waits in > progress and wake everybody up. As I mentioned before, reloading the > config file from within the waiting backend (which can't safely throw > an error) seems risky, so what I did instead is made WAL writer > responsible for handling this. Nobody's allowed to wait for sync rep > unless a global shared memory flag is set, and the WAL writer process > is responsible for setting and clearing this flag when the config file > is reloaded. This has basically no performance cost; WAL writer only > ever does any extra work at all with this code when it receives a > SIGHUP, and even then the work is trivial except in the case where > synchronous_standby_names has changed from empty to non-empty or visca > versa. The advantage of putting this in WAL writer rather than, say, > bgwriter is that WAL writer doesn't have nearly as many jobs to do and > they don't involve nearly as much I/O, so the chances of a long delay > due to the process being busy are much less. Hmm, so setting synchronous_standby_names to '' takes effect immediately, but other changes to it don't apply to already-blocked commits. That seems a bit inconsistent. Perhaps walwriter should store the parsed list of standby-names in shared memory, not just a boolean. +1 otherwise. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com