yugabyte/yugabyte-db

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

Open

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

在 GitHub 查看
 (0 留言) (0 反應) (0 負責人)C (1,003 fork)batch import
area/ysqlgood first issuekind/bugpriority/mediumstatus/awaiting-triage

倉庫指標

Star
 (8,229 star)
PR 合併指標
 (平均合併 17天 21小時) (30 天內合併 92 個 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.

貢獻者指南