On Tue, Jul 02, 2002 at 05:35:42PM -0400, Tom Lane wrote: > 1. To send NOTIFY: grab write lock on shared-memory circular buffer. > If enough space, insert message, release lock, send signal, done. > If not enough space, release lock, send signal, sleep some small > amount of time, and then try again. (Hard failure would occur only > if the proposed message size exceeds the buffer size; as long as we > make the buffer size a parameter, this is the DBA's fault not ours.)
How would this interact with the current transactional behavior of NOTIFY? At the moment, executing a NOTIFY command only stores the pending notification in a List in the backend you're connected to; when the current transaction commits, the NOTIFY is actually processed (stored in pg_listener, SIGUSR2 sent, etc) -- if the transaction is rolled back, the NOTIFY isn't sent. If we do the actual insertion when the NOTIFY is executed, I don't see a simple way to get this behavior... Cheers, Neil -- Neil Conway <[EMAIL PROTECTED]> PGP Key ID: DB3C29FC ---------------------------(end of broadcast)--------------------------- TIP 5: Have you checked our extensive FAQ? http://www.postgresql.org/users-lounge/docs/faq.html