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

Commitef88638

Browse files
committed
Rename CACHE_LINE_SIZE to PG_CACHE_LINE_SIZE.
As noted inhttp://bugs.debian.org/763098 there is a conflict betweenpostgres' definition of CACHE_LINE_SIZE and the definition by various*bsd platforms. It's debatable who has the right to define such aname, but postgres' use was only introduced in375d852 (9.4), soit seems like a good idea to rename it.Discussion: 20140930195756.GC27407@msg.df7cb.dePer complaint of Christoph Berg in the above email, although he's notthe original bug reporter.Backpatch to 9.4 where the define was introduced.
1 parent8492d86 commitef88638

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

‎src/backend/access/transam/xlog.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ typedef struct
409409
typedefunionWALInsertLockPadded
410410
{
411411
WALInsertLockl;
412-
charpad[CACHE_LINE_SIZE];
412+
charpad[PG_CACHE_LINE_SIZE];
413413
}WALInsertLockPadded;
414414

415415
/*
@@ -436,7 +436,7 @@ typedef struct XLogCtlInsert
436436
* read on every WAL insertion, but updated rarely, and we don't want
437437
* those reads to steal the cache line containing Curr/PrevBytePos.
438438
*/
439-
charpad[CACHE_LINE_SIZE];
439+
charpad[PG_CACHE_LINE_SIZE];
440440

441441
/*
442442
* fullPageWrites is the master copy used by all backends to determine

‎src/include/pg_config_manual.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@
238238
* bytes of wasted memory. The default is 128, which should be large enough
239239
* for all supported platforms.
240240
*/
241-
#defineCACHE_LINE_SIZE128
241+
#definePG_CACHE_LINE_SIZE128
242242

243243
/*
244244
*------------------------------------------------------------------------

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp