Server writing short WAL files

From: beamsplitter(at)gmail(dot)com
To: pgsql-general(at)postgresql(dot)org
Subject: Server writing short WAL files
Date: 2012-07-05 21:31:22
Message-ID: 8AAC62A3-5385-4563-9D66-F162D3F0CD92@gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I'm having trouble with WAL files. Every 4th WAL file written by the server
into pg_xlog is 24576 bytes instead of 16MB. A short WAL causes a fatal
error during recovery.

This behavior is perfectly consistent. For example, if archive_timeout is 5
mins, every 20 minutes the new WAL file is 24576 bytes, followed 5 mins later
by a 16MB one. By adjusting the archive_timeout, I can change the interval
-- e.g. every 3rd or 5th WAL file is short -- but the general behavior is the
same.

Here's my WAL config:

wal_level = archive
fsync = on
#synchronous_commit = on
#wal_sync_method = fsync
full_page_writes = on
wal_buffers = -1
#wal_writer_delay = 200ms
#commit_delay = 0
#commit_siblings = 5
checkpoint_segments = 10
checkpoint_timeout = 6min
checkpoint_completion_target = 0.6
#checkpoint_warning = 30s
archive_mode = on
archive_command = '/usr/local/sbin/postgresql_archive.sh %p %f'
archive_timeout = 5min

Does anyone know how to fix this?

Postgres version 9.1.4 on Amazon Linux, installed from the yum package
manager.

Thanks.

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Steve Atkins 2012-07-05 21:47:13 Re: Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?
Previous Message James Hartley 2012-07-05 21:09:11 Packt's PostgreSQL 9 Administration Cookbook: LITE Editions?