pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make new replication slot test code less racy
6+ messages / 1 participants
[nested] [flat]

* pgsql: Make new replication slot test code less racy
@ 2021-07-17 17:35  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code less racy

The new test code added in ead9e51e8236 is racy -- it hinges on
shared-memory state, which changes before the WARNING message is logged.
Put it the other way around.

Backpatch to 13.

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

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/8589299e03fff012e0bbb9716693750a0d68eef7

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)



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

* pgsql: Make new replication slot test code less racy
@ 2021-07-17 17:35  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code less racy

The new test code added in ead9e51e8236 is racy -- it hinges on
shared-memory state, which changes before the WARNING message is logged.
Put it the other way around.

Backpatch to 13.

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

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)



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

* pgsql: Make new replication slot test code less racy
@ 2021-07-17 17:35  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code less racy

The new test code added in ead9e51e8236 is racy -- it hinges on
shared-memory state, which changes before the WARNING message is logged.
Put it the other way around.

Backpatch to 13.

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

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7099ba0580356bb455d75de4f6cd0faa046e1a10

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 27 +++++++++++++++------------
1 file changed, 15 insertions(+), 12 deletions(-)



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

* pgsql: Make new replication slot test code even less racy
@ 2021-07-19 21:21  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code even less racy

Further fix the test code in ead9e51e8236, this time by waiting until
the checkpoint has completed before moving on; this ensures that the
WAL segment removal has already happened when we create the next slot.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20210719.111318.2042379313472032754.horikyota.ntt@gmail.com

Branch
------
master

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

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)



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

* pgsql: Make new replication slot test code even less racy
@ 2021-07-19 21:21  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code even less racy

Further fix the test code in ead9e51e8236, this time by waiting until
the checkpoint has completed before moving on; this ensures that the
WAL segment removal has already happened when we create the next slot.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20210719.111318.2042379313472032754.horikyota.ntt@gmail.com

Branch
------
REL_13_STABLE

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

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)



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

* pgsql: Make new replication slot test code even less racy
@ 2021-07-19 21:21  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 6+ messages in thread

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

Make new replication slot test code even less racy

Further fix the test code in ead9e51e8236, this time by waiting until
the checkpoint has completed before moving on; this ensures that the
WAL segment removal has already happened when we create the next slot.

Author: Kyotaro Horiguchi <horikyota.ntt@gmail.com>
Discussion: https://postgr.es/m/20210719.111318.2042379313472032754.horikyota.ntt@gmail.com

Branch
------
REL_14_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1e8751380836056fdf546433dcf0328bc18c9313

Modified Files
--------------
src/test/recovery/t/019_replslot_limit.pl | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)



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


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

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-07-17 17:35 pgsql: Make new replication slot test code less racy Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-17 17:35 pgsql: Make new replication slot test code less racy Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-17 17:35 pgsql: Make new replication slot test code less racy Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-19 21:21 pgsql: Make new replication slot test code even less racy Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-19 21:21 pgsql: Make new replication slot test code even less racy Alvaro Herrera <alvherre@alvh.no-ip.org>
2021-07-19 21:21 pgsql: Make new replication slot test code even less racy 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