yugabyte/yugabyte-db

[YSQL] Disallow setting temp_tablespaces GUC or make it a no-op

開放

#27,746 建立於 2025年6月24日

 (0 則留言) (0 個反應) (0 位負責人)C (1,003 個分叉)batch import
area/ysqlgood first issuekind/bugpriority/mediumstatus/awaiting-triage

倉庫指標

星標
 (8,229 顆星)
PR 合併指標
 (PR 指標待抓取)

描述

Jira Link: DB-17344

Description

Setting temp_tablespaces leads to errors, whether they are created in PG style or YB style.

yugabyte=# create tablespace rf1 with (replica_placement='{"num_replicas":1, "placement_blocks":[{"cloud": "cloud1", "region":"datacenter1", "zone":"rack1","min_num_replicas":1}]}');
CREATE TABLESPACE
yugabyte=# set temp_tablespaces = 'rf1';
yugabyte=# create tablespace tmp_foo location '/tmp/foo';
WARNING:  LOCATION not supported yet and will be ignored
LINE 1: create tablespace tmp_foo location '/tmp/foo';

Setting this GUC will lead to temp table creation failing.

yugabyte=# set temp_tablespaces = 'tmp_foo';
SET
yugabyte=# create temp table foo(id int);
ERROR:  could not create directory "pg_tblspc/16385/PG_15_202209061/13515": No such file or directory

To support migrations from users who have this set, we could no-op and warn that it is not supported instead of failing the temp table creation.

Issue Type

kind/bug

Warning: Please confirm that this issue does not contain any sensitive information

  • I confirm this issue does not contain any sensitive information.

貢獻者指南