What is the “last” data that get's backed up, when running pg_dump on a live server?

dba.stackexchange https://dba.stackexchange.com/questions/62857

  •  02-11-2019
  •  | 
  •  

Question

I'm wondering: If I start doing a pg_dump of a very large database (it would take hours), that is still running actively receiving writes, what is then the last data that goes into the backup? Is it:

  1. The data as-it-was, at the point in time where the pg_dump command was initiated.
  2. The last changes that it encountered at some point where it was dumping that individual record.
  3. Something else.

Bonus question: If I'm trying to dump a database as part of trying to rescue it from corrupt data, will it then make any difference whether I use the directory format or the custom format?

No correct solution

Licensed under: CC-BY-SA with attribution
Not affiliated with dba.stackexchange
scroll top