pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Tighten TAP tests' tracking of postmaster state some more.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/4fdbf9af5184d033f07010a1ab573fb329e7b8cd

Modified Files
--------------
src/test/perl/PostgreSQL/Test/Cluster.pm | 40 +++++++++++++++++++++++++++-----
src/test/recovery/t/017_shm.pl           |  3 +++
2 files changed, 37 insertions(+), 6 deletions(-)



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

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
REL_14_STABLE

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

Modified Files
--------------
src/test/perl/PostgresNode.pm  | 40 ++++++++++++++++++++++++++++++++++------
src/test/recovery/t/017_shm.pl |  3 +++
2 files changed, 37 insertions(+), 6 deletions(-)



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

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/4828a80069abc3e4b5baffe3ebffb69e6dd5bc10

Modified Files
--------------
src/test/perl/PostgresNode.pm  | 40 ++++++++++++++++++++++++++++++++++------
src/test/recovery/t/017_shm.pl |  3 +++
2 files changed, 37 insertions(+), 6 deletions(-)



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

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/test/perl/PostgresNode.pm  | 40 ++++++++++++++++++++++++++++++++++------
src/test/recovery/t/017_shm.pl |  3 +++
2 files changed, 37 insertions(+), 6 deletions(-)



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

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/17019c00ff48ad9dd6a9d4e4a2a4a5b42d655f57

Modified Files
--------------
src/test/perl/PostgresNode.pm  | 40 ++++++++++++++++++++++++++++++++++------
src/test/recovery/t/017_shm.pl |  3 +++
2 files changed, 37 insertions(+), 6 deletions(-)



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

* pgsql: Tighten TAP tests' tracking of postmaster state some more.
@ 2022-01-20 22:28 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 6+ messages in thread

From: Tom Lane @ 2022-01-20 22:28 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Tighten TAP tests' tracking of postmaster state some more.

Commits 6c4a8903b et al. had a couple of deficiencies:

* The logic I added to Cluster::start to see if a PID file is present
could be fooled by a stale PID file left over from a previous
postmaster.  To fix, if we're not sure whether we expect to find a
running postmaster or not, validate the PID using "kill 0".

* 017_shm.pl has a loop in which it just issues repeated Cluster::start
calls; this will fail if some invocation fails but leaves self->_pid
set.  Per buildfarm results, the above fix is not enough to make this
safe: we might have "validated" a PID for a postmaster that exits
immediately after we look.  Hence, match each failed start call with
a stop call that will get us back to the self->_pid == undef state.
Add a fail_ok option to Cluster::stop to make this work.

Discussion: https://postgr.es/m/CA+hUKGKV6fOHvfiPt8=dOKzvswjAyLoFoJF1iQXMNpi7+hD1JQ@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1145ad1ac5b7347071adb6186d9b56421b7ab40f

Modified Files
--------------
src/test/perl/PostgresNode.pm  | 39 ++++++++++++++++++++++++++++++++++-----
src/test/recovery/t/017_shm.pl |  3 +++
2 files changed, 37 insertions(+), 5 deletions(-)



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


end of thread, other threads:[~2022-01-20 22:28 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>
2022-01-20 22:28 pgsql: Tighten TAP tests' tracking of postmaster state some more. Tom Lane <tgl@sss.pgh.pa.us>

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