#include "pgstat.h"
#include "storage/lmgr.h"
#include "storage/proc.h"
+#include "storage/procnumber.h"
#include "utils/memutils.h"
* last MaxBackends entries in possibleConstraints[] are reserved as
* output workspace for FindLockCycle.
*/
+ StaticAssertStmt(MAX_BACKENDS_BITS <= (32 - 3),
+ "MAX_BACKENDS_BITS too big for * 4");
maxPossibleConstraints = MaxBackends * 4;
possibleConstraints =
(EDGE *) palloc(maxPossibleConstraints * sizeof(EDGE));
#include "catalog/catalog.h"
#include "catalog/pg_constraint.h"
#include "miscadmin.h"
+#include "storage/procnumber.h"
#include "storage/sinval.h"
#include "storage/smgr.h"
#include "utils/catcache.h"
{
SharedInvalidationMessage msg;
+ /* verify optimization stated above stays valid */
+ StaticAssertStmt(MAX_BACKENDS_BITS <= 23,
+ "MAX_BACKEND_BITS is too big for inval.c");
+
msg.sm.id = SHAREDINVALSMGR_ID;
msg.sm.backend_hi = rlocator.backend >> 16;
msg.sm.backend_lo = rlocator.backend & 0xffff;
#include "storage/bufmgr.h"
#include "storage/condition_variable.h"
#include "storage/lwlock.h"
+#include "storage/procnumber.h"
#include "storage/shmem.h"
#include "storage/smgr.h"
#include "storage/spin.h"
StaticAssertDecl(BM_MAX_USAGE_COUNT < (1 << BUF_USAGECOUNT_BITS),
"BM_MAX_USAGE_COUNT doesn't fit in BUF_USAGECOUNT_BITS bits");
+StaticAssertDecl(MAX_BACKENDS_BITS <= BUF_REFCOUNT_BITS,
+ "MAX_BACKENDS_BITS needs to be <= BUF_REFCOUNT_BITS");
/*
* Buffer tag identifies which disk block the buffer contains.