WalSndShutdown();
}
}
-
-/*
- * This isn't currently used for anything. Monitoring tools might be
- * interested in the future, and we'll need something like this in the
- * future for synchronous replication.
- */
-#ifdef NOT_USED
-/*
- * Returns the oldest Send position among walsenders. Or InvalidXLogRecPtr
- * if none.
- */
-XLogRecPtr
-GetOldestWALSendPointer(void)
-{
- XLogRecPtr oldest = {0, 0};
- int i;
- bool found = false;
-
- for (i = 0; i < max_wal_senders; i++)
- {
- WalSnd *walsnd = &WalSndCtl->walsnds[i];
- XLogRecPtr recptr;
-
- if (walsnd->pid == 0)
- continue;
-
- SpinLockAcquire(&walsnd->mutex);
- recptr = walsnd->sentPtr;
- SpinLockRelease(&walsnd->mutex);
-
- if (recptr.xlogid == 0 && recptr.xrecoff == 0)
- continue;
-
- if (!found || recptr < oldest)
- oldest = recptr;
- found = true;
- }
- return oldest;
-}
-
-#endif