Re: Streaming base backups - Mailing list pgsql-hackers

From Magnus Hagander
Subject Re: Streaming base backups
Date
Msg-id AANLkTimeD62yfGX2g2uUZtOSjSpJ1ZbiDV8CeNXkAGmg@mail.gmail.com
Whole thread Raw
In response to Re: Streaming base backups  (Fujii Masao <masao.fujii@gmail.com>)
Responses Re: Streaming base backups  (Fujii Masao <masao.fujii@gmail.com>)
List pgsql-hackers
On Wed, Jan 12, 2011 at 10:39, Fujii Masao <masao.fujii@gmail.com> wrote:
> On Mon, Jan 10, 2011 at 11:09 PM, Magnus Hagander <magnus@hagander.net> wrote:
>> I've committed the backend side of this, without that. Still working
>> on the client, and on cleaning up Heikki's patch for grammar/parser
>> support.
>
> Great work!
>
> I have some comments:
>
> While walsender is sending a base backup, WalSndWakeup should
> not send the signal to that walsender?

True, it's not necessary. How bad does it actually hurt things though?
Given that the walsender running the backup isn't actually waiting on
the latch, it doesn't actually send a signal, does it?


> In sendFile or elsewhere, we should periodically check whether
> postmaster is alive and whether the flag was set by the signal?

That, however, we probably should.


> At the end of the backup by walsender, it forces a switch to a new
> WAL file and waits until the last WAL file has been archived. So we
> should change postmaster so that it doesn't cause the archiver to
> end before walsender ends when shutdown is requested?

Um. I have to admit I'm not entirely following what you mean enough to
confirm it, but it *sounds* correct :-)

What scenario exactly is the problematic one?


> Also, when shutdown is requested, the walsender which is
> streaming WAL should not end before another walsender which
> is sending a backup ends, to stream the backup-end WAL?

Not sure I see the reason for that. If we're shutting down in the
middle of the base backup, we don't have any support for continuing
that one after we're back up - you have to start over.

--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


pgsql-hackers by date:

Previous
From: Joel Jacobson
Date:
Subject: Re: pg_depend explained
Next
From: David Fetter
Date:
Subject: Re: kill -KILL: What happens?