pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpgsql: Improve stability of TAP test for synchronous replication
7+ messages / 2 participants
[nested] [flat]
* pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 01:55 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 01:55 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Improve stability of TAP test for synchronous replication
Slow buildfarm machines have run into issues with this TAP test caused
by a race condition related to the startup of a set of standbys, where
it is possible to finish with an unexpected order in the WAL sender
array of the primary.
This closes the race condition by making sure that any standby started
is registered into the WAL sender array of the primary before starting
the next one based on lookups of pg_stat_replication.
Backpatch down to 9.6 where the test has been introduced.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Noah Misch
Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
Backpatch-through: 9.6
Branch
------
REL_11_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/ca553394b2efcf0a551b1fe2ae82a1515f90f2cb
Modified Files
--------------
src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 01:55 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 01:55 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Improve stability of TAP test for synchronous replication
Slow buildfarm machines have run into issues with this TAP test caused
by a race condition related to the startup of a set of standbys, where
it is possible to finish with an unexpected order in the WAL sender
array of the primary.
This closes the race condition by making sure that any standby started
is registered into the WAL sender array of the primary before starting
the next one based on lookups of pg_stat_replication.
Backpatch down to 9.6 where the test has been introduced.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Noah Misch
Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
Backpatch-through: 9.6
Branch
------
REL_12_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/0ceb28da06152cbf69c7e9a71c09e9de47783472
Modified Files
--------------
src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 01:55 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 01:55 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Improve stability of TAP test for synchronous replication
Slow buildfarm machines have run into issues with this TAP test caused
by a race condition related to the startup of a set of standbys, where
it is possible to finish with an unexpected order in the WAL sender
array of the primary.
This closes the race condition by making sure that any standby started
is registered into the WAL sender array of the primary before starting
the next one based on lookups of pg_stat_replication.
Backpatch down to 9.6 where the test has been introduced.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Noah Misch
Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
Backpatch-through: 9.6
Branch
------
REL9_6_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/c6f961bbbb202bd99053524efdd40fcd70e0aa4f
Modified Files
--------------
src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 01:55 Michael Paquier <michael@paquier.xyz>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 01:55 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Improve stability of TAP test for synchronous replication
Slow buildfarm machines have run into issues with this TAP test caused
by a race condition related to the startup of a set of standbys, where
it is possible to finish with an unexpected order in the WAL sender
array of the primary.
This closes the race condition by making sure that any standby started
is registered into the WAL sender array of the primary before starting
the next one based on lookups of pg_stat_replication.
Backpatch down to 9.6 where the test has been introduced.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Noah Misch
Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
Backpatch-through: 9.6
Branch
------
REL_10_STABLE
Details
-------
https://git.postgresql.org/pg/commitdiff/46fb7ff65ec29f7aab2e479ab43a180d67a267ed
Modified Files
--------------
src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 01:55 Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 01:55 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Improve stability of TAP test for synchronous replication
Slow buildfarm machines have run into issues with this TAP test caused
by a race condition related to the startup of a set of standbys, where
it is possible to finish with an unexpected order in the WAL sender
array of the primary.
This closes the race condition by making sure that any standby started
is registered into the WAL sender array of the primary before starting
the next one based on lookups of pg_stat_replication.
Backpatch down to 9.6 where the test has been introduced.
Author: Michael Paquier
Reviewed-by: Álvaro Herrera, Noah Misch
Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
Backpatch-through: 9.6
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/7d81bdc8c0ce838efa248928065e9b2da829f981
Modified Files
--------------
src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
1 file changed, 33 insertions(+), 9 deletions(-)
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 18:17 Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
parent: Michael Paquier <michael@paquier.xyz>
0 siblings, 1 reply; 7+ messages in thread
From: Andrew Dunstan @ 2019-07-24 18:17 UTC (permalink / raw)
To: Michael Paquier <michael@paquier.xyz>; pgsql-committers@lists.postgresql.org
On 7/23/19 9:55 PM, Michael Paquier wrote:
> Improve stability of TAP test for synchronous replication
>
> Slow buildfarm machines have run into issues with this TAP test caused
> by a race condition related to the startup of a set of standbys, where
> it is possible to finish with an unexpected order in the WAL sender
> array of the primary.
>
> This closes the race condition by making sure that any standby started
> is registered into the WAL sender array of the primary before starting
> the next one based on lookups of pg_stat_replication.
>
> Backpatch down to 9.6 where the test has been introduced.
>
> Author: Michael Paquier
> Reviewed-by: Álvaro Herrera, Noah Misch
> Discussion: https://postgr.es/m/20190617055145.GB18917@paquier.xyz
> Backpatch-through: 9.6
>
> Branch
> ------
> master
>
> Details
> -------
> https://git.postgresql.org/pg/commitdiff/7d81bdc8c0ce838efa248928065e9b2da829f981
>
> Modified Files
> --------------
> src/test/recovery/t/007_sync_rep.pl | 42 +++++++++++++++++++++++++++++--------
> 1 file changed, 33 insertions(+), 9 deletions(-)
>
This broke our perl coding rules:
./src/test/recovery/t/007_sync_rep.pl: Subroutine "start_standby_and_wait" does not end with "return" at line 33, column 1. See page 197 of PBP. (Severity: 5)
cheers
andrew
--
Andrew Dunstan https://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 7+ messages in thread
* Re: pgsql: Improve stability of TAP test for synchronous replication
@ 2019-07-24 22:56 Michael Paquier <michael@paquier.xyz>
parent: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
0 siblings, 0 replies; 7+ messages in thread
From: Michael Paquier @ 2019-07-24 22:56 UTC (permalink / raw)
To: Andrew Dunstan <andrew.dunstan@2ndquadrant.com>; +Cc: pgsql-committers@lists.postgresql.org
On Wed, Jul 24, 2019 at 02:17:14PM -0400, Andrew Dunstan wrote:
> This broke our perl coding rules:
>
> ./src/test/recovery/t/007_sync_rep.pl: Subroutine
> "start_standby_and_wait" does not end with "return" at line 33,
> column 1. See page 197 of PBP. (Severity: 5)
Fixed, thanks. Indeed I can see that pgperlcritic complains here, and
I have added a call in my pre-commit scripts for the future.
--
Michael
Attachments:
[application/pgp-signature] signature.asc (832B, ../../20190724225651.GA6000@paquier.xyz/2-signature.asc)
download
^ permalink raw reply [nested|flat] 7+ messages in thread
end of thread, other threads:[~2019-07-24 22:56 UTC | newest]
Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-24 01:55 pgsql: Improve stability of TAP test for synchronous replication Michael Paquier <michael@paquier.xyz>
2019-07-24 18:17 ` Andrew Dunstan <andrew.dunstan@2ndquadrant.com>
2019-07-24 22:56 ` Michael Paquier <michael@paquier.xyz>
2019-07-24 01:55 pgsql: Improve stability of TAP test for synchronous replication Michael Paquier <michael@paquier.xyz>
2019-07-24 01:55 pgsql: Improve stability of TAP test for synchronous replication Michael Paquier <michael@paquier.xyz>
2019-07-24 01:55 pgsql: Improve stability of TAP test for synchronous replication Michael Paquier <michael@paquier.xyz>
2019-07-24 01:55 pgsql: Improve stability of TAP test for synchronous replication 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