Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)

From: Florian Pflug <fgp(at)phlo(dot)org>
To: Greg Jaskiewicz <gj(at)pointblue(dot)com(dot)pl>
Cc: Magnus Hagander <magnus(at)hagander(dot)net>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)
Date: 2011-10-19 15:54:22
Message-ID: 58DF6C4A-A6AF-48F4-ACC4-CA5521FDC82B@phlo.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Oct19, 2011, at 17:47 , Greg Jaskiewicz wrote:
> On 15 Oct 2011, at 11:31, Florian Pflug wrote:
>>
>> Ok, here's a first cut.
>
> So I looked at the patch, and first thing that pops out,
> is lack of the volatile keyword before the ClientConnectionLostPending variable is defined. Is that done on purpose ? Is that on purpose ?

That's on purpose. volatile is only necessary for variables which are either accessed from within signal handlers or which live in shared memory. Neither is true for ClientConnectionLostPending, so non-volatile should be fine.

> Otherwise the patch itself looks ok.
> I haven't tested the code, just reviewed the patch itself. And it obviously needs testing, should be easy to follow your original problem description.

Yeah, further testing is on my todo list. The interesting case is probably what happens if the connection is dropped while there's already a cancellation request pending. And also the other way around - a cancellation request arriving after we've already discovered that the connection is gone.

> Btw, I just tried to do it through commitfest.postgresql.org , but before I get my head around on how to add myself to the reviewer list there - I thought I'll just send this response here.

You just need to click "Edit Patch" and put your name into the Reviewer field. You do need a postgres community account to edit patches, but the signup process is quite quick and painless AFAIR.

best regards,
Florian Pflug

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2011-10-19 16:01:39 Re: [v9.2] DROP statement reworks
Previous Message Greg Jaskiewicz 2011-10-19 15:47:14 Re: Bug in walsender when calling out to do_pg_stop_backup (and others?)