Re: hot spare / log shipping work on

From: Gaetano Mendola <mendola(at)bigfoot(dot)com>
To: Manfred Spraul <manfred(at)colorfullife(dot)com>
Subject: Re: hot spare / log shipping work on
Date: 2004-08-13 19:45:36
Message-ID: 411D1A60.3050204@bigfoot.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Manfred Spraul wrote:

> Gaetano Mendola wrote:
>
>>
>> a1) If exist check that is a 16MB file ( the request can
>> ~ arrive during the copy ),
>
>
> I think this will fail under windows: "copy" first sets the file size
> and then transfers the data. I wouldn't rule out that some Unices use
> the same implementation.

I'm doing this work as "proof of concept", after made it working on
my platform we can even write them in C.

>> ~ a2) If the file not exist this mean that is not yet
>> recycled and
>> ~ is a partial file present on the partial directory,
>> ~ check if the "alive" file is older then 2 minutes.
>> ~ a21) If the file is older than 2 minutes I assume
>> that
>> ~ the master is dead:
>
>
> I'd concentrate on cold failover: the user (or the OS) must call a
> script to cause a fail-over. The tricky thing are the various partial
> connection losses between master and spare: perhaps the alive file is
> not updated anymore due to a net split, but the master is still alive.
> Unless you are really careful both master and spare could run.

I agree but as I said I'm doing it as "proof of concept", we can even change
later the way to discovery that master is dead.

I'm facing however to the following problems:

1) Discovery the actual WAL file
I'm supposing is the last modified file inside the
pg_xlog directory. If this is not the good method
may I know how I can know it ?

2) During the recovery phase postmaster ask me for file that will never be
there like: 00000001.history.
Actualy if the file does not exist and contain the string history
instead to wait for him I exit with 1 exit code

Is this right for you ?

Regards
Gaetano Mendola

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Tom Lane 2004-08-13 20:32:59 Re: hot spare / log shipping work on
Previous Message Tom Lane 2004-08-13 19:24:16 Re: Asserting existing key to be primary