Re: pg_dump / pg_restore - TOC.dat file

From: Clécio Anderson <clecioanderson(at)gmail(dot)com>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Felipe Santos <felipepts(at)gmail(dot)com>, pgsql-admin(at)postgresql(dot)org
Subject: Re: pg_dump / pg_restore - TOC.dat file
Date: 2016-01-26 20:21:05
Message-ID: CAE9pMZYB9YgAhZdyKpXXSBKBdpQYKT3tbG8bW1ev9itY5aN57w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Thanks Alvaro and Felipe for your answers. ;D

2016-01-26 14:37 GMT-03:00 Alvaro Herrera <alvherre(at)2ndquadrant(dot)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 <http://lattes.cnpq.br/0641375920107155>*
*MCTS *
*| MCITP | LPIC-2 | ITIL Foundation*

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Ankur Kaushik 2016-01-27 07:28:21 Per thread Connection memory
Previous Message Tom Lane 2016-01-26 19:43:16 Re: custom log. variable %h reports [unknown]