]> git.ipfire.org Git - thirdparty/postgresql.git/commitdiff
Make our back branches build under -fkeep-inline-functions.
authorTom Lane <tgl@sss.pgh.pa.us>
Fri, 20 Jan 2023 16:58:12 +0000 (11:58 -0500)
committerTom Lane <tgl@sss.pgh.pa.us>
Fri, 20 Jan 2023 16:58:12 +0000 (11:58 -0500)
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 3e9ca5260, fixing build
breakage from dc7420c2c and back-patching of f10f0ae42.

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.

src/include/utils/rel.h
src/include/utils/snapmgr.h

index 1896a9a06d1af2f1fbb5a65ef989fae84b39e4ad..a1bc071756750958376e9728726c383ab81ebc9d 100644 (file)
@@ -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.
@@ -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
index 67b217b1c11999c2a89e54e4db00017c7fd25da3..06eafdf118a966eae4f600887e8101bd9c0424fb 100644 (file)
@@ -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);