Re: LISTEN/NOTIFY testing woes
Mark Dilger <hornschnorter@gmail.com>
From: Mark Dilger <hornschnorter@gmail.com>
To: Tom Lane <tgl@sss.pgh.pa.us>, pgsql-hackers@lists.postgresql.org
Cc: Martijn van Oosterhout <kleptog@gmail.com>
Date: 2019-11-24T04:50:52Z
Lists: pgsql-hackers
On 11/23/19 5:01 PM, Tom Lane wrote:
> I ran into a couple of issues while trying to devise a regression test
> illustrating the LISTEN-in-serializable-transaction issue Mark Dilger
> reported. The first one is that an isolation test in which we expect
> to see a cross-process NOTIFY immediately after a COMMIT turns out to
> be not very stable: on my machine, it works as long as you're just
> running the isolation tests by themselves, but it usually falls over
> if I'm running check-world with any amount of parallelism. The reason
> for this seems to be that incoming notifies are only checked for when
> we're about to wait for client input. At that point we've already
> sent the ReadyForQuery ('Z') protocol message, which will cause libpq
> to stand down from looking for more input and return a null from
> PQgetResult(). Depending on timing, the following Notify protocol
> messages might arrive quickly enough that isolationtester.c sees them
> before it goes off to do something else, but that's not very reliable.
Thanks for working on this, Tom.
I have finished reading and applying your three patches and have moved
on to testing them. I hope to finish the review soon.
--
Mark Dilger
Commits
-
Avoid assertion failure with LISTEN in a serializable transaction.
- bd743b600619 10.12 landed
- d9bb71947949 11.7 landed
- a24a4167aa38 12.2 landed
- 6b802cfc7fab 13.0 landed
- 864e8080e190 9.5.21 landed
- 34f44f59b38f 9.4.26 landed
- cdba85eb01ed 9.6.17 landed
-
Stabilize NOTIFY behavior by transmitting notifies before ReadyForQuery.
- dbe15524becb 10.12 landed
- c47f498c93f9 12.2 landed
- 790026972442 13.0 landed
- 377d1b95bfeb 11.7 landed
- 111298aa6533 9.6.17 landed
-
Stabilize the results of pg_notification_queue_usage().
- 8b7ae5a82d04 13.0 landed