Commit ef886384 authored by Andres Freund's avatar Andres Freund

Rename CACHE_LINE_SIZE to PG_CACHE_LINE_SIZE.

As noted in http://bugs.debian.org/763098 there is a conflict between
postgres' definition of CACHE_LINE_SIZE and the definition by various
*bsd platforms. It's debatable who has the right to define such a
name, but postgres' use was only introduced in 375d8526 (9.4), so
it seems like a good idea to rename it.

Discussion: 20140930195756.GC27407@msg.df7cb.de

Per complaint of Christoph Berg in the above email, although he's not
the original bug reporter.

Backpatch to 9.4 where the define was introduced.
parent 8492d863
...@@ -409,7 +409,7 @@ typedef struct ...@@ -409,7 +409,7 @@ typedef struct
typedef union WALInsertLockPadded typedef union WALInsertLockPadded
{ {
WALInsertLock l; WALInsertLock l;
char pad[CACHE_LINE_SIZE]; char pad[PG_CACHE_LINE_SIZE];
} WALInsertLockPadded; } WALInsertLockPadded;
/* /*
...@@ -436,7 +436,7 @@ typedef struct XLogCtlInsert ...@@ -436,7 +436,7 @@ typedef struct XLogCtlInsert
* read on every WAL insertion, but updated rarely, and we don't want * read on every WAL insertion, but updated rarely, and we don't want
* those reads to steal the cache line containing Curr/PrevBytePos. * those reads to steal the cache line containing Curr/PrevBytePos.
*/ */
char pad[CACHE_LINE_SIZE]; char pad[PG_CACHE_LINE_SIZE];
/* /*
* fullPageWrites is the master copy used by all backends to determine * fullPageWrites is the master copy used by all backends to determine
......
...@@ -238,7 +238,7 @@ ...@@ -238,7 +238,7 @@
* bytes of wasted memory. The default is 128, which should be large enough * bytes of wasted memory. The default is 128, which should be large enough
* for all supported platforms. * for all supported platforms.
*/ */
#define CACHE_LINE_SIZE 128 #define PG_CACHE_LINE_SIZE 128
/* /*
*------------------------------------------------------------------------ *------------------------------------------------------------------------
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment