yugabyte/yugabyte-db

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

Open

#27,746 opened on 2025年6月24日

GitHub で見る
 (0 comments) (0 reactions) (0 assignees)C (1,003 forks)batch import
area/ysqlgood first issuekind/bugpriority/mediumstatus/awaiting-triage

Repository metrics

Stars
 (8,229 stars)
PR merge metrics
 (平均マージ 17d 21h) (30d で 92 merged PRs)

説明

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.

コントリビューターガイド