Re: Report: race conditions in WAL replay routines - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: Report: race conditions in WAL replay routines
Date
Msg-id CA+U5nMJRW8heGCdb8vtmz7pjqPj6OeOPyGJjzgW3yVCp1MrXtg@mail.gmail.com
Whole thread Raw
In response to Re: Report: race conditions in WAL replay routines  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: Report: race conditions in WAL replay routines  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Sun, Feb 5, 2012 at 11:14 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> Simon Riggs <simon@2ndQuadrant.com> writes:
>> Please post the patch rather than fixing directly. There's some subtle
>> stuff there and it would be best to discuss first.
>
> And here's a proposed patch for not throwing ERROR during replay of DROP
> TABLESPACE.  I had originally thought this would be a one-liner
> s/ERROR/LOG/, but on inspection destroy_tablespace_directories() really
> needs to be changed too, so that it doesn't throw error for unremovable
> directories.

Looks good.

The existing errmsg of "tablespace is not empty" doesn't cover all
reasons why tablespace was not removed.

The final message should have
errmsg "tablespace not fully removed"
errhint "you should resolve this manually if it causes further problems"

The errdetail is good.


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


pgsql-hackers by date:

Previous
From: Simon Riggs
Date:
Subject: Re: Report: race conditions in WAL replay routines
Next
From: Heikki Linnakangas
Date:
Subject: Re: 16-bit page checksums for 9.2