Re: [PATCH] Support systemd readiness notifications on reload - Mailing list pgsql-hackers

From Peter Eisentraut
Subject Re: [PATCH] Support systemd readiness notifications on reload
Date
Msg-id 73788299-43fc-4b70-b526-14e9e23e1773@eisentraut.org
Whole thread Raw
List pgsql-hackers
On 26.08.24 18:03, mr.trubach@icloud.com wrote:
> This is my first time contribution to the PostgreSQL, so I’m not really
> familiar with the whole process. The attached patch adds basic support
> for Type=notify-reload systemd services, that is, sends readiness
> notifications on service reload. This allows waiting for postmaster
> reload to complete (note that child reloads still happen asynchronously
> and we don’t wait for them).

My understanding of this new notify-reload type is that it would allow 
systemd to sequence configuration reloads that depend on each other. 
But if we're only waiting for the postmaster reload to complete, are we 
really satisfying that purpose?

It could be quite useful if we could somehow get the information that 
all backends have completed a configuration reload, but that would 
obviously be a much more complicated feature.

About the patch: For this purpose, I would not use 
INSTR_TIME_SET_CURRENT(), which is too much of an abstraction, but use 
clock_gettime(CLOCK_MONOTONIC) directly.

Also, there would need to be some documentation updates in 
doc/src/sgml/runtime.sgml (but it's ok if the first patch version omits 
that).




pgsql-hackers by date:

Previous
From: Alexander Lakhin
Date:
Subject: Re: Streaming read-ready sequential scan code
Next
From: Peter Eisentraut
Date:
Subject: json_query conditional wrapper bug