pgsql: Fix pg_basebackup with in-place tablespaces some more.

2023-04-18 Thread Robert Haas
Fix pg_basebackup with in-place tablespaces some more. Commit c6f2f01611d4f2c412e92eb7893f76fa590818e8 purported to make this work, but problems remained. In a plain-format backup, the files from an in-place tablespace got included in the tar file for the main tablespace, which is wrong but it's n

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-16 Thread David Steele
On 3/16/22 13:33, Thomas Munro wrote: It seems that the warning at line 8313 is essentially dead code now. I don't expect test code to have an impact on production systems, even if the effect is minor. It's not dead, it's how we'd report something like EACCES or EIO. Why we only warn and pre

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-16 Thread Thomas Munro
On Thu, Mar 17, 2022 at 3:29 AM David Steele wrote: > Sure, but there is a behavioral change whether the GUC is enabled or > not. Before, if there was clutter in pg_tblspc there would at least be a > warning in the log. Now that logging does not happen. If there's clutter that doesn't look like a

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-16 Thread David Steele
On 3/15/22 23:42, Kyotaro Horiguchi wrote: At Wed, 16 Mar 2022 11:13:53 +1300, Thomas Munro wrote in On Wed, Mar 16, 2022 at 10:28 AM Tom Lane wrote: David Steele writes: On 3/14/22 19:31, Thomas Munro wrote: Fix pg_basebackup with in-place tablespaces. Perhaps I'm being picky, but see

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-15 Thread Kyotaro Horiguchi
At Wed, 16 Mar 2022 11:13:53 +1300, Thomas Munro wrote in > On Wed, Mar 16, 2022 at 10:28 AM Tom Lane wrote: > > David Steele writes: > > > On 3/14/22 19:31, Thomas Munro wrote: > > >> Fix pg_basebackup with in-place tablespaces. > > > > > Perhaps I'm being picky, but seems like this logic sho

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-15 Thread Thomas Munro
On Wed, Mar 16, 2022 at 10:28 AM Tom Lane wrote: > David Steele writes: > > On 3/14/22 19:31, Thomas Munro wrote: > >> Fix pg_basebackup with in-place tablespaces. > > > Perhaps I'm being picky, but seems like this logic should be wrapped in: > > if (allow_in_place_tablespaces) > > { > > <..

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-15 Thread Tom Lane
David Steele writes: > On 3/14/22 19:31, Thomas Munro wrote: >> Fix pg_basebackup with in-place tablespaces. > Perhaps I'm being picky, but seems like this logic should be wrapped in: > if (allow_in_place_tablespaces) > { > <...> > } > I worry about strange effects when this GUC is not enabl

Re: pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-15 Thread David Steele
On 3/14/22 19:31, Thomas Munro wrote: Fix pg_basebackup with in-place tablespaces. Previously, pg_basebackup from a cluster that contained an 'in-place' tablespace, as introduced by commit 7170f215, would produce a harmless warning on Unix and fail completely on Windows. Perhaps I'm being pick

pgsql: Fix pg_basebackup with in-place tablespaces.

2022-03-14 Thread Thomas Munro
Fix pg_basebackup with in-place tablespaces. Previously, pg_basebackup from a cluster that contained an 'in-place' tablespace, as introduced by commit 7170f215, would produce a harmless warning on Unix and fail completely on Windows. Reported-by: Kyotaro Horiguchi Reviewed-by: Kyotaro Horiguchi