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.

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to