WAL file size vs. data file size - Mailing list pgsql-general

From Ben Chobot
Subject WAL file size vs. data file size
Date
Msg-id F0D5523B-F32A-47A1-BB86-9A01206B1387@silentmedia.com
Whole thread Raw
Responses Re: WAL file size vs. data file size  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-general
Today I tried to restore a 70GB database with the standard "pg_dump -h old_server <…> | psql -h new_server <…>" method. I had 100GB set aside for WAL files, which I figured surely would be enough, because all of the data, including indices, is only 70GB. So I was a bit surprised when the restore hung mis-way because my pg_xlogs directory ran out of space. 

Is it expected that WAL files are less dense than data files? I understand that they'll include multiple versions of the data, while the data files only include the last one (if recently vacuumed), but it's not like a restore does much besides COPY commands. I also understand that when you specify an archive_timeout value, you might be bloating the WAL files, but again, in the case of a restore, it seems like each WAL file will be full of useful data. So how is it that I can have more WAL bytes than data bytes?

Now, the new server is dedicated to running just this database, so it's not like there was anything else that could be  adding info the the WAL files. But it is a master for a hot standby cluster…. maybe that makes a difference?

pgsql-general by date:

Previous
From: Scott Marlowe
Date:
Subject: Re: FATAL: the database system is starting up
Next
From: Andrea Peri
Date:
Subject: PG 9.1.1 - availability of xslt_process()