Skip to content

Commit d00fbdc

Browse files
committed
Fix use-after-ReleaseSysCache problem in ATExecAlterColumnType.
Introduced by commit bbe0a81. Per buildfarm member prion.
1 parent bbe0a81 commit d00fbdc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11953,8 +11953,6 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
1195311953
attTup->attalign = tform->typalign;
1195411954
attTup->attstorage = tform->typstorage;
1195511955

11956-
ReleaseSysCache(typeTuple);
11957-
1195811956
/* Setup attribute compression */
1195911957
if (rel->rd_rel->relkind == RELKIND_RELATION ||
1196011958
rel->rd_rel->relkind == RELKIND_PARTITIONED_TABLE)
@@ -11972,6 +11970,8 @@ ATExecAlterColumnType(AlteredTableInfo *tab, Relation rel,
1197211970
else
1197311971
attTup->attcompression = InvalidCompressionMethod;
1197411972

11973+
ReleaseSysCache(typeTuple);
11974+
1197511975
CatalogTupleUpdate(attrelation, &heapTup->t_self, heapTup);
1197611976

1197711977
table_close(attrelation, RowExclusiveLock);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy