pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Allow replication slots to be dropped in single-user mode 3+ messages / 1 participants [nested] [flat]
* pgsql: Allow replication slots to be dropped in single-user mode @ 2018-07-06 20:40 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-07-06 20:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow replication slots to be dropped in single-user mode Starting with commit 9915de6c1cb2, replication slot drop uses a condition variable sleep to wait until the current user of the slot goes away. This is more user friendly than the previous behavior of erroring out if the slot is in use, but it fails with a not-for-user-consumption error message in single-user mode; plus, if you're using single-user mode because you don't want to start the server in the regular mode (say, disk is full and WAL won't recycle because of the slot), it's inconvenient. Fix by skipping the cond variable sleep in single-user mode, since there can't be anybody to wait for anyway. Reported-by: tushar <tushar.ahuja@enterprisedb.com> Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/3b2f809f-326c-38dd-7a9e-897f957a4eb1@enterprisedb.com Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/0ce5cf2ef24f638ff05569d027135fa1c7683a71 Modified Files -------------- src/backend/replication/slot.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Allow replication slots to be dropped in single-user mode @ 2018-07-06 20:40 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-07-06 20:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow replication slots to be dropped in single-user mode Starting with commit 9915de6c1cb2, replication slot drop uses a condition variable sleep to wait until the current user of the slot goes away. This is more user friendly than the previous behavior of erroring out if the slot is in use, but it fails with a not-for-user-consumption error message in single-user mode; plus, if you're using single-user mode because you don't want to start the server in the regular mode (say, disk is full and WAL won't recycle because of the slot), it's inconvenient. Fix by skipping the cond variable sleep in single-user mode, since there can't be anybody to wait for anyway. Reported-by: tushar <tushar.ahuja@enterprisedb.com> Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/3b2f809f-326c-38dd-7a9e-897f957a4eb1@enterprisedb.com Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ef64645950163e472729eef3af22bfafc477b040 Modified Files -------------- src/backend/replication/slot.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
* pgsql: Allow replication slots to be dropped in single-user mode @ 2018-07-06 20:40 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 3+ messages in thread From: Alvaro Herrera @ 2018-07-06 20:40 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Allow replication slots to be dropped in single-user mode Starting with commit 9915de6c1cb2, replication slot drop uses a condition variable sleep to wait until the current user of the slot goes away. This is more user friendly than the previous behavior of erroring out if the slot is in use, but it fails with a not-for-user-consumption error message in single-user mode; plus, if you're using single-user mode because you don't want to start the server in the regular mode (say, disk is full and WAL won't recycle because of the slot), it's inconvenient. Fix by skipping the cond variable sleep in single-user mode, since there can't be anybody to wait for anyway. Reported-by: tushar <tushar.ahuja@enterprisedb.com> Author: Álvaro Herrera <alvherre@alvh.no-ip.org> Discussion: https://postgr.es/m/3b2f809f-326c-38dd-7a9e-897f957a4eb1@enterprisedb.com Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a1f680d962ffdd563eee7665da5b3b9967a6070f Modified Files -------------- src/backend/replication/slot.c | 28 ++++++++++++++++++---------- 1 file changed, 18 insertions(+), 10 deletions(-) ^ permalink raw reply [nested|flat] 3+ messages in thread
end of thread, other threads:[~2018-07-06 20:40 UTC | newest] Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2018-07-06 20:40 pgsql: Allow replication slots to be dropped in single-user mode Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-06 20:40 pgsql: Allow replication slots to be dropped in single-user mode Alvaro Herrera <alvherre@alvh.no-ip.org> 2018-07-06 20:40 pgsql: Allow replication slots to be dropped in single-user mode Alvaro Herrera <alvherre@alvh.no-ip.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