PG15: Handle extra argument to RelationCreateStorage.

Account for PG commit 9c08aea6a309. Introduce
RelationCreateStorage_compat.
pull/5920/head
Jeff Davis 2022-04-09 10:54:15 -07:00 committed by jeff-davis
parent ac952b2cc2
commit 1c1ef7ab8d
3 changed files with 6 additions and 2 deletions

View File

@ -881,7 +881,7 @@ columnar_relation_set_new_filenode(Relation rel,
*freezeXid = RecentXmin;
*minmulti = GetOldestMultiXactId();
SMgrRelation srel = RelationCreateStorage(*newrnode, persistence);
SMgrRelation srel = RelationCreateStorage_compat(*newrnode, persistence, true);
ColumnarStorageInit(srel, ColumnarMetadataNewStorageId());
InitColumnarOptions(rel->rd_id);

View File

@ -326,7 +326,7 @@ fake_relation_set_new_filenode(Relation rel,
*/
*minmulti = GetOldestMultiXactId();
SMgrRelation srel = RelationCreateStorage(*newrnode, persistence);
SMgrRelation srel = RelationCreateStorage_compat(*newrnode, persistence, true);
/*
* If required, set up an init fork for an unlogged table so that it can

View File

@ -14,11 +14,15 @@
#include "distributed/pg_version_constants.h"
#if PG_VERSION_NUM >= PG_VERSION_15
#define ProcessCompletedNotifies()
#define RelationCreateStorage_compat(a, b, c) RelationCreateStorage(a, b, c)
#else
#include "storage/smgr.h"
#include "utils/rel.h"
#define RelationCreateStorage_compat(a, b, c) RelationCreateStorage(a, b)
static inline SMgrRelation
RelationGetSmgr(Relation rel)
{