Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Using PostgreSQL 8.4/CentOS 6: if I set the archive_mode parameter to on in postgresql.conf, but don't actually store the generated WAL files anywhere via the archive_command parameter, is there any performance impact?

This is for testing the potential for use of WAL archiving on a high-throughput production server: I'm hoping to set archive_mode to on, and set archive_command to something like

echo `date` %f %p >> archive_log.txt

so that I can monitor how many WAL files would get created during a given time period without actually copying them and risking disk space overruns. Will this affect my server's performance in any way?

share|improve this question
no it wont cause a performance impact. echo date doesn't do complex things. – sftsz Apr 9 '12 at 10:37
I was more wondering if having the archive mode set to "on" causes Postgres to use more resources internally--not whether or not the archive_command had a high overhead. – Zac B Apr 9 '12 at 12:56
no i do not think it will cause pg to use more resources because when you set archive_mode on it will make use of operating system to run specified command in archive_command not pg. – sftsz Apr 10 '12 at 13:33
If you've got evidence/citation for that, put it in an answer and I'll accept/upvote. Thanks! – Zac B Apr 10 '12 at 19:15
ok. i don't have any evidence but i make test with pgbench and it seems it causes a lower tps on 1.6GB test database here is the results you can check it – sftsz Apr 12 '12 at 7:16
up vote 1 down vote accepted

There would not be performance impact there. Your only limitation will be disk space.

Note this is actually used for things like incremental backups and point in time restore. It's pretty well tested and used.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.