Re: pg_dump issues

Поиск
Список
Период
Сортировка
От Florian Pflug
Тема Re: pg_dump issues
Дата
Msg-id 24B1FA58-50E4-41ED-B237-05540DABA25B@phlo.org
обсуждение исходный текст
Ответ на Re: pg_dump issues  (Joe Abbate <jma@freedomcircle.com>)
Список pgsql-hackers
On Oct2, 2011, at 23:15 , Joe Abbate wrote:
> I'm
> somewhat surprised there appears to be no ability to lock a database
> exclusively for something like pg_dump/pg_restore, so you're not
> surprised by concurrent activity against the catalogs.  I'm guessing the
> assumption is that MVCC will take care of that?

I think the hope is more that it will, one day. Currently, postgres internally
accesses the catalog with SnapshotNow, not with a MVCC snapshot. This is
necessary to ensure, for example, that rows inserted into a table also get
inserted into a newly created index. This wouldn't affects pg_dump if it only
access the catalog via SQL, but it doesn't. pg_dump also depends on some server-side
functions to do its work, and since these functions in turn use SnapshotNow-based
internal backend functions, pg_dump essentially uses a mix of SnapshotNow and
its transaction's MVCC snapshot.

There has been talk about reducing the use of of SnapshotNow for catalog access,
but AFAIK there's no concrete proposal, and certainly no patch, available.

best regards,
Florian Pflug



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

Предыдущее
От: Magnus Hagander
Дата:
Сообщение: Re: Should we get rid of custom_variable_classes altogether?
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: [REVIEW] pg_last_xact_insert_timestamp