Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb52c4fc

Browse files
Add TOAST table to pg_index.
This change allows pg_index rows to use out-of-line storage for the"indexprs" and "indpred" columns, which enables use-cases such asvery large index expressions.This system catalog was previously not given a TOAST table due to afear of circularity issues (see commit96cdeae). Testing hasnot revealed any such problems, and it seems unlikely that theentries for system indexes could ever need out-of-line storage. Inany case, it is still early in the v18 development cycle, socommitting this now will hopefully increase the chances of findingany unexpected problems prior to release.Bumps catversion.Reported-by: Jonathan KatzReviewed-by: Tom LaneDiscussion:https://postgr.es/m/b611015f-b423-458c-aa2d-be0e655cc1b4%40postgresql.org
1 parenta7c39db commitb52c4fc

File tree

4 files changed

+8
-8
lines changed

4 files changed

+8
-8
lines changed

‎src/include/catalog/catversion.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,6 @@
5757
*/
5858

5959
/*yyyymmddN */
60-
#defineCATALOG_VERSION_NO202409181
60+
#defineCATALOG_VERSION_NO202409182
6161

6262
#endif

‎src/include/catalog/pg_index.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,8 @@ CATALOG(pg_index,2610,IndexRelationId) BKI_SCHEMA_MACRO
6969
*/
7070
typedefFormData_pg_index*Form_pg_index;
7171

72+
DECLARE_TOAST_WITH_MACRO(pg_index,8149,8150,PgIndexToastTable,PgIndexToastIndex);
73+
7274
DECLARE_INDEX(pg_index_indrelid_index,2678,IndexIndrelidIndexId,pg_index,btree(indrelidoid_ops));
7375
DECLARE_UNIQUE_INDEX_PKEY(pg_index_indexrelid_index,2679,IndexRelidIndexId,pg_index,btree(indexrelidoid_ops));
7476

‎src/test/regress/expected/misc_sanity.out

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,8 @@ WHERE refclassid = 0 OR refobjid = 0 OR
3535
-- Look for system tables with varlena columns but no toast table. All
3636
-- system tables with toastable columns should have toast tables, with
3737
-- the following exceptions:
38-
-- 1. pg_class, pg_attribute,andpg_index, due to fear of recursive
39-
--dependencies astoast tables depend on them.
38+
-- 1. pg_classandpg_attribute, due to fear of recursive dependencies as
39+
-- toast tables depend on them.
4040
-- 2. pg_largeobject and pg_largeobject_metadata. Large object catalogs
4141
-- and toast tables are mutually exclusive and large object data is handled
4242
-- as user data by pg_upgrade, which would cause failures.
@@ -56,11 +56,9 @@ ORDER BY 1, 2;
5656
pg_class | relacl | aclitem[]
5757
pg_class | reloptions | text[]
5858
pg_class | relpartbound | pg_node_tree
59-
pg_index | indexprs | pg_node_tree
60-
pg_index | indpred | pg_node_tree
6159
pg_largeobject | data | bytea
6260
pg_largeobject_metadata | lomacl | aclitem[]
63-
(11 rows)
61+
(9 rows)
6462

6563
-- system catalogs without primary keys
6664
--

‎src/test/regress/sql/misc_sanity.sql

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,8 +38,8 @@ WHERE refclassid = 0 OR refobjid = 0 OR
3838
-- Look for system tables with varlena columns but no toast table. All
3939
-- system tables with toastable columns should have toast tables, with
4040
-- the following exceptions:
41-
-- 1. pg_class, pg_attribute,andpg_index, due to fear of recursive
42-
--dependencies astoast tables depend on them.
41+
-- 1. pg_classandpg_attribute, due to fear of recursive dependencies as
42+
-- toast tables depend on them.
4343
-- 2. pg_largeobject and pg_largeobject_metadata. Large object catalogs
4444
-- and toast tables are mutually exclusive and large object data is handled
4545
-- as user data by pg_upgrade, which would cause failures.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp