We are dumping a 4TB postgres database using pg_dump. The source is on a copy-on-write snapshot filesystem, and the target is an external drive.

While the pg_dump is running we get about 4-5MB/sec writes on the filesystem where postgresql data is (iostat), and specifically inside the base/ directory.

Since the only query running on this DB is the COPY initiated from pg_dump which only reads data, who is writing data to postgres datafiles?

We need to find a way to make postgres stop writing because the source copy-on-write filesystem gets filled up before the dump is finished.

Postgresql version is 8.4, vacuum is not running (autovacuum = off).

UPDATE: I recompiled pg_dump to use READ UNCOMMITTED transactions, but that didn't change anything.

  • When experiencing this, do you have any files in the pg_xlog directory? – dezso Dec 2 '13 at 16:47
  • xlog dir is not empty. This was good thinking, but after 3 days of pg_dump and 1TB of data modified in the base/ directory I wouldn't think it's the xlog that causes the writes. Moreover there are no reads on the xlog partition (it's a different partition so I can measure easily). – sivann Dec 3 '13 at 15:04
  • The (exact) call might reveal something ... – Erwin Brandstetter Feb 1 '14 at 0:14
  • @ErwinBrandstetter it's just a pg_dump, no special options. – sivann Feb 2 '14 at 11:38

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.