pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Improve test coverage for LISTEN/NOTIFY.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Improve test coverage for LISTEN/NOTIFY.
@ 2019-07-28 16:02  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-07-28 16:02 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve test coverage for LISTEN/NOTIFY.

We had no actual end-to-end test of NOTIFY message delivery.  In the
core async.sql regression test, testing this is problematic because psql
traditionally prints the PID of the sending backend, making the output
unstable.  We also have an isolation test script, but it likewise
failed to prove that delivery worked, because isolationtester.c had
no provisions for detecting/reporting NOTIFY messages.

Hence, add such provisions to isolationtester.c, and extend
async-notify.spec to include direct tests of basic NOTIFY functionality.

I also added tests showing that NOTIFY de-duplicates messages normally,
but not across subtransaction boundaries.  (That's the historical
behavior since we introduced subtransactions, though perhaps we ought
to change it.)

Patch by me, with suggestions/review by Andres Freund.

Discussion: https://postgr.es/m/31304.1564246011@sss.pgh.pa.us

Branch
------
master

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

Modified Files
--------------
src/test/isolation/expected/async-notify.out | 97 ++++++++++++++++++++++++++--
src/test/isolation/isolationtester.c         | 87 +++++++++++++++----------
src/test/isolation/specs/async-notify.spec   | 76 +++++++++++++++++++---
3 files changed, 210 insertions(+), 50 deletions(-)



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

* pgsql: Improve test coverage for LISTEN/NOTIFY.
@ 2019-11-23 22:30  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-11-23 22:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve test coverage for LISTEN/NOTIFY.

Back-patch commit b10f40bf0 into older branches.  This adds reporting
of NOTIFY messages to isolationtester.c, and extends the async-notify
test to include direct tests of basic NOTIFY functionality.

This provides useful infrastructure for testing a bug fix I'm about
to back-patch, and there seems no good reason not to have better tests
of LISTEN/NOTIFY in the back branches.  The commit's survived long
enough in HEAD to make it unlikely that it will cause problems.

Back-patch as far as 9.6.  isolationtester.c changed too much in 9.6
to make it sane to try to fix older branches this way, and I don't
really want to back-patch those changes too.

Discussion: https://postgr.es/m/31304.1564246011@sss.pgh.pa.us

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/34f66c0ed800f50ffa75d57c7769f07d0adb5e29

Modified Files
--------------
src/test/isolation/expected/async-notify.out | 97 ++++++++++++++++++++++++++--
src/test/isolation/isolationtester.c         | 88 +++++++++++++++----------
src/test/isolation/specs/async-notify.spec   | 76 +++++++++++++++++++---
3 files changed, 211 insertions(+), 50 deletions(-)



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

* pgsql: Improve test coverage for LISTEN/NOTIFY.
@ 2019-11-23 22:30  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-11-23 22:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve test coverage for LISTEN/NOTIFY.

Back-patch commit b10f40bf0 into older branches.  This adds reporting
of NOTIFY messages to isolationtester.c, and extends the async-notify
test to include direct tests of basic NOTIFY functionality.

This provides useful infrastructure for testing a bug fix I'm about
to back-patch, and there seems no good reason not to have better tests
of LISTEN/NOTIFY in the back branches.  The commit's survived long
enough in HEAD to make it unlikely that it will cause problems.

Back-patch as far as 9.6.  isolationtester.c changed too much in 9.6
to make it sane to try to fix older branches this way, and I don't
really want to back-patch those changes too.

Discussion: https://postgr.es/m/31304.1564246011@sss.pgh.pa.us

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7d4c3118137a37dddcefe28145a3a2e4bccf59fd

Modified Files
--------------
src/test/isolation/expected/async-notify.out | 97 ++++++++++++++++++++++++++--
src/test/isolation/isolationtester.c         | 87 +++++++++++++++----------
src/test/isolation/specs/async-notify.spec   | 76 +++++++++++++++++++---
3 files changed, 210 insertions(+), 50 deletions(-)



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

* pgsql: Improve test coverage for LISTEN/NOTIFY.
@ 2019-11-23 22:30  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-11-23 22:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve test coverage for LISTEN/NOTIFY.

Back-patch commit b10f40bf0 into older branches.  This adds reporting
of NOTIFY messages to isolationtester.c, and extends the async-notify
test to include direct tests of basic NOTIFY functionality.

This provides useful infrastructure for testing a bug fix I'm about
to back-patch, and there seems no good reason not to have better tests
of LISTEN/NOTIFY in the back branches.  The commit's survived long
enough in HEAD to make it unlikely that it will cause problems.

Back-patch as far as 9.6.  isolationtester.c changed too much in 9.6
to make it sane to try to fix older branches this way, and I don't
really want to back-patch those changes too.

Discussion: https://postgr.es/m/31304.1564246011@sss.pgh.pa.us

Branch
------
REL_11_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/295054411ebbff7ecfcc801ddfbdbadc1bac9f72

Modified Files
--------------
src/test/isolation/expected/async-notify.out | 97 ++++++++++++++++++++++++++--
src/test/isolation/isolationtester.c         | 88 +++++++++++++++----------
src/test/isolation/specs/async-notify.spec   | 76 +++++++++++++++++++---
3 files changed, 211 insertions(+), 50 deletions(-)



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

* pgsql: Improve test coverage for LISTEN/NOTIFY.
@ 2019-11-23 22:30  Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2019-11-23 22:30 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Improve test coverage for LISTEN/NOTIFY.

Back-patch commit b10f40bf0 into older branches.  This adds reporting
of NOTIFY messages to isolationtester.c, and extends the async-notify
test to include direct tests of basic NOTIFY functionality.

This provides useful infrastructure for testing a bug fix I'm about
to back-patch, and there seems no good reason not to have better tests
of LISTEN/NOTIFY in the back branches.  The commit's survived long
enough in HEAD to make it unlikely that it will cause problems.

Back-patch as far as 9.6.  isolationtester.c changed too much in 9.6
to make it sane to try to fix older branches this way, and I don't
really want to back-patch those changes too.

Discussion: https://postgr.es/m/31304.1564246011@sss.pgh.pa.us

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/8173fa5abb16947c6e96d774e34e50f141cbe255

Modified Files
--------------
src/test/isolation/expected/async-notify.out | 97 ++++++++++++++++++++++++++--
src/test/isolation/isolationtester.c         | 88 +++++++++++++++----------
src/test/isolation/specs/async-notify.spec   | 76 +++++++++++++++++++---
3 files changed, 211 insertions(+), 50 deletions(-)



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


end of thread, other threads:[~2019-11-23 22:30 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2019-07-28 16:02 pgsql: Improve test coverage for LISTEN/NOTIFY. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-23 22:30 pgsql: Improve test coverage for LISTEN/NOTIFY. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-23 22:30 pgsql: Improve test coverage for LISTEN/NOTIFY. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-23 22:30 pgsql: Improve test coverage for LISTEN/NOTIFY. Tom Lane <tgl@sss.pgh.pa.us>
2019-11-23 22:30 pgsql: Improve test coverage for LISTEN/NOTIFY. 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