Re: sync_standbys_defined read/write race on startup - Mailing list pgsql-hackers

From Maksim.Melnikov
Subject Re: sync_standbys_defined read/write race on startup
Date
Msg-id 69541672-0fa2-41ea-af52-6e6110bf7235@postgrespro.ru
Whole thread Raw
In response to Re: sync_standbys_defined read/write race on startup  (Michael Paquier <michael@paquier.xyz>)
Responses Re: sync_standbys_defined read/write race on startup
List pgsql-hackers
Hi Michael, thanks for your answer.

Test 041_checkpoint_at_promote.pl is really good example
of using injection points, but anyway, I still don't see
how injection points can help us here. In failed test case
we started postgres, immediately open psql connection and commit
prepared transaction. Postgres, on start, before accepting
connections, fork checkpointer and checkpointer initialize
shared parameter sync_standbys_defined in CheckpointerMain,
before process loop. So, in most attempts, we can't call
injection_points_attach in psql before
macro INJECTION_POINT() code will be executed in
checkpointer(I mean INJECTION_POINT() code instead sleep()),
bacause checkpointer process is forking before database
system is ready to accept connections.

The manual execution of checkpoint can't help us too.

P.S.
sorry for style errors, I am new in postgres, so can miss
some rules. Anyway, to avoid any community rules mistakes,
attached patch with correct naming.

Thanks.

Best regards,
Maksim Melnikov
Attachment

pgsql-hackers by date:

Previous
From: Andres Freund
Date:
Subject: Re: Draft for basic NUMA observability
Next
From: Andres Freund
Date:
Subject: Re: Add missing PGDLLIMPORT markings