Re: Data in table changed? - Mailing list pgsql-general

From Tom Lane
Subject Re: Data in table changed?
Date
Msg-id 27632.1078241003@sss.pgh.pa.us
Whole thread Raw
In response to Data in table changed?  ("Thomas Holmgren" <thm@regnecentralen.dk>)
List pgsql-general
"Thomas Holmgren" <thm@regnecentralen.dk> writes:
> I have a large number of clients synchronizing with a central database.
> The clients update their local data by polling the database for changes
> at fixed intervals. I need an efficient way of determining if data in a
> table has been changed (either updated, deleted or inserted). Can this
> be achieved without scanning the tables using expensive SQL?

Are the clients continuously connected to the database?  If so you could
forget the whole polling concept and make it data-driven (the clients
listen for NOTIFY events sent out by updaters).

            regards, tom lane

pgsql-general by date:

Previous
From: Tom Lane
Date:
Subject: Re: Installing Postgresql in Irix
Next
From: "Karl O. Pinc"
Date:
Subject: Max/min of 2 values function, plpgsql efficency?