pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix minor bug in logical-replication walsender shutdown
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/38ddeab13b4b86161799c097dea4bdf9be60924a

Modified Files
--------------
src/backend/replication/walsender.c | 45 ++++++++++++++-----------------------
1 file changed, 17 insertions(+), 28 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1391c13ce3b898caad07261223bb75f8390c45e2

Modified Files
--------------
src/backend/replication/walsender.c | 45 ++++++++++++++-----------------------
1 file changed, 17 insertions(+), 28 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/45e4067c05b116bf2b22245361e748939778cc0b

Modified Files
--------------
src/backend/replication/walsender.c | 45 ++++++++++++++-----------------------
1 file changed, 17 insertions(+), 28 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0d9fcbada99213f21c67ce1b96e4022ae2d8c33f

Modified Files
--------------
src/backend/replication/walsender.c | 45 ++++++++++++++-----------------------
1 file changed, 17 insertions(+), 28 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5f038991ecf9ad895c6f1f3a33879da3471d1f90

Modified Files
--------------
src/backend/replication/walsender.c | 47 ++++++++++++++-----------------------
1 file changed, 18 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/b2ab06e0251a6733ea07d3a010e4a868b0595fce

Modified Files
--------------
src/backend/replication/walsender.c | 47 ++++++++++++++-----------------------
1 file changed, 18 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread

* pgsql: Fix minor bug in logical-replication walsender shutdown
@ 2019-10-17 13:12 Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Alvaro Herrera @ 2019-10-17 13:12 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix minor bug in logical-replication walsender shutdown

Logical walsender should exit when it catches up with sending WAL during
shutdown; but there was a rare corner case when it failed to because of
a race condition that puts it back to wait for more WAL instead -- but
since there wasn't any, it'd not shut down immediately.  It would only
continue the shutdown when wal_sender_timeout terminates the sleep,
which causes annoying waits during shutdown procedure.  Restructure the
code so that we no longer forget to set WalSndCaughtUp in that case.

This was an oversight in commit c6c333436.

Backpatch all the way down to 9.4.

Author: Craig Ringer, Álvaro Herrera
Discussion: https://postgr.es/m/CAMsr+YEuz4XwZX_QmnX_-2530XhyAmnK=zCmicEnq1vLr0aZ-g@mail.gmail.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/abd5071d216336e1d6451f009fce6d170c61673e

Modified Files
--------------
src/backend/replication/walsender.c | 47 ++++++++++++++-----------------------
1 file changed, 18 insertions(+), 29 deletions(-)



^ permalink  raw  reply  [nested|flat] 7+ messages in thread


end of thread, other threads:[~2019-10-17 13:12 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown Alvaro Herrera <alvherre@alvh.no-ip.org>
2019-10-17 13:12 pgsql: Fix minor bug in logical-replication walsender shutdown 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