{"Entry":{"collection":"guc","key":"allow_in_place_tablespaces","name":"allow_in_place_tablespaces","aliases":[],"metadata":{"baseline":false,"boot_human":"Not specified","boot_val":null,"category":"Developer Options","category_zh":"","changed_in":[],"changes":[{"documentation_changed":false,"fields":{},"from":"9.6","status":"added","to":"10"},{"documentation_changed":true,"fields":{},"from":"14","status":"changed","to":"15"}],"content_hash":"c459050887064e839ce5d04742eac58ea45d0ff76414e7684916aa905791c03d","context":"","default_changed_in":[],"default_history":[{"from":"10","to":"19","value":"off"}],"editorial":{"advice":{"olap":"Long analytical runs can amplify allow_in_place_tablespaces's debug overhead and artifacts. Prefer standard EXPLAIN and statistics first, and isolate any developer experiment from normal users.","oltp":"Do not tune production OLTP with allow_in_place_tablespaces. Enable it only for a bounded reproduction with an owner, log/disk budget, rollback condition, and evidence-capture plan; restore the default immediately afterward.","small":"Keep allow_in_place_tablespaces at its upstream default. A small host has less spare CPU, disk, connection, and log capacity for developer instrumentation."},"mechanism":["allow_in_place_tablespaces lets a superuser create a tablespace with an empty location directly under pg_tblspc instead of using the normal external-location symbolic link. It exists to test primary and standby instances on one machine.","The directory layout violates assumptions made by backup and tablespace-management tools, which normally expect pg_tblspc entries to be links. It does not make colocated tablespaces independent storage.","The switch is consulted for the privileged CREATE TABLESPACE operation and is not a performance setting. Objects created this way can remain after the setting is turned off. Its superuser context permits an authorized session change without a server restart."],"pitfalls":["Leaving allow_in_place_tablespaces enabled after the bounded diagnostic or recovery task.","Running the experiment on the only copy of production data.","Underestimating log, core-file, temporary-file, WAL, CPU, or connection-slot amplification.","Treating a server that merely starts or completes a query as proof that data and behavior are correct."],"references":[{"title":"PostgreSQL 19 Beta 4: allow_in_place_tablespaces","url":"https://www.postgresql.org/docs/19/runtime-config-developer.html#GUC-ALLOW-IN-PLACE-TABLESPACES"},{"title":"PostgreSQL 19 release notes","url":"https://www.postgresql.org/docs/19/release-19.html"}],"related":["data_directory","wal_level","hot_standby","archive_mode"],"summary":"allow_in_place_tablespaces — Allows tablespaces directly inside pg_tblspc, for testing. Observed in PG10–19 Beta 4; its last measured boot default is off in PG19 Beta 4, with superuser context. This is a beta-snapshot fact and can change before PostgreSQL 19 GA."},"enumvals":[],"first_version":"10","group":"Developer Options","group_slug":"developer","imported_at":"2026-09-27T17:57:30.737761+08:00","intro_commit":{"authored_at":"2022-07-27T07:55:12+02:00","discussion":["https://postgr.es/m/20220722081858.omhn2in5zt3g4nek@alvherre.pgsql"],"hash":"7bdbbb87340f4cb9f262320a28be8f87d4c38308","subject":"Allow \"in place\" tablespaces.","url":"https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=7bdbbb87340f4cb9f262320a28be8f87d4c38308"},"key":"allow_in_place_tablespaces","last_version":"20","max_val":"","min_val":"","name":"allow_in_place_tablespaces","position":5,"present_in":["10","11","12","13","14","15","16","17","18","19","20"],"short_desc":"Allows tablespaces to be created as directories inside pg_tblspc, when an empty location string is provided to the CREATE TABLESPACE command.","short_desc_zh":"","source_rev":"english-manuals:d74dbc270b29b681ec833df3d48e516307fc769bc694456e18f56e842a82c9f2","unit":"","vartype":"bool"}},"Definition":{"Collection":"guc","Key":"allow_in_place_tablespaces","SourceDatabase":"center","Version":"18","SourceTable":"guc","SourceKey":"allow_in_place_tablespaces","SourceRevision":"english-manuals:d74dbc270b29b681ec833df3d48e516307fc769bc694456e18f56e842a82c9f2","Facts":{"boot_val":"off","category":"Developer Options","context":"superuser","description":"Allows tablespaces to be created as directories inside pg_tblspc, when an empty location string is provided to the CREATE TABLESPACE command. This is intended to allow testing replication scenarios where primary and standby servers are running on the same machine. Such directories are likely to confuse backup tools that expect to find only symbolic links in that location. Only superusers and users with the appropriate SET privilege can change this setting.","doc":{"anchor":"GUC-ALLOW-IN-PLACE-TABLESPACES","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"},"documented":true,"enumvals":null,"extra_desc":null,"lang":"en","max_val":null,"metadata_version":"18","min_val":null,"name":"allow_in_place_tablespaces","short_desc":"Allows tablespaces directly inside pg_tblspc, for testing.","source":"pg-settings-source-snapshot","unit":null,"vartype":"bool"},"ManualEvidence":{"doc":{"anchor":"GUC-ALLOW-IN-PLACE-TABLESPACES","file":"runtime-config-developer.html","lang":"en","sha256":"f5e7e39d176c642ac0799c87669ce2f6f60fcd97d109e290860ec74c36d7ecad","slug":"18"}},"MeasuredEvidence":{"metadata_version":"18"}},"Text":{"Collection":"guc","Key":"allow_in_place_tablespaces","SourceDatabase":"center","Version":"18","Locale":"en","Title":"allow_in_place_tablespaces","Summary":"Allows tablespaces to be created as directories inside pg_tblspc, when an empty location string is provided to the CREATE TABLESPACE command. This is intended to allow testing replication scenarios where primary and standby servers are running on the same machine. Such directories are likely to confuse backup tools that expect to find only symbolic links in that location. Only superusers and users with the appropriate SET privilege can change this setting.","BodyHTML":"\u003cp\u003eAllows tablespaces to be created as directories inside pg_tblspc, when an empty location string is provided to the CREATE TABLESPACE command. This is intended to allow testing replication scenarios where primary and standby servers are running on the same machine. Such directories are likely to confuse backup tools that expect to find only symbolic links in that location. Only superusers and users with the appropriate SET privilege can change this setting.\u003c/p\u003e","SourceRevision":"english-manuals:d74dbc270b29b681ec833df3d48e516307fc769bc694456e18f56e842a82c9f2","ContentHash":"e76fd4d7b1dda93c0a586a639687566eadcff6d251c55b7752a43450a8d3ee1d","Payload":{"description":"Allows tablespaces to be created as directories inside pg_tblspc, when an empty location string is provided to the CREATE TABLESPACE command. This is intended to allow testing replication scenarios where primary and standby servers are running on the same machine. Such directories are likely to confuse backup tools that expect to find only symbolic links in that location. Only superusers and users with the appropriate SET privilege can change this setting."}},"RequestedLocale":"zh-Hans","Fallback":true,"Versions":["10","11","12","13","14","15","16","17","18","19","20"],"Locales":["en"],"Signatures":null,"Spellings":null,"SQLState":null,"Evidence":null}
