| From: | "Florian G(dot) Pflug" <fgp(at)phlo(dot)org> |
|---|---|
| To: | Postgresql-General <pgsql-hackers(at)postgresql(dot)org> |
| Cc: | "A(dot)M(dot)" <agentm(at)themactionfaction(dot)com> |
| Subject: | Re: Forcing wal rotation |
| Date: | 2006-07-14 15:36:58 |
| Message-ID: | 44B7BA1A.8020904@phlo.org |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
A.M. wrote:
> On Fri, July 14, 2006 11:20 am, Florian G. Pflug wrote:
>> Hi
>>
>>
>> For my warm-standby-cluster I'm now saving the currently used wal using
>> rsync, to avoid loosing data from a few hours (or days) ago, when there is
>> little traffic, and thus the wal isn't rotated. For online backups, the
>> problem is even worse, because a backup might me unuseable even hours
>> after I called pg_stop_backup(), because the wal segment needed to bring
>> the backup to a consistent state might not have been archived at that
>> time.
>>
> How about an SQL-level function that calls the wal scripts? This would
> also allow "important" transactions to push data to the standy server
> regardless of the wal size.
That was the idea - providing pg_rotate_wal(), which would guarantee that
the wal is rotatted at least once if called. Thinking further about this,
for a first prove of concept, I'd be enough to write a C function
pg_current_walsegment(). pg_rotate_wal() could then be a plpgsql function,
that e.g. creates a temporary table, and fills it with data, until the
return value of pg_current_walsegment() changes.
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Martijn van Oosterhout | 2006-07-14 15:45:41 | Re: Forcing wal rotation |
| Previous Message | Marko Kreen | 2006-07-14 15:36:55 | Re: [patch 0/9] annual pgcrypto update |