PGPROC *proc = MyProc;
uint32 nextidx;
uint32 wakeidx;
- int prevpageno;
+ int64 prevpageno;
LWLock *prevlock = NULL;
/* We should definitely have an XID whose status needs to be updated. */
while (nextidx != INVALID_PROC_NUMBER)
{
PGPROC *nextproc = &ProcGlobal->allProcs[nextidx];
- int thispageno = nextproc->clogGroupMemberPage;
+ int64 thispageno = nextproc->clogGroupMemberPage;
/*
* If the page to update belongs to a different bank than the previous
QueuePosition head; /* head points to the next free location */
QueuePosition tail; /* tail must be <= the queue position of every
* listening backend */
- int stopPage; /* oldest unrecycled page; must be <=
+ int64 stopPage; /* oldest unrecycled page; must be <=
* tail.page */
ProcNumber firstListener; /* id of first listener, or
* INVALID_PROC_NUMBER */
static bool
asyncQueueIsFull(void)
{
- int headPage = QUEUE_POS_PAGE(QUEUE_HEAD);
- int tailPage = QUEUE_POS_PAGE(QUEUE_TAIL);
- int occupied = headPage - tailPage;
+ int64 headPage = QUEUE_POS_PAGE(QUEUE_HEAD);
+ int64 tailPage = QUEUE_POS_PAGE(QUEUE_TAIL);
+ int64 occupied = headPage - tailPage;
return occupied >= max_notify_queue_pages;
}
static double
asyncQueueUsage(void)
{
- int headPage = QUEUE_POS_PAGE(QUEUE_HEAD);
- int tailPage = QUEUE_POS_PAGE(QUEUE_TAIL);
- int occupied = headPage - tailPage;
+ int64 headPage = QUEUE_POS_PAGE(QUEUE_HEAD);
+ int64 tailPage = QUEUE_POS_PAGE(QUEUE_TAIL);
+ int64 occupied = headPage - tailPage;
if (occupied == 0)
return (double) 0; /* fast exit for common case */
do
{
- int curpage = QUEUE_POS_PAGE(pos);
+ int64 curpage = QUEUE_POS_PAGE(pos);
int curoffset = QUEUE_POS_OFFSET(pos);
int slotno;
int copysize;
asyncQueueAdvanceTail(void)
{
QueuePosition min;
- int oldtailpage;
- int newtailpage;
- int boundary;
+ int64 oldtailpage;
+ int64 newtailpage;
+ int64 boundary;
/* Restrict task to one backend per cluster; see SimpleLruTruncate(). */
LWLockAcquire(NotifyQueueTailLock, LW_EXCLUSIVE);
typedef struct SerialControlData
{
- int headPage; /* newest initialized page */
+ int64 headPage; /* newest initialized page */
TransactionId headXid; /* newest valid Xid in the SLRU */
TransactionId tailXid; /* oldest xmin we might be interested in */
} SerialControlData;
void
CheckPointPredicate(void)
{
- int truncateCutoffPage;
+ int64 truncateCutoffPage;
LWLockAcquire(SerialControlLock, LW_EXCLUSIVE);
if (TransactionIdIsValid(serialControl->tailXid))
{
- int tailPage;
+ int64 tailPage;
tailPage = SerialPage(serialControl->tailXid);