pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Remove files signaling a standby promotion request at postmaster 6+ messages / 1 participants [nested] [flat]
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ REL9_5_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/65f37b3e9b0aea59cc98a2e23f45bb8fb6a56395 Modified Files -------------- src/backend/access/transam/xlog.c | 10 ++++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 32 insertions(+) -- 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] 6+ messages in thread
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ REL9_2_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/67518a1415691f37e8bd0e93e01282f1d461ffa9 Modified Files -------------- src/backend/access/transam/xlog.c | 9 +++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 31 insertions(+) -- 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] 6+ messages in thread
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/96f6a0cb41ee06673960019f0026b1b0fd1e644d Modified Files -------------- src/backend/access/transam/xlog.c | 10 ++++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 32 insertions(+) -- 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] 6+ messages in thread
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ REL9_3_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/47387732ba28e940e27f3f82c657d11bab628e1a Modified Files -------------- src/backend/access/transam/xlog.c | 10 ++++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 32 insertions(+) -- 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] 6+ messages in thread
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/60fe73b79ce8a65ee4eda34a2f4f204a95081603 Modified Files -------------- src/backend/access/transam/xlog.c | 9 +++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 31 insertions(+) -- 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] 6+ messages in thread
* pgsql: Remove files signaling a standby promotion request at postmaster @ 2015-09-09 14:06 Fujii Masao <fujii@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: Fujii Masao @ 2015-09-09 14:06 UTC (permalink / raw) To: pgsql-committers Remove files signaling a standby promotion request at postmaster startup This commit makes postmaster forcibly remove the files signaling a standby promotion request. Otherwise, the existence of those files can trigger a promotion too early, whether a user wants that or not. This removal of files is usually unnecessary because they can exist only during a few moments during a standby promotion. However there is a race condition: if pg_ctl promote is executed and creates the files during a promotion, the files can stay around even after the server is brought up to new master. Then, if new standby starts by using the backup taken from that master, the files can exist at the server startup and should be removed in order to avoid an unexpected promotion. Back-patch to 9.1 where promote signal file was introduced. Problem reported by Feike Steenbergen. Original patch by Michael Paquier, modified by me. Discussion: 20150528100705.4686.91426@wrigleys.postgresql.org Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/2244c0652d2c20cd2557fb1940458b5f21cd48e0 Modified Files -------------- src/backend/access/transam/xlog.c | 10 ++++++++++ src/backend/postmaster/postmaster.c | 21 +++++++++++++++++++++ src/include/access/xlog.h | 1 + 3 files changed, 32 insertions(+) -- 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] 6+ messages in thread
end of thread, other threads:[~2015-09-09 14:06 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org> 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org> 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org> 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org> 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org> 2015-09-09 14:06 pgsql: Remove files signaling a standby promotion request at postmaster Fujii Masao <fujii@postgresql.org>
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