Skip to content

Commit

Permalink
Make our back branches build under -fkeep-inline-functions.
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tglsfdc committed Jan 20, 2023
1 parent 488e89b commit 9a40a03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/include/utils/rel.h
Expand Up @@ -538,6 +538,7 @@ typedef struct ViewOptions
(RELKIND_HAS_STORAGE((relation)->rd_rel->relkind) && \
((relation)->rd_rel->relfilenode == InvalidOid))

#ifndef FRONTEND
/*
* RelationGetSmgr
* Returns smgr file handle for a relation, opening it if needed.
Expand All @@ -558,6 +559,7 @@ RelationGetSmgr(Relation rel)
smgrsetowner(&(rel->rd_smgr), smgropen(rel->rd_node, rel->rd_backend));
return rel->rd_smgr;
}
#endif /* !FRONTEND */

/*
* RelationCloseSmgr
Expand Down
2 changes: 2 additions & 0 deletions src/include/utils/snapmgr.h
Expand Up @@ -97,11 +97,13 @@ extern PGDLLIMPORT SnapshotData CatalogSnapshotData;
((snapshot)->snapshot_type == SNAPSHOT_MVCC || \
(snapshot)->snapshot_type == SNAPSHOT_HISTORIC_MVCC)

#ifndef FRONTEND
static inline bool
OldSnapshotThresholdActive(void)
{
return old_snapshot_threshold >= 0;
}
#endif

extern Snapshot GetTransactionSnapshot(void);
extern Snapshot GetLatestSnapshot(void);
Expand Down

0 comments on commit 9a40a03

Please sign in to comment.