pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Advance old-segment horizon properly after slot invalidation
3+ messages / 1 participants
[nested] [flat]

* pgsql: Advance old-segment horizon properly after slot invalidation
@ 2021-07-16 16:10  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2021-07-16 16:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Advance old-segment horizon properly after slot invalidation

When some slots are invalidated due to the max_slot_wal_keep_size limit,
the old segment horizon should move forward to stay within the limit.
However, in commit c6550776394e we forgot to call KeepLogSeg again to
recompute the horizon after invalidating replication slots.  In cases
where other slots remained, the limits would be recomputed eventually
for other reasons, but if all slots were invalidated, the limits would
not move at all afterwards.  Repair.

Backpatch to 13 where the feature was introduced.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Marcin Krupowicz <mk@071.ovh>
Discussion: https://postgr.es/m/17103-004130e8f27782c9@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/866237a6fa01a128325df41ad39b41ea3363c9a9

Modified Files
--------------
src/backend/access/transam/xlog.c         | 26 +++++++++++++++++++++++--
src/backend/replication/slot.c            | 26 ++++++++++++++++++++++---
src/include/replication/slot.h            |  2 +-
src/test/recovery/t/019_replslot_limit.pl | 32 +++++++++++++++++++++++++------
4 files changed, 74 insertions(+), 12 deletions(-)



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

* pgsql: Advance old-segment horizon properly after slot invalidation
@ 2021-07-16 16:10  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2021-07-16 16:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Advance old-segment horizon properly after slot invalidation

When some slots are invalidated due to the max_slot_wal_keep_size limit,
the old segment horizon should move forward to stay within the limit.
However, in commit c6550776394e we forgot to call KeepLogSeg again to
recompute the horizon after invalidating replication slots.  In cases
where other slots remained, the limits would be recomputed eventually
for other reasons, but if all slots were invalidated, the limits would
not move at all afterwards.  Repair.

Backpatch to 13 where the feature was introduced.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Marcin Krupowicz <mk@071.ovh>
Discussion: https://postgr.es/m/17103-004130e8f27782c9@postgresql.org

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/backend/access/transam/xlog.c         | 26 +++++++++++++++++++++++--
src/backend/replication/slot.c            | 26 ++++++++++++++++++++++---
src/include/replication/slot.h            |  2 +-
src/test/recovery/t/019_replslot_limit.pl | 32 +++++++++++++++++++++++++------
4 files changed, 74 insertions(+), 12 deletions(-)



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

* pgsql: Advance old-segment horizon properly after slot invalidation
@ 2021-07-16 16:10  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 3+ messages in thread

From: Alvaro Herrera @ 2021-07-16 16:10 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Advance old-segment horizon properly after slot invalidation

When some slots are invalidated due to the max_slot_wal_keep_size limit,
the old segment horizon should move forward to stay within the limit.
However, in commit c6550776394e we forgot to call KeepLogSeg again to
recompute the horizon after invalidating replication slots.  In cases
where other slots remained, the limits would be recomputed eventually
for other reasons, but if all slots were invalidated, the limits would
not move at all afterwards.  Repair.

Backpatch to 13 where the feature was introduced.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Reported-by: Marcin Krupowicz <mk@071.ovh>
Discussion: https://postgr.es/m/17103-004130e8f27782c9@postgresql.org

Branch
------
master

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

Modified Files
--------------
src/backend/access/transam/xlog.c         | 26 +++++++++++++++++++++++--
src/backend/replication/slot.c            | 26 ++++++++++++++++++++++---
src/include/replication/slot.h            |  2 +-
src/test/recovery/t/019_replslot_limit.pl | 32 +++++++++++++++++++++++++------
4 files changed, 74 insertions(+), 12 deletions(-)



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


end of thread, other threads:[~2021-07-16 16:10 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-16 16:10 pgsql: Advance old-segment horizon properly after slot invalidation Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 16:10 pgsql: Advance old-segment horizon properly after slot invalidation Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-16 16:10 pgsql: Advance old-segment horizon properly after slot invalidation 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