Re: pg_dump LOCK TABLE ONLY question

Поиск
Список
Период
Сортировка
От Filip Rembiałkowski
Тема Re: pg_dump LOCK TABLE ONLY question
Дата
Msg-id CAP_rwwnFO6NC4vB0WpSO239tYbCCT8d6r4nE+5raxZtShOa3HQ@mail.gmail.com
обсуждение исходный текст
Ответ на pg_dump LOCK TABLE ONLY question  (Filip Rembiałkowski <filip.rembialkowski@gmail.com>)
Ответы Re: pg_dump LOCK TABLE ONLY question  (Michael Paquier <michael.paquier@gmail.com>)
Список pgsql-hackers
(sorry I lost the original thread somehow)

tgl wrote:

> Filip wrote:

> > I'm running pg_dump constrained to one schema. It appears that pg_dump runs
> > "LOCK TABLE %s IN ACCESS SHARE MODE" for each table.
> > Naturally it makes sense, but...

> > This schema has a table that serves as parent for thousands of child
> > tables (via INHERITS).

> > So effectively, to dump this schema, I have to LOCK all these tables
> > not only parent.

> They'd all end up locked anyway wouldn't they?

I would like to dump the whole schema in ONLY mode, including table
data for only that schema, excluding data for child tables in other
schemas.

Why would they be locked then?

Which part of pg_dump requires locking child tables?

Per the docs, "COPY only deals with the specific table named; it does
not copy data to or from child tables. "


I just want to understand why there is LOCK TABLE not LOCK TABLE ONLY.



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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Typo in /src/backend/optimizer/README
Следующее
От: Fujii Masao
Дата:
Сообщение: Re: Freeze avoidance of very large table.