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

Commit9315ff5

Browse files
committed
Ensure attcacheoff is written out as -1 when writing pg_attribute
tuples for a relation. Needed to prevent Assert failure in CLUSTER.
1 parent473763e commit9315ff5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

‎src/backend/catalog/heap.c

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
*
99
*
1010
* IDENTIFICATION
11-
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.155 2000/12/27 23:59:11 tgl Exp $
11+
* $Header: /cvsroot/pgsql/src/backend/catalog/heap.c,v 1.156 2001/01/01 21:33:31 tgl Exp $
1212
*
1313
*
1414
* INTERFACE ROUTINES
@@ -590,8 +590,11 @@ AddNewAttributeTuples(Oid new_rel_oid,
590590
dpp=tupdesc->attrs;
591591
for (i=0;i<natts;i++)
592592
{
593+
/* Fill in the correct relation OID */
593594
(*dpp)->attrelid=new_rel_oid;
595+
/* Make sure these are OK, too */
594596
(*dpp)->attdispersion=0;
597+
(*dpp)->attcacheoff=-1;
595598

596599
tup=heap_addheader(Natts_pg_attribute,
597600
ATTRIBUTE_TUPLE_SIZE,
@@ -613,8 +616,12 @@ AddNewAttributeTuples(Oid new_rel_oid,
613616
dpp=HeapAtt;
614617
for (i=0;i<-1-FirstLowInvalidHeapAttributeNumber;i++)
615618
{
619+
/* Fill in the correct relation OID */
620+
/* HACK: we are writing on static data here */
616621
(*dpp)->attrelid=new_rel_oid;
617-
/* (*dpp)->attdispersion = 0; unneeded */
622+
/* Unneeded since they should be OK in the constant data anyway */
623+
/* (*dpp)->attdispersion = 0; */
624+
/* (*dpp)->attcacheoff = -1; */
618625

619626
tup=heap_addheader(Natts_pg_attribute,
620627
ATTRIBUTE_TUPLE_SIZE,

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp