Re: Where is PLbash ??

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: friedrich(dot)dodt(at)efonds24(dot)de
Cc: Peter Eisentraut <peter_e(at)gmx(dot)net>, Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>, pgsql-interfaces(at)postgresql(dot)org
Subject: Re: Where is PLbash ??
Date: 2002-06-26 13:29:20
Message-ID: 1744.1025098160@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-interfaces

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

Browse pgsql-interfaces by date

  From Date Subject
Next Message Jan Wieck 2002-06-26 15:30:51 Re: Where is PLbash ??
Previous Message Jamie Blacoe 2002-06-26 10:55:01 unsubscribe