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

Commit2fe6336

Browse files
committed
Avoid creating a TOAST table for a partitioned table.
It's useless.Amit LangoteDiscussion:http://postgr.es/m/b4c9dee6-d134-49b8-79c4-07fbd7c3b898@lab.ntt.co.jp
1 parent8a8c4f3 commit2fe6336

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

‎src/backend/catalog/toasting.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -397,6 +397,7 @@ create_toast_table(Relation rel, Oid toastOid, Oid toastIndexOid,
397397
* (1) there are any toastable attributes, and (2) the maximum length
398398
* of a tuple could exceed TOAST_TUPLE_THRESHOLD. (We don't want to
399399
* create a toast table for something like "f1 varchar(20)".)
400+
* No need to create a TOAST table for partitioned tables.
400401
*/
401402
staticbool
402403
needs_toast_table(Relationrel)
@@ -408,6 +409,9 @@ needs_toast_table(Relation rel)
408409
int32tuple_length;
409410
inti;
410411

412+
if (rel->rd_rel->relkind==RELKIND_PARTITIONED_TABLE)
413+
return false;
414+
411415
tupdesc=rel->rd_att;
412416

413417
for (i=0;i<tupdesc->natts;i++)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp