58 bool trace_syncscan =
false;
71 #define SYNC_SCAN_NELEM 20
83 #define SYNC_SCAN_REPORT_INTERVAL (128 * 1024 / BLCKSZ)
111 #define SizeOfScanLocations(N) \
112 (offsetof(ss_scan_locations_t, items) + (N) * sizeof(ss_lru_item_t))
167 item->
prev = (
i > 0) ?
203 if (match || item->
next == NULL)
268 if (startloc >= relnblocks)
271 #ifdef TRACE_SYNCSCAN
274 "SYNC_SCAN: start \"%s\" (size %u) at %u",
291 #ifdef TRACE_SYNCSCAN
294 if ((location % 1024) == 0)
296 "SYNC_SCAN: scanning \"%s\" at %u",
316 #ifdef TRACE_SYNCSCAN
317 else if (trace_syncscan)
319 "SYNC_SCAN: missed update for \"%s\" at %u",
#define InvalidBlockNumber
#define Assert(condition)
#define FLEXIBLE_ARRAY_MEMBER
bool LWLockAcquire(LWLock *lock, LWLockMode mode)
void LWLockRelease(LWLock *lock)
bool LWLockConditionalAcquire(LWLock *lock, LWLockMode mode)
#define RelationGetRelationName(relation)
#define RelFileLocatorEquals(locator1, locator2)
#define InvalidRelFileNumber
void * ShmemInitStruct(const char *name, Size size, bool *foundPtr)
RelFileLocator rd_locator
ss_scan_location_t location
struct ss_lru_item_t * next
struct ss_lru_item_t * prev
RelFileLocator relfilelocator
ss_lru_item_t items[FLEXIBLE_ARRAY_MEMBER]
struct ss_lru_item_t ss_lru_item_t
void ss_report_location(Relation rel, BlockNumber location)
void SyncScanShmemInit(void)
static ss_scan_locations_t * scan_locations
BlockNumber ss_get_location(Relation rel, BlockNumber relnblocks)
struct ss_scan_locations_t ss_scan_locations_t
Size SyncScanShmemSize(void)
static BlockNumber ss_search(RelFileLocator relfilelocator, BlockNumber location, bool set)
struct ss_scan_location_t ss_scan_location_t
#define SizeOfScanLocations(N)
#define SYNC_SCAN_REPORT_INTERVAL