Re: Notify enhancement - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Notify enhancement
Date
Msg-id 16952.1165245125@sss.pgh.pa.us
Whole thread Raw
In response to Re: Notify enhancement  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
Gregory Stark <stark@enterprisedb.com> writes:
> This will run into the same issue that bidirectional pipes run into with
> deadlocks. The usual approach in Unix for dealing with this is having the
> application always -- even while blocked trying to write -- read any pending
> input and buffer it in user-space until it has enough to proceed. This may be
> hard to arrange in SQL? I think you would need a way for a PL/pgsql to escape
> a blocking write and read any pending notifications.

None of that is any different from the situation with sinval
messaging.

Note BTW that writes to the buffer will happen only in a very
circumscribed place (at COMMIT) so your worries about plpgsql
seem misplaced.
        regards, tom lane


pgsql-hackers by date:

Previous
From: "Gurjeet Singh"
Date:
Subject: Re: Facing a problem with SPI
Next
From: Tom Lane
Date:
Subject: Re: Notify enhancement