Re: [HACKERS] Think we need major revisions in async.c...

From: Bruce Momjian <maillist(at)candle(dot)pha(dot)pa(dot)us>
To: tgl(at)sss(dot)pgh(dot)pa(dot)us (Tom Lane)
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: [HACKERS] Think we need major revisions in async.c...
Date: 1998-09-27 05:41:32
Message-ID: 199809270541.BAA09436@candle.pha.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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(at)candle(dot)pha(dot)pa(dot)us | (610) 853-3000
+ If your life is a hard drive, | 830 Blythe Avenue
+ Christ can be your backup. | Drexel Hill, Pennsylvania 19026

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Sergei Chernev 1998-09-27 09:20:35 Long update query ?
Previous Message Tom Lane 1998-09-27 01:05:13 Think we need major revisions in async.c...