1

I am in process of a pg_dump. Here is the log at the start:

pg_dump: reading schemas
pg_dump: reading user-defined functions
pg_dump: reading user-defined types
pg_dump: reading procedural languages
pg_dump: reading user-defined aggregate functions
pg_dump: reading user-defined operators
pg_dump: reading user-defined operator classes
pg_dump: reading user-defined operator families
pg_dump: reading user-defined conversions
pg_dump: reading user-defined tables
pg_dump: reading table inheritance information
pg_dump: reading rewrite rules
pg_dump: reading type casts
pg_dump: finding inheritance relationships
pg_dump: reading column info for interesting tables
pg_dump:...............
pg_dump:...............
pg_dump: reading column info for interesting tables
pg_dump:...............

What does

reading column info for interesting tables

mean?

Does it not read this info for all tables? Also in my pg_dump, i have this executed twice. Why is this?

vyegorov
  • 21,787
  • 7
  • 59
  • 73
user3455531
  • 775
  • 1
  • 14
  • 28
  • I think this just means "tables of interest to this dump operation". It's verbose mode output really intended for debugging. – Craig Ringer Oct 15 '14 at 03:48

1 Answers1

1

This message is issued in verbose mode of pg_dump prior to executing getTableAttrs function. This function collects information bout all attributes (columns) of all dumpable tables, thus the message “… for interesting tables”.

Function getTableAttrs is being called from here (this is the place where message comes from), inside getSchemaData function, meaning data is being processed per-schema.

I suppose you have 2 schemas in your scope, therefore you see this message twice.

vyegorov
  • 21,787
  • 7
  • 59
  • 73
  • Thanks! also looking at strace of pg_dump, the saving database schema also does the same. so whats the difference? Also does the saving database schema only go through the "interesting tables"? – user3455531 Oct 14 '14 at 19:58
  • @user3455531, sorry, I don't understand your question. – vyegorov Oct 14 '14 at 20:01
  • okay. so looking at strace of pg_dump, i see its taking relnake from pg_class, then going through all its attributes in pg_attribute. So its similar to reading columns of interesting tables right? – user3455531 Oct 14 '14 at 20:06
  • @user3455531, right. Those are internal tables, part of [`System catalogs`](http://www.postgresql.org/docs/8.4/interactive/catalogs.html). – vyegorov Oct 14 '14 at 20:12
  • understood. So in saving database definition, it is only storing schema of internal tables. Is there a way to know how many internal tables i have? – user3455531 Oct 14 '14 at 20:19
  • @user3455531, all tables, *including* internal ones, are stored inside those internal tables. Check the link from the previous comment. – vyegorov Oct 14 '14 at 20:21
  • hmm. was also looking for answer to this http://stackoverflow.com/questions/26242963/pg-upgrade-saving-database-definition-taking-time. maybe you can help:) – user3455531 Oct 14 '14 at 20:27