Re: Better support of exported snapshots with pg_dump

Поиск
Список
Период
Сортировка
От Andres Freund
Тема Re: Better support of exported snapshots with pg_dump
Дата
Msg-id 20141015050633.GB7242@alap3.anarazel.de
обсуждение исходный текст
Ответ на Re: Better support of exported snapshots with pg_dump  (Michael Paquier <michael.paquier@gmail.com>)
Ответы Re: Better support of exported snapshots with pg_dump
Re: Better support of exported snapshots with pg_dump
Список pgsql-hackers
On 2014-10-15 07:09:10 +0900, Michael Paquier wrote:
> > whatever replication solution you use and just have pg_dump accept the
> > snapshot as input parameter? I am not sure how much I like pg_dump creating
> > the slot. I am aware that you need to have the replication connection open
> > but that's IMHO just matter of scripting it together.
> The whole point of the operation is to reduce the amount of time the
> external snapshot is taken to reduce the risk of race conditions that
> may be induced by schema changes. See for example discussions related
> to why we do not authorize specifying a snapshot name as an option of
> pg_dump.

I think that's completely the wrong way to go at this. The time it takes
to create a replication slot under write load is far larger than the
time it takes to start pg_dump and load. This really doesn't add any
actual safety. Also, the inability to use the snapshot outside of
pg_dump restricts the feature far too much imo.

I personally think we should just disregard the race here and add a
snapshot parameter. The race is already there and not exactly
small. Let's not kid ourselves that hiding it solves anything.

But if that's not the way to go, we need to think about a way of how to
prevent "problematic" DDL that's not racy.

Greetings,

Andres Freund

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



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

Предыдущее
От: Noah Misch
Дата:
Сообщение: Re: narwhal and PGDLLIMPORT
Следующее
От: Stephen Frost
Дата:
Сообщение: Additional role attributes && superuser review