pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Add test case for obsoleting slot with active walsender
2+ messages / 1 participants
[nested] [flat]

* pgsql: Add test case for obsoleting slot with active walsender
@ 2021-06-18 22:50  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2021-06-18 22:50 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add test case for obsoleting slot with active walsender

The code to signal a running walsender when its reserved WAL size grows
too large is completely uncovered before this commit; this adds coverage
for that case.

This test involves sending SIGSTOP to walsender and walreceiver and
running a checkpoint while advancing WAL, then sending SIGCONT.  There's
no precedent for this coding in Perl tests, and my reading of relevant
manpages says it's likely to fail on Windows.  Because of this, this
test is always skipped on that platform.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/202106102202.mjw4huiix7lo@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/09126984a2631db8dd6299f23954e0dede69735f

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 85 +++++++++++++++++++++++++++++--
1 file changed, 82 insertions(+), 3 deletions(-)



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

* pgsql: Add test case for obsoleting slot with active walsender, take 2
@ 2021-06-23 13:58  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 2+ messages in thread

From: Alvaro Herrera @ 2021-06-23 13:58 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Add test case for obsoleting slot with active walsender, take 2

The code to signal a running walsender when its reserved WAL size grows
too large is completely uncovered before this commit; this adds coverage
for that case.

This test involves sending SIGSTOP to walsender and walreceiver, then
advancing enough WAL for a checkpoint to trigger, then sending SIGCONT.

There's no precedent for STOP signalling in Perl tests, and my reading
of relevant manpages says it's likely to fail on Windows.  Because of
this, this test is always skipped on that platform.

This version fixes a couple of rarely hit race conditions in the
previous attempt 09126984a263; most notably, both LOG string searches
are loops, not just the second one; we acquire the start-of-log position
before STOP-signalling; and reference the correct process name in the
test description.  All per Tom Lane.

Author: Álvaro Herrera <alvherre@alvh.no-ip.org>
Discussion: https://postgr.es/m/202106102202.mjw4huiix7lo@alvherre.pgsql

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/24043c27b46f873211177e3460ab09dc011802a5

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 97 ++++++++++++++++++++++++++++++-
1 file changed, 94 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2021-06-23 13:58 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-18 22:50 pgsql: Add test case for obsoleting slot with active walsender Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-06-23 13:58 pgsql: Add test case for obsoleting slot with active walsender, take 2 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