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

Commit0a9cbcb

Browse files
committed
Get rid of the pg_shdepend entry for a TOAST table; it's unnecessary since
there's an indirect dependency on the owner via the parent table. We werealready handling indexes that way, but not toast tables for some reason.Saves a little catalog space and cuts down the verbosity of checkSharedDependenciesreports.
1 parent2b32153 commit0a9cbcb

File tree

2 files changed

+11
-6
lines changed

2 files changed

+11
-6
lines changed

‎src/backend/catalog/heap.c

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.320 2007/05/12 00:54:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/catalog/heap.c,v 1.321 2007/05/14 20:24:41 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -958,10 +958,14 @@ heap_create_with_catalog(const char *relname,
958958
* namespace is. Also make a dependency link to its owner.
959959
*
960960
* For composite types, these dependencies are tracked for the pg_type
961-
* entry, so we needn't record them here. Also, skip this in bootstrap
962-
* mode, since we don't make dependencies while bootstrapping.
961+
* entry, so we needn't record them here. Likewise, TOAST tables don't
962+
* need a namespace dependency (they live in a pinned namespace) nor an
963+
* owner dependency (they depend indirectly through the parent table).
964+
* Also, skip this in bootstrap mode, since we don't make dependencies
965+
* while bootstrapping.
963966
*/
964967
if (relkind!=RELKIND_COMPOSITE_TYPE&&
968+
relkind!=RELKIND_TOASTVALUE&&
965969
!IsBootstrapProcessingMode())
966970
{
967971
ObjectAddressmyself,

‎src/backend/commands/tablecmds.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.222 2007/05/12 00:54:59 tgl Exp $
11+
* $PostgreSQL: pgsql/src/backend/commands/tablecmds.c,v 1.223 2007/05/14 20:24:41 tgl Exp $
1212
*
1313
*-------------------------------------------------------------------------
1414
*/
@@ -5478,10 +5478,11 @@ ATExecChangeOwner(Oid relationOid, Oid newOwnerId, bool recursing)
54785478
/*
54795479
* Update owner dependency reference, if any. A composite type has
54805480
* none, because it's tracked for the pg_type entry instead of here;
5481-
* indexes don't have their own entries either.
5481+
* indexesand TOAST tablesdon't have their own entries either.
54825482
*/
54835483
if (tuple_class->relkind!=RELKIND_COMPOSITE_TYPE&&
5484-
tuple_class->relkind!=RELKIND_INDEX)
5484+
tuple_class->relkind!=RELKIND_INDEX&&
5485+
tuple_class->relkind!=RELKIND_TOASTVALUE)
54855486
changeDependencyOnOwner(RelationRelationId,relationOid,
54865487
newOwnerId);
54875488

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp