Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Mark Dilger
On 11/24/19 11:04 AM, Tom Lane wrote: Mark Dilger writes: On 11/24/19 10:39 AM, Tom Lane wrote: After sleeping on it, I'm not really happy with what I did in PrepareTransaction (that is, invent a separate PrePrepare_Notify function). The idea was to keep that looking parallel to what Commi

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Tom Lane
Mark Dilger writes: > On 11/24/19 10:39 AM, Tom Lane wrote: >> After sleeping on it, I'm not really happy with what I did in >> PrepareTransaction (that is, invent a separate PrePrepare_Notify >> function). The idea was to keep that looking parallel to what >> CommitTransaction does, and preserve

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Mark Dilger
On 11/24/19 10:39 AM, Tom Lane wrote: Mark Dilger writes: On 11/23/19 8:50 PM, Mark Dilger wrote: I have finished reading and applying your three patches and have moved on to testing them.  I hope to finish the review soon. After applying all three patches, the stress test that originall

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Tom Lane
Mark Dilger writes: > On 11/23/19 8:50 PM, Mark Dilger wrote: >> I have finished reading and applying your three patches and have moved >> on to testing them.  I hope to finish the review soon. > After applying all three patches, the stress test that originally > uncovered the assert in predicat

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Mark Dilger
On 11/23/19 8:50 PM, Mark Dilger wrote: 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

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Tom Lane
Martijn van Oosterhout writes: > On Sun, 24 Nov 2019 at 02:01, Tom Lane wrote: >> This seems both undesirable for our own testing, and rather bogus >> from users' standpoints as well. However, I think a simple fix is >> available: just make the SQL pg_notification_queue_usage() function >> advan

Re: LISTEN/NOTIFY testing woes

2019-11-24 Thread Martijn van Oosterhout
Hoi Tom, On Sun, 24 Nov 2019 at 02:01, Tom Lane wrote: > > This seems both undesirable for our own testing, and rather bogus > from users' standpoints as well. However, I think a simple fix is > available: just make the SQL pg_notification_queue_usage() function > advance the queue tail before m

Re: LISTEN/NOTIFY testing woes

2019-11-23 Thread Mark Dilger
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 afte