Re: replay of CREATE TABLESPACE eats data at wal_level=minimal

From: Noah Misch <noah(at)leadboat(dot)com>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>
Subject: Re: replay of CREATE TABLESPACE eats data at wal_level=minimal
Date: 2021-08-22 22:59:44
Message-ID: 20210822225944.GA1817965@rfd.leadboat.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Wed, Aug 18, 2021 at 10:32:10PM -0700, Noah Misch wrote:
> On Wed, Aug 18, 2021 at 10:47:24AM -0400, Robert Haas wrote:
> > On Tue, Aug 10, 2021 at 9:35 AM Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> > > Oh, yeah, I think that works, actually. I was imagining a few problems
> > > here, but I don't think they really exist. The redo routines for files
> > > within the directory can't possibly care about having the old files
> > > erased for them, since that wouldn't be something that would normally
> > > happen, if there were no recent CREATE TABLESPACE involved. And
> > > there's code further down to remove and recreate the symlink, just in
> > > case. So I think your proposed patch might be all we need.
> >
> > Noah, do you plan to commit this?
>
> Yes. I feel it needs a test case, which is the main reason I've queued the
> task rather than just pushed what I posted last.

Here's what I plan to push. Besides adding a test, I modified things so
CREATE TABLESPACE redo continues to report an error if a non-directory exists
under the name we seek to create. One could argue against covering that
corner case, but TablespaceCreateDbspace() does cover it.

Attachment Content-Type Size
XLOG_TBLSPC_CREATE-minimal-v1.patch text/plain 5.3 KB

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Mark Dilger 2021-08-23 00:26:40 Improved regular expression error message for backrefs
Previous Message Pavel Stehule 2021-08-22 17:38:39 Re: proposal: enhancing plpgsql debug API - returns text value of variable content