Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit6b85d4b

Browse files
committed
Fix portability problem induced by commita6f6b78.
pg_xlogdump includes bufmgr.h. With a compiler that emits code forstatic inline functions even when they're unreferenced, that leadsto unresolved external references in the new static-inline versionof BufferGetPage(). So hide it with #ifndef FRONTEND, as we've donefor similar issues elsewhere. Per buildfarm member pademelon.
1 parentba8fe38 commit6b85d4b

File tree

2 files changed

+13
-2
lines changed

2 files changed

+13
-2
lines changed

‎src/backend/storage/buffer/bufmgr.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4299,7 +4299,7 @@ IssuePendingWritebacks(WritebackContext *context)
42994299
* For best performance, keep the tests that are fastest and/or most likely to
43004300
* exclude a page from old snapshot testing near the front.
43014301
*/
4302-
externvoid
4302+
void
43034303
TestForOldSnapshot(Snapshotsnapshot,Relationrelation,Pagepage)
43044304
{
43054305
Assert(relation!=NULL);

‎src/include/storage/bufmgr.h

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,15 @@ extern void FreeAccessStrategy(BufferAccessStrategy strategy);
252252

253253
/* inline functions */
254254

255+
/*
256+
* Although this header file is nominally backend-only, certain frontend
257+
* programs like pg_xlogdump include it. For compilers that emit static
258+
* inline functions even when they're unused, that leads to unsatisfied
259+
* external references; hence hide these with #ifndef FRONTEND.
260+
*/
261+
262+
#ifndefFRONTEND
263+
255264
/*
256265
* BufferGetPage
257266
*Returns the page associated with a buffer.
@@ -272,4 +281,6 @@ BufferGetPage(Buffer buffer, Snapshot snapshot, Relation relation,
272281
returnpage;
273282
}
274283

275-
#endif
284+
#endif/* FRONTEND */
285+
286+
#endif/* BUFMGR_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp