Re: a few questions on backup

From: Marco Colombo <pgsql(at)esiway(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: a few questions on backup
Date: 2007-05-16 19:42:55
Message-ID: 464B5EBF.9050002@esiway.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tom Lane wrote:
> Marco Colombo <pgsql(at)esiway(dot)net> writes:
>> Good to know, thanks. I think I'll experiment a bit with
>> archive_command. My point was that since I know (or better assume) that
>> old segments are going to stay in my pg_xlog for *days* before getting
>> recycled,
>
> On what do you base that assumption? Once the system thinks they're not
> needed anymore, they'll be recycled immediately.
>
> regards, tom lane

Well now that you make me think of it, I do make some assumptions. One
is that only one file in pg_xlog is the active segment. Two is that I
can trust modification times (so that a file inside pg_xlog that looks
old is actually old... and since postgresql does not run as root, it
couldn't cheat on that even if it tried to).

The best thing I can do is to configure archiving, and see what gets
archived exactly. I'm making assumptions there too. I expect for each
file in pg_xlog to find a copy in the archive directory (say archiving
is done with cp), with one exception, the segment currently beeing
written to. There will be a file with the same name but different
contents (and older modification time).

I'll try that out. Maybe my ideas are so far from the truth that I'm
having a hard time in explaing them to people who actually know how
things work. I'll be back with results. Meanwhile, thanks for your time.

.TM.

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message ABHANG RANE 2007-05-16 20:05:13 cube operations
Previous Message Richard Greenwood 2007-05-16 19:09:58 Re: to_number behavior change between 8.1 and 8.2