Skip to content

Commit 9a40a03

Browse files
committed
Make our back branches build under -fkeep-inline-functions.
Add "#ifndef FRONTEND" where necessary to make pg_waldump build on compilers that don't elide unused static-inline functions. This back-patches relevant parts of commit 3e9ca52, fixing build breakage from dc7420c and back-patching of f10f0ae. Per recently-resurrected buildfarm member castoroides. We aren't expecting castoroides to build anything newer than v11, but we might as well clean up the intermediate branches while at it.
1 parent 488e89b commit 9a40a03

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

src/include/utils/rel.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -538,6 +538,7 @@ typedef struct ViewOptions
538538
(RELKIND_HAS_STORAGE((relation)->rd_rel->relkind) && \
539539
((relation)->rd_rel->relfilenode == InvalidOid))
540540

541+
#ifndef FRONTEND
541542
/*
542543
* RelationGetSmgr
543544
* Returns smgr file handle for a relation, opening it if needed.
@@ -558,6 +559,7 @@ RelationGetSmgr(Relation rel)
558559
smgrsetowner(&(rel->rd_smgr), smgropen(rel->rd_node, rel->rd_backend));
559560
return rel->rd_smgr;
560561
}
562+
#endif /* !FRONTEND */
561563

562564
/*
563565
* RelationCloseSmgr

src/include/utils/snapmgr.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,11 +97,13 @@ extern PGDLLIMPORT SnapshotData CatalogSnapshotData;
9797
((snapshot)->snapshot_type == SNAPSHOT_MVCC || \
9898
(snapshot)->snapshot_type == SNAPSHOT_HISTORIC_MVCC)
9999

100+
#ifndef FRONTEND
100101
static inline bool
101102
OldSnapshotThresholdActive(void)
102103
{
103104
return old_snapshot_threshold >= 0;
104105
}
106+
#endif
105107

106108
extern Snapshot GetTransactionSnapshot(void);
107109
extern Snapshot GetLatestSnapshot(void);

0 commit comments

Comments
 (0)