Hi,
15.03.2023 11:43, Thomas Munro wrote:
> On Wed, Mar 15, 2023 at 9:00 PM Alexander Lakhin <exclusion@gmail.com> wrote:
>> The result depends on some OS conditions (it reproduced pretty well
>> immediately after VM reboot), but it's enough to test the patch proposed.
>> And I can confirm that the Assert is not observed anymore (with the sleep
>> added after CloseHandle(childinfo->procHandle)).
> Thanks for confirming. Pushed earlier today.
>
> Do you know how it fails in non-assert builds, without the fix?
I've replaced the Assert with 'if (!...) elog(...)' and got (with a non-assert
build):
t/099_check-pids.pl .. ok
All tests successful.
Files=1, Tests=1, 67 wallclock secs ( 0.03 usr + 0.00 sys = 0.03 CPU)
Result: PASS
2023-03-15 12:22:46.923 GMT|postgres|postgres|4484|6411b896.1184|LOG:
!(PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED)
2023-03-15 12:22:47.806 GMT|postgres|postgres|4180|6411b897.1054|LOG:
!(PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED)
2023-03-15 12:23:06.313 GMT|postgres|postgres|4116|6411b8aa.1014|LOG:
!(PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED)
2023-03-15 12:23:06.374 GMT|postgres|postgres|4740|6411b8aa.1284|LOG:
!(PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED)
2023-03-15 12:23:25.967 GMT|postgres|postgres|6812|6411b8bd.1a9c|LOG:
!(PMSignalState->PMChildFlags[slot] == PM_CHILD_ASSIGNED)
So at least with my test script that doesn't lead to a crash or something.
Best regards,
Alexander