0

I want to know how exactly the pg_dump works step by step. I know that it begins by locking tables. I am currently doing a pg_dump on my database and i switched on the --verbose mode. Here is what i get currently:

pg_dump: finding default expressions of table "tablename"
pg_dump: finding the columns and types of table "tablename"

So, what all steps does pg_dump do after these? Does it start working on the values inside these tables after this or it does that within these?

user3455531
  • 775
  • 1
  • 14
  • 28
  • what do you mean with "start working on the values inside these tables"? Whay do you need exactly? – Lorenzo Marcon Sep 20 '14 at 15:48
  • 1
    Look it up in the source. The textstrings are easy to find. – wildplasser Sep 20 '14 at 16:08
  • i mean that currently the dump is only working on creating the database. When does it start working on the values that are in the tables? – user3455531 Sep 20 '14 at 16:19
  • The best reference is the source code. It depends on the options you use (parallel mode or not, custom or SQL format, etc) too. What actual *problem* are you trying to solve? What're you trying to achieve? – Craig Ringer Sep 21 '14 at 07:05
  • i am trying to estimate the time it will take – user3455531 Sep 21 '14 at 07:50
  • If it is not a huge database and you are OK with logging everything to log file, just log all statements. From the log file you should get an idea about time taken, sequence of steps etc. See this link for setting up logging. http://stackoverflow.com/questions/12670745/can-i-log-query-execution-time-in-postgressql-8-4 – Jayadevan Sep 22 '14 at 04:27

0 Answers0