简体   繁体   中英

What does each column in an archive's table of contents mean? (pg_dump/pg_restore)

I'm using pg_restore to reconstitute a database I've backed up. As suggested in the pg_restore docs ( https://www.postgresql.org/docs/curren/app-pgrestore.html ), I've created a.list file with the archive's table of contents.

Nothing is wrong per se, but I'm struggling to figure out what every column in this ToC means. They each look like this:

5602; 0 16476 TABLE DATA public <table_name> postgres

The first column is the archive id for that table, but what do the next two numbers mean? In my ToC the first non-archive column is always zero but in other examples that's not true.

The fields pertain to:

  • Archive ID
  • Catalog Table OID (0 in your case, because that row pertains to TABLE DATA and not a table. A proc would get the value of SELECT oid FROM pg_class were relname = 'pg_proc' here, a table would get SELECT oid FROM pg_class where relname = 'pg_class' , etc.)
  • Table OID (16476 is the oid you would find in pg_class )
  • Description ( TABLE DATA in your example)
  • Schema ( public in your example)
  • Name ( <table_name> )
  • Owner ( postgres in your example)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM