On Wed, Mar 8, 2023 at 9:52 PM Thomas Munro <thomas.mu...@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
v1-0001-Fix-pg_basebackup-with-in-place-tablespaces-some-.patch
Description: Binary data