Re: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested

Lists: pgsql-committerspgsql-hackers
From: Magnus Hagander <magnus(at)hagander(dot)net>
To: pgsql-committers(at)postgresql(dot)org
Subject: pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 11:37:22
Message-ID: E1Pdhy6-0007a6-NB@gemulon.postgresql.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Exit from base backups when shutdown is requested

When the exit waits until the whole backup completes, it may take
a very long time.

In passing, add back an error check in the main loop so we detect
clients that disconnect much earlier if the backup is large.

Branch
------
master

Details
-------
http://git.postgresql.org/gitweb?p=postgresql.git;a=commitdiff;h=688423d004f4092aed73c73a3281c281d476436d

Modified Files
--------------
src/backend/replication/basebackup.c | 14 +++++++++++++-
src/backend/replication/walsender.c | 16 ++++++++--------
src/include/replication/walsender.h | 2 ++
3 files changed, 23 insertions(+), 9 deletions(-)


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Magnus Hagander <magnus(at)hagander(dot)net>
Cc: pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:10:01
Message-ID: 1295007001.12442.63.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, 2011-01-14 at 11:37 +0000, Magnus Hagander wrote:
> Exit from base backups when shutdown is requested
>
> When the exit waits until the whole backup completes, it may take
> a very long time.
>
> In passing, add back an error check in the main loop so we detect
> clients that disconnect much earlier if the backup is large.

Please make that the last commit in this area for next week.

I want to get a base from which to solidify the sync rep code, and
associated patches.

I'm not saying there will be a code clash, but there may be a clash of
detail or intention that will make life more difficult for testing.

Thanks,

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:16:05
Message-ID: 4D303E85.4000604@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 14.01.2011 14:10, Simon Riggs wrote:
> Please make that the last commit in this area for next week.
>
> I want to get a base from which to solidify the sync rep code, and
> associated patches.
>
> I'm not saying there will be a code clash, but there may be a clash of
> detail or intention that will make life more difficult for testing.

I'm sorry, but it doesn't work that way. There's at least one serious
bug in there still
(http://archives.postgresql.org/message-id/4D302326.1000000@enterprisedb.com),
and the multiple-concurrent-backups patch is pending review/commit. And
there's one more feature me & Magnus would like to get in before the
release: including all the WAL files required to restore from the backup
in the backup tar itself - we'll see if that makes the release or not.

None of that should conflict seriously with the synch rep code, although
it's hard to tell without seeing the patch. And even if it does, we'll
just resolve the conflict, merge conflicts are not such a big deal.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:21:05
Message-ID: AANLkTinfeNXLJ3rB56O7rUp85JN5h1Khig7kxzvjYbtn@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, Jan 14, 2011 at 13:16, Heikki Linnakangas
<heikki(dot)linnakangas(at)enterprisedb(dot)com> wrote:
> On 14.01.2011 14:10, Simon Riggs wrote:
>>
>> Please make that the last commit in this area for next week.
>>
>> I want to get a base from which to solidify the sync rep code, and
>> associated patches.
>>
>> I'm not saying there will be a code clash, but there may be a clash of
>> detail or intention that will make life more difficult for testing.
>
> I'm sorry, but it doesn't work that way. There's at least one serious bug in
> there still
> (http://archives.postgresql.org/message-id/4D302326.1000000@enterprisedb.com),
> and the multiple-concurrent-backups patch is pending review/commit. And
> there's one more feature me & Magnus would like to get in before the
> release: including all the WAL files required to restore from the backup in
> the backup tar itself - we'll see if that makes the release or not.

There's one more before that, which is the walsender parser patch. I
intend to get that in RSN, but the "include all wal files" will be a
while, though, I don't think either of us has started that one?

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


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:25:03
Message-ID: 1295007903.12442.76.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, 2011-01-14 at 14:16 +0200, Heikki Linnakangas wrote:
> On 14.01.2011 14:10, Simon Riggs wrote:
> > Please make that the last commit in this area for next week.
> >
> > I want to get a base from which to solidify the sync rep code, and
> > associated patches.
> >
> > I'm not saying there will be a code clash, but there may be a clash of
> > detail or intention that will make life more difficult for testing.
>
> I'm sorry, but it doesn't work that way. There's at least one serious
> bug in there still

I'm not clear why you haven't submitted this code to the CommitFest,
especially if it clearly hasn't been very well tested.

> None of that should conflict seriously with the synch rep code, although
> it's hard to tell without seeing the patch. And even if it does, we'll
> just resolve the conflict, merge conflicts are not such a big deal.

It's even easier if you don't cause them in the first place.

My request is not unreasonable. Please be helpful, as you would expect
me to be if the roles were reversed.

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services


From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Simon Riggs <simon(at)2ndquadrant(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:30:03
Message-ID: AANLkTimq=7M9TCM4DOW8PbBQE_Z7hmDHn6mfH_O3mSfA@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, Jan 14, 2011 at 7:25 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> My request is not unreasonable. Please be helpful, as you would expect
> me to be if the roles were reversed.

I can't remember anyone other than you ever requesting that.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


From: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>
To: Simon Riggs <simon(at)2ndQuadrant(dot)com>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 12:30:35
Message-ID: 4D3041EB.1040203@enterprisedb.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On 14.01.2011 14:25, Simon Riggs wrote:
> On Fri, 2011-01-14 at 14:16 +0200, Heikki Linnakangas wrote:
>> None of that should conflict seriously with the synch rep code, although
>> it's hard to tell without seeing the patch. And even if it does, we'll
>> just resolve the conflict, merge conflicts are not such a big deal.
>
> It's even easier if you don't cause them in the first place.
>
> My request is not unreasonable. Please be helpful, as you would expect
> me to be if the roles were reversed.

Feel free to submit the patch against the snapshot of today. I will fix
any merge conflict that arises from changes to the base-backup stuff.

--
Heikki Linnakangas
EnterpriseDB http://www.enterprisedb.com


From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Simon Riggs <simon(at)2ndquadrant(dot)com>, Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 17:22:30
Message-ID: 7836.1295025750@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Fri, Jan 14, 2011 at 7:25 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
>> My request is not unreasonable. Please be helpful, as you would expect
>> me to be if the roles were reversed.

> I can't remember anyone other than you ever requesting that.

Yes. As Heikki said, it doesn't work that way.

regards, tom lane


From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Heikki Linnakangas <heikki(dot)linnakangas(at)enterprisedb(dot)com>, Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Re: [COMMITTERS] pgsql: Exit from base backups when shutdown is requested
Date: 2011-01-14 18:09:11
Message-ID: 1295028551.23290.84.camel@ebony
Views: Raw Message | Whole Thread | Download mbox | Resend email
Lists: pgsql-committers pgsql-hackers

On Fri, 2011-01-14 at 07:30 -0500, Robert Haas wrote:
> On Fri, Jan 14, 2011 at 7:25 AM, Simon Riggs <simon(at)2ndquadrant(dot)com> wrote:
> > My request is not unreasonable. Please be helpful, as you would expect
> > me to be if the roles were reversed.
>
> I can't remember anyone other than you ever requesting that.

Meaning what? You're playing compliment to my originality? Thanks ;-)

--
Simon Riggs http://www.2ndQuadrant.com/books/
PostgreSQL Development, 24x7 Support, Training and Services