Re: Testing LISTEN/NOTIFY more effectively
Tom Lane <tgl@sss.pgh.pa.us>
From: Tom Lane <tgl@sss.pgh.pa.us>
To: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers@lists.postgresql.org
Date: 2019-07-27T22:20:52Z
Lists: pgsql-hackers
Attachments
- test-listen-notify-better-1.patch (text/x-diff) patch
I wrote: > Andres Freund <andres@anarazel.de> writes: >> Perhaps we could just have isolationtester check to which >> isolationtester session the backend pid belongs? And then print the >> session name instead of the pid? That should be fairly easy, and would >> probably give us all we need? > Oh, that's a good idea -- it's already tracking all the backend PIDs, > so probably not much extra work to do it like that. I found out that to avoid confusion, one really wants the message to identify both the sending and receiving sessions. Here's a patch that does it that way and extends the async-notify.spec test to perform basic end-to-end checks on LISTEN/NOTIFY. I intentionally made the test show the lack of NOTIFY de-deduplication that currently happens with subtransactions. If we change this as I proposed in <17822.1564186806@sss.pgh.pa.us>, this test output will change. regards, tom lane
Commits
-
Improve test coverage for LISTEN/NOTIFY.
- 8173fa5abb16 9.6.17 landed
- 34f66c0ed800 10.12 landed
- 7d4c3118137a 12.2 landed
- 295054411ebb 11.7 landed
- b10f40bf0e45 13.0 landed
-
Don't drop NOTICE messages in isolation tests.
- b1016834d325 12.0 landed
- ebd49928215e 13.0 landed
-
Fix isolationtester race condition for notices sent before blocking.
- 97fb88ea4a64 12.0 landed
- 30717637c1c5 13.0 landed