From: | Mark Dilger <hornschnorter(at)gmail(dot)com> |
---|---|
To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers(at)lists(dot)postgresql(dot)org |
Cc: | Martijn van Oosterhout <kleptog(at)gmail(dot)com> |
Subject: | Re: LISTEN/NOTIFY testing woes |
Date: | 2019-11-24 18:25:57 |
Message-ID: | 2d0b118c-9ea5-1417-2b3b-624755644ed8@gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
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 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.
After applying all three patches, the stress test that originally
uncovered the assert in predicate.c no longer triggers any asserts.
`check-world` passes. The code and comments look good.
Your patches are ready for commit.
--
Mark Dilger
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2019-11-24 18:39:15 | Re: LISTEN/NOTIFY testing woes |
Previous Message | Ranier Vilela | 2019-11-24 18:06:33 | RE: [PATCH] Possible arithmetic with NULL pointer or test "stack_base_ptr != NULL" is irrelevant. |