简体   繁体   English

档案目录中的每一列是什么意思? (pg_dump/pg_restore)

[英]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.我正在使用 pg_restore 来重建我备份的数据库。 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.正如 pg_restore 文档中所建议的那样( https://www.postgresql.org/docs/curren/app-pgrestore.html创建了一个归档表,其中包含一个“文件”表。

Nothing is wrong per se, but I'm struggling to figure out what every column in this ToC means.本身并没有错,但我正在努力弄清楚此 ToC 中每一列的含义。 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?第一列是该表的存档 ID,但接下来的两个数字是什么意思? In my ToC the first non-archive column is always zero but in other examples that's not true.在我的 ToC 中,第一个非存档列始终为零,但在其他示例中并非如此。

The fields pertain to:这些字段涉及:

  • Archive ID存档 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.)目录表 OID(在您的情况下为 0,因为该行与TABLE DATA相关,而不是表。proc 将获得SELECT oid FROM pg_class were relname = 'pg_proc' ,表将获得SELECT oid FROM pg_class where relname = 'pg_class'等)
  • Table OID (16476 is the oid you would find in pg_class )表 OID(16476 是您可以在pg_class中找到的 oid)
  • Description ( TABLE DATA in your example)说明(在您的示例中为TABLE DATA
  • Schema ( public in your example)架构(在您的示例中为public
  • Name ( <table_name> )名称 ( <table_name> )
  • Owner ( postgres in your example)所有者(您的示例中的postgres

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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