Re: [HACKERS] Think we need major revisions in async.c... - Mailing list pgsql-hackers

From Bruce Momjian
Subject Re: [HACKERS] Think we need major revisions in async.c...
Date
Msg-id 199809270541.BAA09436@candle.pha.pa.us
Whole thread Raw
In response to Think we need major revisions in async.c...  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
> What I'd like to do is to have cross-backend notifies write the
> originating backend's PID into the "notification" field, rather than
> just a "1".  The receiving backend can then send that value to its
> frontend, as opposed to sending its own PID as it will do in the
> self-notify case.  In this way the frontend can unambiguously
> distinguish its own NOTIFY bouncing back from a NOTIFY from another
> client.  (If several other clients send NOTIFY at about the same time,
> you may get only one message with only one of their PIDs, since there
> is only room for one originating PID in pg_listen.  But it will be kept
> distinct from any message resulting from a NOTIFY of your own.)  Note
> that we already made the backend's own PID available to the frontend as
> part of the CANCEL-related changes, so that part of the info is there
> for free.
>
> A more radical solution would be to suppress self-notifies altogether,
> but that is a change in semantics that would likely break some existing
> apps.  I will be satisfied if the frontend can tell the difference
> between a self-notify and an incoming notify.
>
>
> Any objections?  If there's something crucial I've missed in all this,
> better let me know ASAP!
>
> I know that it's a tad late in the beta cycle to be making such significant
> changes, but my applications really need NOTIFY to work and work reliably.
> We have to have this *now*.  I hope y'all will bear with me.

Sounds good.  You have worked with the Notify code more than anyone
else, so go ahead.  You are fixing a bug, and that is fine at this
stage.

--
  Bruce Momjian                        |  http://www.op.net/~candle
  maillist@candle.pha.pa.us            |  (610) 853-3000
  +  If your life is a hard drive,     |  830 Blythe Avenue
  +  Christ can be your backup.        |  Drexel Hill, Pennsylvania 19026


pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Think we need major revisions in async.c...
Next
From: Tom Lane
Date:
Subject: It sorta works, but I'm confused about locking