Re: crash-recovery replay of CREATE TABLESPACE is broken in HEAD

Bruce Momjian <bruce@momjian.us>

From: Bruce Momjian <bruce@momjian.us>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>, pgsql-hackers@postgresql.org
Date: 2010-07-18T15:54:51Z
Lists: pgsql-hackers

Attachments

Tom Lane wrote:
> Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> writes:
> > Maybe you should check that it points to the right location? Or drop and 
> > recreate the symlink, and ignore failure at mkdir.
> 
> More specifically, ignore EEXIST failure when replaying mkdir.  Anything
> else is still a problem.

Thanks for the help.  I tried to find somewhere else in our recovery
code that was similar but didn't find anything.

The attached patch does as suggested.  I added the recovery code to the
create tablespace function so I didn't have to duplicate all the code
that computes the path names.

Attached.

-- 
  Bruce Momjian  <bruce@momjian.us>        http://momjian.us
  EnterpriseDB                             http://enterprisedb.com

  + None of us is going to be here forever. +