Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

remove additional and useless loop for each relation file when do ptrack_get_pagemapset query#17

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
funny-falcon merged 2 commits intopostgrespro:masterfromvegebird:mapset-fixes
Jun 27, 2022
Merged
Changes fromall commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 12 additions & 7 deletionsptrack.c
View file
Open in desktop
Original file line numberDiff line numberDiff line change
Expand Up@@ -368,6 +368,14 @@ ptrack_filelist_getnext(PtScanCtx * ctx)
return ptrack_filelist_getnext(ctx);
}

if (fst.st_size == 0)
{
elog(WARNING, "ptrack: skip empty file %s", fullpath);

/* But try the next one */
return ptrack_filelist_getnext(ctx);
}

if (pfl->segno > 0)
{
ctx->relsize = pfl->segno * RELSEG_SIZE + fst.st_size / BLCKSZ;
Expand DownExpand Up@@ -494,7 +502,7 @@ ptrack_get_pagemapset(PG_FUNCTION_ARGS)
XLogRecPtrupdate_lsn2;

/* Stop traversal if there are no more segments */
if (ctx->bid.blocknum > ctx->relsize)
if (ctx->bid.blocknum >= ctx->relsize)
{
/* We completed a segment and there is a bitmap to return */
if (pagemap.bitmap != NULL)
Expand DownExpand Up@@ -526,12 +534,9 @@ ptrack_get_pagemapset(PG_FUNCTION_ARGS)
if (htup)
SRF_RETURN_NEXT(funcctx, HeapTupleGetDatum(htup));
}
else
{
/* We have just processed unchanged file, let's pick next */
if (ptrack_filelist_getnext(ctx) < 0)
SRF_RETURN_DONE(funcctx);
}

if (ptrack_filelist_getnext(ctx) < 0)
SRF_RETURN_DONE(funcctx);
}

hash = BID_HASH_FUNC(ctx->bid);
Expand Down

[8]ページ先頭

©2009-2025 Movatter.jp