Re: pg_dump / pg_restore - TOC.dat file

Поиск
Список
Период
Сортировка
От Clécio Anderson
Тема Re: pg_dump / pg_restore - TOC.dat file
Дата
Msg-id CAE9pMZYB9YgAhZdyKpXXSBKBdpQYKT3tbG8bW1ev9itY5aN57w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: pg_dump / pg_restore - TOC.dat file  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-admin
Thanks Alvaro and Felipe for your answers. ;D

2016-01-26 14:37 GMT-03:00 Alvaro Herrera <alvherre@2ndquadrant.com>:
Felipe Santos wrote:

> 11471; 1262 36497111 DATABASE - mydb postgres
>
> 11471 - ?
> 1262 - ?
> 36497111 - Object ID
> DATABASE - Object Type
> mydb - Object Name
> postgres - Object Owner

The code that writes this is PrintTOCSummary() in
src/bin/pg_dump/pg_backup_archiver.c -- see that if you want more
details.  (Each object here is a TocEntry struct, which is defined in
pg_backup_archiver.h, search for _tocEntry.  Useful comments there.)

11471 is the internal ID of the object in the dump.  Note that ; is a
comment delimiter for the TOC format, so if you just write the 11471 in
a separate line, the correct object is specified.  The rest of the
entries after the ; are just commentary so that the DBA can understand
what the entry is for.

1262 is the OID of the pg_database catalog, so this identifies the entry
as a database.  This is redundant with having DATABASE in the object
type.  Similarly, 36497111 is the pg_database.oid column which is
redundant with having mydb as the database name.

The hyphen - is for the schema, if the object belongs into a schema.
A database obviously doesn't have one, hence the - in this particular
sample.

--
Álvaro Herrera                http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services



--
Tecnólogo em Redes de Computadores
Currículo Lattes

MCTS | MCITP | LPIC-2 | ITIL Foundation

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

Предыдущее
От: Alvaro Herrera
Дата:
Сообщение: Re: pg_dump / pg_restore - TOC.dat file
Следующее
От: Ankur Kaushik
Дата:
Сообщение: Per thread Connection memory