Re: allow_in_place_tablespaces vs. pg_basebackup - Mailing list pgsql-hackers

From Robert Haas
Subject Re: allow_in_place_tablespaces vs. pg_basebackup
Date
Msg-id CA+TgmoY9O6D_i_+f2UkgkyiF4V22Tzqv1aFxboGYDw=-d4xDLg@mail.gmail.com
Whole thread Raw
In response to Re: allow_in_place_tablespaces vs. pg_basebackup  (Thomas Munro <thomas.munro@gmail.com>)
Responses Re: allow_in_place_tablespaces vs. pg_basebackup  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
On Wed, Mar 8, 2023 at 9:52 PM Thomas Munro <thomas.munro@gmail.com> wrote:
> Yeah.  We knew that this didn't work (was discussed in a couple of
> other threads), but you might be right that an error would be better
> for now.  It's absolutely not a user facing mode of operation, it was
> intended just for the replication tests.  Clearly it might be useful
> for testing purposes in the backup area too, which is probably how
> Robert got here.  I will think about what changes would be needed as I
> am looking at backup code currently, but I'm not sure when I'll be
> able to post a patch so don't let that stop anyone else who sees how
> to get it working...

If there had been an error message like "ERROR: pg_basebackup cannot
back up a database that contains in-place tablespaces," it would have
saved me a lot of time yesterday. If there had at least been a
documentation mention, I would have found it eventually (but not
nearly as quickly). As it is, the only reference to this topic in the
repository seems to be c6f2f01611d4f2c412e92eb7893f76fa590818e8, "Fix
pg_basebackup with in-place tablespaces," which makes it look like
this is supposed to be working.

I also think that if we're going to have in-place tablespaces, it's a
good idea for them to work with pg_basebackup. I wasn't really looking
to test pg_basebackup with this feature (although it's a good idea); I
was just trying to make sure I didn't break in-place tablespaces while
working on something else. I think it's sometimes OK to add stuff for
testing that doesn't work with absolutely everything we have in the
system, but the tablespace code is awfully closely related to the
pg_basebackup code for them to just not work together at all.

Now that I'm done grumbling, here's a patch.

--
Robert Haas
EDB: http://www.enterprisedb.com

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: buildfarm + meson
Next
From: Melanie Plageman
Date:
Subject: Sub-millisecond [autovacuum_]vacuum_cost_delay broken