pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix oldest xmin and LSN computation across repslots after advanc
4+ messages / 1 participants
[nested] [flat]

* pgsql: Fix oldest xmin and LSN computation across repslots after advanc
@ 2020-06-18 07:36  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-06-18 07:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix oldest xmin and LSN computation across repslots after advancing

Advancing a replication slot did not recompute the oldest xmin and LSN
values across replication slots, preventing resource removal like
segments not recycled at checkpoint time.  The original commit that
introduced the slot advancing in 9c7d06d never did the update of those
oldest values, and b0afdca removed this code.

This commit adds a TAP test to check segment recycling with advancing
for physical slots, enforcing an extra segment switch before advancing
to check if the segment gets correctly recycled after a checkpoint.

Reported-by: Andres Freund
Reviewed-by: Alexey Kondratov, Kyptaro Horiguchi
Discussion: https://postgr.es/m/20200609171904.kpltxxvjzislidks@alap3.anarazel.de
Backpatch-through: 11

Branch
------
master

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

Modified Files
--------------
src/backend/replication/slotfuncs.c   |  7 +++++++
src/test/recovery/t/001_stream_rep.pl | 21 +++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)



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

* pgsql: Fix oldest xmin and LSN computation across repslots after advanc
@ 2020-06-18 07:36  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-06-18 07:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix oldest xmin and LSN computation across repslots after advancing

Advancing a replication slot did not recompute the oldest xmin and LSN
values across replication slots, preventing resource removal like
segments not recycled at checkpoint time.  The original commit that
introduced the slot advancing in 9c7d06d never did the update of those
oldest values, and b0afdca removed this code.

This commit adds a TAP test to check segment recycling with advancing
for physical slots, enforcing an extra segment switch before advancing
to check if the segment gets correctly recycled after a checkpoint.

Reported-by: Andres Freund
Reviewed-by: Alexey Kondratov, Kyptaro Horiguchi
Discussion: https://postgr.es/m/20200609171904.kpltxxvjzislidks@alap3.anarazel.de
Backpatch-through: 11

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/43e70addf5a65f1b99c286f82e2e4970b0c2fda7

Modified Files
--------------
src/backend/replication/slotfuncs.c   |  7 +++++++
src/test/recovery/t/001_stream_rep.pl | 21 +++++++++++++++++++--
2 files changed, 26 insertions(+), 2 deletions(-)



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

* pgsql: Fix oldest xmin and LSN computation across repslots after advanc
@ 2020-06-18 07:36  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-06-18 07:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix oldest xmin and LSN computation across repslots after advancing

Advancing a replication slot did not recompute the oldest xmin and LSN
values across replication slots, preventing resource removal like
segments not recycled at checkpoint time.  The original commit that
introduced the slot advancing in 9c7d06d never did the update of those
oldest values, and b0afdca removed this code.

This commit adds a TAP test to check segment recycling with advancing
for physical slots, enforcing an extra segment switch before advancing
to check if the segment gets correctly recycled after a checkpoint.

Reported-by: Andres Freund
Reviewed-by: Alexey Kondratov, Kyptaro Horiguchi
Discussion: https://postgr.es/m/20200609171904.kpltxxvjzislidks@alap3.anarazel.de
Backpatch-through: 11

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/16f43122d46fc1f39af3f46024495de0b27ba751

Modified Files
--------------
src/backend/replication/slotfuncs.c   |  7 +++++++
src/test/recovery/t/001_stream_rep.pl | 23 +++++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)



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

* pgsql: Fix oldest xmin and LSN computation across repslots after advanc
@ 2020-06-18 07:36  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-06-18 07:36 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Fix oldest xmin and LSN computation across repslots after advancing

Advancing a replication slot did not recompute the oldest xmin and LSN
values across replication slots, preventing resource removal like
segments not recycled at checkpoint time.  The original commit that
introduced the slot advancing in 9c7d06d never did the update of those
oldest values, and b0afdca removed this code.

This commit adds a TAP test to check segment recycling with advancing
for physical slots, enforcing an extra segment switch before advancing
to check if the segment gets correctly recycled after a checkpoint.

Reported-by: Andres Freund
Reviewed-by: Alexey Kondratov, Kyptaro Horiguchi
Discussion: https://postgr.es/m/20200609171904.kpltxxvjzislidks@alap3.anarazel.de
Backpatch-through: 11

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1657e14b50d23cdf8bb9fec0a4e5d9cc0b7b265e

Modified Files
--------------
src/backend/replication/slotfuncs.c   |  7 +++++++
src/test/recovery/t/001_stream_rep.pl | 23 +++++++++++++++++++++--
2 files changed, 28 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2020-06-18 07:36 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-06-18 07:36 pgsql: Fix oldest xmin and LSN computation across repslots after advanc Michael Paquier <michael@paquier.xyz>
2020-06-18 07:36 pgsql: Fix oldest xmin and LSN computation across repslots after advanc Michael Paquier <michael@paquier.xyz>
2020-06-18 07:36 pgsql: Fix oldest xmin and LSN computation across repslots after advanc Michael Paquier <michael@paquier.xyz>
2020-06-18 07:36 pgsql: Fix oldest xmin and LSN computation across repslots after advanc Michael Paquier <michael@paquier.xyz>

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