Re: Tracking row updates - race condition - Mailing list pgsql-general

From Vincent Hikida
Subject Re: Tracking row updates - race condition
Date
Msg-id 00a301c52dcc$c26d04b0$6501a8c0@HOMEOFFICE
Whole thread Raw
In response to Tracking row updates - race condition  (Alex Adriaanse <alex@alexandcarmen.com>)
Responses Re: Tracking row updates - race condition  (Alex Adriaanse <alex@alexandcarmen.com>)
List pgsql-general
>
> To fetch all updates since the last synchronization, the client would
> calculated a value for $lastrevision by running this query on its local
> database:
> SELECT max(revision) AS lastrevision FROM codes;
>
> It would then fetch all updated rows by running this query against the
> server:
> SELECT * FROM codes WHERE revision > $lastrevision;
>

How about

SELECT * FROM codes WHERE revision > $lastrevision - 100

You could use another number other than 100. As you said, the client can
handle duplicates.

Vincent


pgsql-general by date:

Previous
From: "Joshua D. Drake"
Date:
Subject: Re: Copression
Next
From: Kris Jurka
Date:
Subject: Re: java.lang.OutOfMemoryError