Re: tracking commit timestamps

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: tracking commit timestamps
Дата
Msg-id CA+U5nMKOvx8bxFhdWtpe4PjNvGALLNnFSH96q-Vduf3DGt8ZbA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: tracking commit timestamps  (Steve Singer <steve@ssinger.info>)
Ответы Re: tracking commit timestamps  (Petr Jelinek <petr@2ndquadrant.com>)
Список pgsql-hackers
On 15 November 2014 04:32, Steve Singer <steve@ssinger.info> wrote:

> The use cases I'm talking about aren't really replication related. Often I
> have come across systems that want to do something such as 'select * from
> orders where X > the_last_row_I_saw order by X' and then do further
> processing on the order.

Yes, existing facilities provide mechanisms for different types of
application change queues.

If you want to write a processing queue in SQL, that isn't the best
way. You'll need some way to keep track of whether or not its been
successfully processed. That's either a column in the table, or a
column in a queue table maintained by triggers, with the row write
locked on read. You can then have multiple readers from this queue
using the new SKIP LOCKED feature, which was specifically designed to
facilitate that.

Logical decoding was intended for much more than just replication. It
provides commit order access to changed data in a form that is both
usable and efficient for high volume applicatiion needs.

I don't see any reason to add LSN into a SLRU updated at commit to
support those application needs.

-- Simon Riggs                   http://www.2ndQuadrant.com/PostgreSQL Development, 24x7 Support, Training & Services



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: PostgreSQL doesn't stop propley when --slot option is specified with pg_receivexlog.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: Add CREATE support to event triggers