Andrew Dunstan wrote:

> I don't understand how we decide that everybody who needs a given 
> event+message has got it, if we don't know who (if anyone) is listening? 
> How do we decide that we no longer need the info in the shmem buffer? 

Keep a pointer in shared memory for each listener backend, saying how
far it has scanned the ring?  There would be a single writing pointer,
so it's trivial to see when the ring is "full".

> Timeout? sinval issues a reset if the buffer becomes full, but we can't 
> do that here.

Just have NOTIFY block when the buffer is full, and maybe issue a
warning so that the user knows that he should increase the ring size.


> Are we keeping use of SIGUSR2 in this scheme?

What for?  Just protect the write pointer with a lwlock and have
listeners check whether somebody has written something.

---------------------------(end of broadcast)---------------------------
TIP 6: explain analyze is your friend

Reply via email to