3

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?

4
  • no it wont cause a performance impact. echo date doesn't do complex things.
    – sftsz
    Apr 9, 2012 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, 2012 at 12:56
  • 1
    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, 2012 at 13:33
  • 1
    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 out.pgsql.privatepaste.com/6cde129ab9
    – sftsz
    Apr 12, 2012 at 7:16

1 Answer 1

1

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.

Your Answer

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

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