Re: Improving compressibility of WAL files

From: Zeugswetter Andreas OSB sIT <Andreas(dot)Zeugswetter(at)s-itsolutions(dot)at>
To: Greg Smith <gsmith(at)gregsmith(dot)com>, Hannu Krosing <hannu(at)krosing(dot)net>
Cc: Aidan Van Dyk <aidan(at)highrise(dot)ca>, Bruce Momjian <bruce(at)momjian(dot)us>, Kyle Cordes <kyle(at)kylecordes(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>
Subject: Re: Improving compressibility of WAL files
Date: 2009-01-09 11:17:45
Message-ID: 6DAFE8F5425AB84DB3FCA4537D829A561CEA8AAAFD@M0164.s-mxs.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general pgsql-hackers


> You don't want to just
> modify pg_standby to accept small files, because then you've made it
> harder to make absolutely sure when the file is ready to be
> processed if a non-atomic copy is being done.

It is hard, but I think it is the right way forward.
Anyway I think the size is not robust at all because some (most ? e.g. win32) non-atomic copy
implementations will also show the final size right from the beginning.

Could we use stricter file locking when opening WAL for recovery ?

Or implement a wait loop when the crc check (+ a basic validity check) for the next
record fails (and the next record is on a 512 byte boundary ?).
I think standby and restore recovery can be treated differently to startup recovery because
a copied wal file, even if the copy is not atomic, will not have trailing valid WAL records
from a recycled WAL. (A solution that recycles WAL files for restore/standby would need to make
sure it renames the files *after* restoring the content.)

Btw how do we detect end of WAL when restoring a backup and WAL after PANIC ?

> 1) Provide the length as part of the archive command

+1

Andreas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Emanuel Calvo Franco 2009-01-09 12:30:27 Re: dblink between oracle and postgres?
Previous Message Pavan Deolasee 2009-01-09 11:17:21 Re: RCA for MemoryContextAlloc: invalid request size(Known Issue)

Browse pgsql-hackers by date

  From Date Subject
Next Message Simon Riggs 2009-01-09 11:20:40 Re: Hot standby, slot ids and stuff
Previous Message Heikki Linnakangas 2009-01-09 10:33:04 Re: Hot standby, slot ids and stuff