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-28T01:08:50Z
Lists: pgsql-hackers
Andres Freund <andres@anarazel.de> writes: > I wonder if there aren't similar dangers around the notify handling. In > your patch we don't print them particularly eagerly. Doesn't that also > open us up to timing concerns? I think probably not, because of the backend-side restrictions on when notify messages will be sent. The corresponding case for the NOTICE bug we just fixed would be if a backend sent a NOTIFY before blocking; but it can't do that internally to a transaction, and anyway the proposed test script isn't doing anything that tricky. I did spend some time thinking about how isolationtester might report notifys that are sent spontaneously (without any "triggering" query) but I didn't feel that that was worth messing with. We'd have to have the program checking all the connections not just the one that's running what it thinks is the currently active step. We might be approaching a time where it's worth scrapping the isolationtester logic and starting over. I'm not volunteering though. 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