Re: Tracking row updates - race condition

Поиск
Список
Период
Сортировка
От Vincent Hikida
Тема Re: Tracking row updates - race condition
Дата
Msg-id 00a301c52dcc$c26d04b0$6501a8c0@HOMEOFFICE
обсуждение исходный текст
Ответ на Tracking row updates - race condition  (Alex Adriaanse <alex@alexandcarmen.com>)
Ответы Re: Tracking row updates - race condition  (Alex Adriaanse <alex@alexandcarmen.com>)
Список 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 по дате отправления:

Предыдущее
От: "Joshua D. Drake"
Дата:
Сообщение: Re: Copression
Следующее
От: Kris Jurka
Дата:
Сообщение: Re: java.lang.OutOfMemoryError