Re: Pg_dump

Поиск
Список
Период
Сортировка
Искать
От
Tom Lane
Тема
Re: Pg_dump
Дата
Msg-id
1300348.1701975169@sss.pgh.pa.us
Ответ на
Re: Pg_dump (Holger Jakobs)
Список
Дерево обсуждения
Pg_dump Rajesh Kumar <rajeshkumar.dba09@gmail.com>
ERROR: multixact "members" limit exceeded Dirk Krautschick <dee-kay@gmx.de>
Re: Pg_dump Holger Jakobs <holger@jakobs.com>
Re: Pg_dump Tom Lane <tgl@sss.pgh.pa.us>
Re: Pg_dump M Sarwar <sarwarmd02@outlook.com>
Re: Pg_dump Alvaro Herrera <alvherre@alvh.no-ip.org>
Re: Pg_dump Scott Ribe <scott_ribe@elevated-dev.com>
Re: Pg_dump jason cable <cablej2082@gmail.com>
Holger Jakobs  writes:
> Am 07.12.23 um 19:11 schrieb Rajesh Kumar:
>> Will pg_dump cause blocking queries? If so how to take dump without 
>> blocking?

> Readers don't block writers, writers don't block readers in PostgreSQL.
> pg_dump is a reader.

To enlarge on that a bit: pg_dump takes AccessShareLock on every
table it intends to dump.  This does not conflict with ordinary
DML updates.  It *will* conflict with anything that wants
AccessExclusiveLock, which typically is schema-altering DDL.
See

https://www.postgresql.org/docs/current/explicit-locking.html#LOCKING-TABLES

So the answer to your question is "don't try to alter the
database schema while pg_dump is running".  You can alter
database content freely, though.

			regards, tom lane


В списке pgsql-admin по дате отправления
От: jason cable
Дата:
Сообщение: Re: Pg_dump
От: M Sarwar
Дата:
Сообщение: Re: Pg_dump
FAQ