Content-Length: 257469 | pFad | http://github.com/postgrespro/postgres/commit/bf347c60bdd7e05800f0c06d03e2ad87aeaa5e09

69 Fix crash in CREATE UNLOGGED TABLE. · postgrespro/postgres@bf347c6 · GitHub
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)








ApplySandwichStrip

pFad - (p)hone/(F)rame/(a)nonymizer/(d)eclutterfier!      Saves Data!


--- a PPN by Garber Painting Akron. With Image Size Reduction included!

Fetched URL: http://github.com/postgrespro/postgres/commit/bf347c60bdd7e05800f0c06d03e2ad87aeaa5e09

Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy