On Sun, Feb 18, 2018 at 04:43:38PM -0800, Patrick Krecker wrote: > On Tue, Feb 13, 2018 at 8:24 PM, Michael Paquier <mich...@paquier.xyz> wrote: >> Let's be clear here. There is no hard restriction with tablespace paths >> within the data directory, though you should not do that, and you get a >> nice warning when trying to do so with CREATE TABLESPACE (see 33cb8ff6). >> This also causes pg_basebackup to fail. It is also bad design to create >> tablespaces within the data directory as those are aimed at making hot >> paths work on different partitions with different I/O properties. > > Sorry, my language was imprecise here. What I meant is that the > pg_tablespace directory contains no symlinks when a tablespace > creation is streamed to a replica, i.e. the data files reside within > pg_tablespace on the replica.
There is nothing preventing you to do so I think, and base backups should work properly as basebackup.c just loops through the paths of the tablespace links, which leads to errors if the links are within the data folder itself. I don't think that we would want a mode where CREATE TABLESPACE does not create a link at recovery as well, be it controlled by a system-wide GUC or a switch at DDL level. That's more likely to trap users by putting hot data on the same partition as the data folder. > Thank you for the response. I would suggest that we link to it from > the wiki so as to provide clarification to future readers of the todo > list. Good idea! I have just updated the wiki page with a link to my previous post. -- Michael
signature.asc
Description: PGP signature