Skip to content

Commit bf347c6

Browse files
committed
Fix crash in CREATE UNLOGGED TABLE.
The code that created the init fork neglected to make sure that the relation was open at the smgr level before attempting to invoke smgr. This didn't happen every time; only when the relcache entry was rebuilt along the way. Per report from Garick Hamlin.
1 parent c573486 commit bf347c6

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/backend/catalog/heap.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1295,6 +1295,7 @@ heap_create_with_catalog(const char *relname,
12951295
{
12961296
Assert(relkind == RELKIND_RELATION || relkind == RELKIND_TOASTVALUE);
12971297

1298+
RelationOpenSmgr(new_rel_desc);
12981299
smgrcreate(new_rel_desc->rd_smgr, INIT_FORKNUM, false);
12991300
if (XLogIsNeeded())
13001301
log_smgrcreate(&new_rel_desc->rd_smgr->smgr_rnode.node,

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