Re: LISTEN/NOTIFY for lightweight replication

From: Richard Huxton <dev(at)archonet(dot)com>
To: Ted Shab <tshab(at)yahoo(dot)com>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: LISTEN/NOTIFY for lightweight replication
Date: 2004-10-13 15:53:00
Message-ID: 416D4F5C.7000007@archonet.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Ted Shab wrote:
> Richard,
>
> Thanks for the response.
>
> I'll look into both the dblink and iirc.
>
> Do you know of any extended examples of either?

dblink is in the contrib/ folder of the source distribution and possibly
your packaged version if you use such a thing. Never needed it myself,
but the documentation looks clear enough.

As for listen/notify possibly dropping duplicate notifications... Ah!
it's in the "SQL COMMANDS" reference part of the manuals

NOTIFY behaves like Unix signals in one important respect: if the same
condition name is signaled multiple times in quick succession,
recipients may get only one notify event for several executions of
NOTIFY. So it is a bad idea to depend on the number of notifies
received. Instead, use NOTIFY to wake up applications that need to pay
attention to something, and use a database object (such as a sequence)
to keep track of what happened or how many times it happened.

--
Richard Huxton
Archonet Ltd

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ted Shab 2004-10-13 15:56:19 Re: LISTEN/NOTIFY for lightweight replication
Previous Message Alvaro Herrera 2004-10-13 15:52:55 Re: LISTEN/NOTIFY for lightweight replication