mirror of
https://github.com/neondatabase/neon.git
synced 2026-01-15 01:12:56 +00:00
Look at the database last written LSN in neon_exits
This commit is contained in:
@@ -1450,6 +1450,9 @@ neon_exists(SMgrRelation reln, ForkNumber forkNum)
|
||||
BlockNumber n_blocks;
|
||||
bool latest;
|
||||
XLogRecPtr request_lsn;
|
||||
XLogRecPtr rel_lsn;
|
||||
XLogRecPtr db_lsn;
|
||||
static const NRelFileInfo dummyNode = {0};
|
||||
|
||||
switch (reln->smgr_relpersistence)
|
||||
{
|
||||
@@ -1504,7 +1507,9 @@ neon_exists(SMgrRelation reln, ForkNumber forkNum)
|
||||
return false;
|
||||
}
|
||||
|
||||
request_lsn = neon_get_request_lsn(&latest, InfoFromSMgrRel(reln), forkNum, REL_METADATA_PSEUDO_BLOCKNO);
|
||||
rel_lsn = neon_get_request_lsn(&latest, InfoFromSMgrRel(reln), forkNum, REL_METADATA_PSEUDO_BLOCKNO);
|
||||
db_lsn = neon_get_request_lsn(&latest, dummyNode, MAIN_FORKNUM, 0);
|
||||
request_lsn = Max(rel_lsn, db_lsn);
|
||||
{
|
||||
NeonExistsRequest request = {
|
||||
.req.tag = T_NeonExistsRequest,
|
||||
|
||||
Reference in New Issue
Block a user