Hackfut Security File Manager
Current Path:
/opt/td-agent/embedded/include/postgresql/server/access
opt
/
td-agent
/
embedded
/
include
/
postgresql
/
server
/
access
/
📁
..
📄
amapi.h
(6.3 KB)
📄
amvalidate.h
(1.19 KB)
📄
attnum.h
(1.52 KB)
📄
brin.h
(948 B)
📄
brin_internal.h
(3.3 KB)
📄
brin_page.h
(2.68 KB)
📄
brin_pageops.h
(1.28 KB)
📄
brin_revmap.h
(1.23 KB)
📄
brin_tuple.h
(3.05 KB)
📄
brin_xlog.h
(3.28 KB)
📄
clog.h
(1.54 KB)
📄
commit_ts.h
(2.09 KB)
📄
genam.h
(7.31 KB)
📄
generic_xlog.h
(1.42 KB)
📄
gin.h
(2.3 KB)
📄
gin_private.h
(33.12 KB)
📄
gist.h
(6.51 KB)
📄
gist_private.h
(19.82 KB)
📄
gistscan.h
(729 B)
📄
hash.h
(13.54 KB)
📄
heapam.h
(7.76 KB)
📄
heapam_xlog.h
(12.61 KB)
📄
hio.h
(1.26 KB)
📄
htup.h
(3.16 KB)
📄
htup_details.h
(28.31 KB)
📄
itup.h
(4.36 KB)
📄
multixact.h
(5.13 KB)
📄
nbtree.h
(30.22 KB)
📄
parallel.h
(2.28 KB)
📄
printtup.h
(1.03 KB)
📄
reloptions.h
(8.88 KB)
📄
relscan.h
(5.63 KB)
📄
rewriteheap.h
(1.79 KB)
📄
rmgr.h
(609 B)
📄
rmgrlist.h
(2.97 KB)
📄
sdir.h
(1.43 KB)
📄
skey.h
(6.26 KB)
📄
slru.h
(5.49 KB)
📄
spgist.h
(7.04 KB)
📄
spgist_private.h
(21.82 KB)
📄
stratnum.h
(2.67 KB)
📄
subtrans.h
(973 B)
📄
sysattr.h
(890 B)
📄
timeline.h
(1.59 KB)
📄
transam.h
(6.29 KB)
📄
tsmapi.h
(2.55 KB)
📄
tupconvert.h
(1.4 KB)
📄
tupdesc.h
(4.36 KB)
📄
tupmacs.h
(7.16 KB)
📄
tuptoaster.h
(7.18 KB)
📄
twophase.h
(1.82 KB)
📄
twophase_rmgr.h
(1.24 KB)
📄
valid.h
(1.4 KB)
📄
visibilitymap.h
(1.77 KB)
📄
xact.h
(12.29 KB)
📄
xlog.h
(10.91 KB)
📄
xlog_fn.h
(1.41 KB)
📄
xlog_internal.h
(10.29 KB)
📄
xlogdefs.h
(3.11 KB)
📄
xloginsert.h
(2.28 KB)
📄
xlogreader.h
(7.11 KB)
📄
xlogrecord.h
(7.76 KB)
📄
xlogutils.h
(1.76 KB)
Editing: slru.h
/*------------------------------------------------------------------------- * * slru.h * Simple LRU buffering for transaction status logfiles * * Portions Copyright (c) 1996-2016, PostgreSQL Global Development Group * Portions Copyright (c) 1994, Regents of the University of California * * src/include/access/slru.h * *------------------------------------------------------------------------- */ #ifndef SLRU_H #define SLRU_H #include "access/xlogdefs.h" #include "storage/lwlock.h" /* * Define SLRU segment size. A page is the same BLCKSZ as is used everywhere * else in Postgres. The segment size can be chosen somewhat arbitrarily; * we make it 32 pages by default, or 256Kb, i.e. 1M transactions for CLOG * or 64K transactions for SUBTRANS. * * Note: because TransactionIds are 32 bits and wrap around at 0xFFFFFFFF, * page numbering also wraps around at 0xFFFFFFFF/xxxx_XACTS_PER_PAGE (where * xxxx is CLOG or SUBTRANS, respectively), and segment numbering at * 0xFFFFFFFF/xxxx_XACTS_PER_PAGE/SLRU_PAGES_PER_SEGMENT. We need * take no explicit notice of that fact in slru.c, except when comparing * segment and page numbers in SimpleLruTruncate (see PagePrecedes()). * * Note: slru.c currently assumes that segment file names will be four hex * digits. This sets a lower bound on the segment size (64K transactions * for 32-bit TransactionIds). */ #define SLRU_PAGES_PER_SEGMENT 32 /* Maximum length of an SLRU name */ #define SLRU_MAX_NAME_LENGTH 32 /* * Page status codes. Note that these do not include the "dirty" bit. * page_dirty can be TRUE only in the VALID or WRITE_IN_PROGRESS states; * in the latter case it implies that the page has been re-dirtied since * the write started. */ typedef enum { SLRU_PAGE_EMPTY, /* buffer is not in use */ SLRU_PAGE_READ_IN_PROGRESS, /* page is being read in */ SLRU_PAGE_VALID, /* page is valid and not being written */ SLRU_PAGE_WRITE_IN_PROGRESS /* page is being written out */ } SlruPageStatus; /* * Shared-memory state */ typedef struct SlruSharedData { LWLock *ControlLock; /* Number of buffers managed by this SLRU structure */ int num_slots; /* * Arrays holding info for each buffer slot. Page number is undefined * when status is EMPTY, as is page_lru_count. */ char **page_buffer; SlruPageStatus *page_status; bool *page_dirty; int *page_number; int *page_lru_count; /* * Optional array of WAL flush LSNs associated with entries in the SLRU * pages. If not zero/NULL, we must flush WAL before writing pages (true * for pg_clog, false for multixact, pg_subtrans, pg_notify). group_lsn[] * has lsn_groups_per_page entries per buffer slot, each containing the * highest LSN known for a contiguous group of SLRU entries on that slot's * page. */ XLogRecPtr *group_lsn; int lsn_groups_per_page; /*---------- * We mark a page "most recently used" by setting * page_lru_count[slotno] = ++cur_lru_count; * The oldest page is therefore the one with the highest value of * cur_lru_count - page_lru_count[slotno] * The counts will eventually wrap around, but this calculation still * works as long as no page's age exceeds INT_MAX counts. *---------- */ int cur_lru_count; /* * latest_page_number is the page number of the current end of the log; * this is not critical data, since we use it only to avoid swapping out * the latest page. */ int latest_page_number; /* LWLocks */ int lwlock_tranche_id; LWLockTranche lwlock_tranche; char lwlock_tranche_name[SLRU_MAX_NAME_LENGTH]; LWLockPadded *buffer_locks; } SlruSharedData; typedef SlruSharedData *SlruShared; /* * SlruCtlData is an unshared structure that points to the active information * in shared memory. */ typedef struct SlruCtlData { SlruShared shared; /* * This flag tells whether to fsync writes (true for pg_clog and multixact * stuff, false for pg_subtrans and pg_notify). */ bool do_fsync; /* * Decide which of two page numbers is "older" for truncation purposes. We * need to use comparison of TransactionIds here in order to do the right * thing with wraparound XID arithmetic. */ bool (*PagePrecedes) (int, int); /* * Dir is set during SimpleLruInit and does not change thereafter. Since * it's always the same, it doesn't need to be in shared memory. */ char Dir[64]; } SlruCtlData; typedef SlruCtlData *SlruCtl; extern Size SimpleLruShmemSize(int nslots, int nlsns); extern void SimpleLruInit(SlruCtl ctl, const char *name, int nslots, int nlsns, LWLock *ctllock, const char *subdir, int tranche_id); extern int SimpleLruZeroPage(SlruCtl ctl, int pageno); extern int SimpleLruReadPage(SlruCtl ctl, int pageno, bool write_ok, TransactionId xid); extern int SimpleLruReadPage_ReadOnly(SlruCtl ctl, int pageno, TransactionId xid); extern void SimpleLruWritePage(SlruCtl ctl, int slotno); extern void SimpleLruFlush(SlruCtl ctl, bool allow_redirtied); extern void SimpleLruTruncate(SlruCtl ctl, int cutoffPage); extern bool SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno); typedef bool (*SlruScanCallback) (SlruCtl ctl, char *filename, int segpage, void *data); extern bool SlruScanDirectory(SlruCtl ctl, SlruScanCallback callback, void *data); extern void SlruDeleteSegment(SlruCtl ctl, int segno); /* SlruScanDirectory public callbacks */ extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, int segpage, void *data); extern bool SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data); #endif /* SLRU_H */
Upload File
Create Folder