Re: Forcing current WAL file to be archived

From: Hannu Krosing <hannu(at)skype(dot)net>
To: Bruce Momjian <bruce(at)momjian(dot)us>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgreSQL(dot)org>, Marko Kreen <markokr(at)gmail(dot)com>
Subject: Re: Forcing current WAL file to be archived
Date: 2006-07-25 16:05:49
Message-ID: 1153843549.2922.22.camel@localhost.localdomain
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Ühel kenal päeval, T, 2006-07-25 kell 11:48, kirjutas Bruce Momjian:
> Hannu Krosing wrote:
> > ?hel kenal p?eval, T, 2006-07-25 kell 11:27, kirjutas Bruce Momjian:
> > > Hannu Krosing wrote:
> > > > ?hel kenal p?eval, T, 2006-07-25 kell 10:51, kirjutas Bruce Momjian:
> > > > > Where are we on these TODO items:
> > > > >
> > > >
> > > > > o Add reporting of the current WAL file, perhaps as part of
> > > > > partial log file archiving
> > > >
> > > > It would be nice to have a function that tells both filename and offset
> > > > of current WAL file, so it would be possible to do live async streaming
> > > > of up-to-subsecond changes without too much overhead.
> > >
> > > OK, "offset" added to TODO item. What would the offset give us?
> >
> > the offset returned by lseek() on the WAL file, that is the end of the
> > part of the WAL file which has actually been written to.
>
> Sorry, I was actually asking what use the offset would be to a user.

There would be an external async process, which continuously polls the
offset and pushes everything written between the polls to slave site.

so when this process starts up it gets (file = wal00001 and
offset=10000) and it sends first 10000 bytes to slave site, at next
rountd it gets (file = wal00001 and offset=15000) and it sends bytes
10001-15000 to remote and so on. this way the slave has a lag no more
than the poll interval in usable WAL data.

--
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me: callto:hkrosing
Get Skype for free: http://www.skype.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2006-07-25 16:10:43 Re: Forcing current WAL file to be archived
Previous Message Simon Riggs 2006-07-25 16:05:36 Re: Forcing current WAL file to be archived