Tom Lane wrote:
> Alvaro Herrera <alvherre@commandprompt.com> writes:
>> As for signalling, maybe we could implement something like we do for the
>> postmaster signal stuff: the requestor stores a dbid in shared memory
>> and sends a SIGUSR2 to pgstat or some such.
>
> No, no, no. Martin already had a perfectly sane design for that
> direction of signalling: send a special stats message to the collector.
> That can carry whatever baggage it needs to. It's the reverse direction
> of "the data you requested is available now, sir" that is tricky.
IIRC, my previous patch looked at the inode of the stats file, then sent
of the "gimme a new file" signal, and then read the file once the inode
change.
But also IIRC, that's the area where there was a problem - sometimes it
didn't properly pick up changes...
//Magnus