Friedrich Dodt <fdodt(at)web(dot)de> writes:
> So, what is the weakness of my strategy? Is there a
> "transaction-unsafety risk" in this case?
Well, the most obvious point is that you're firing the notification off
before your own transaction has committed. The receiving process might
look at the table to see what to do, not find anything visible, and go
back to sleep before you are able to commit.
NOTIFY/LISTEN avoids this pitfall because the notify isn't sent until commit.
regards, tom lane
In response to
pgsql-interfaces by date
|Next:||From: Jan Wieck||Date: 2002-06-26 15:30:51|
|Subject: Re: Where is PLbash ??|
|Previous:||From: Jamie Blacoe||Date: 2002-06-26 10:55:01|