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

Commit81c766b

Browse files
committed
Change InitToastSnapshot to a macro.
tqual.h is included in some front-end compiles, and a static inlinebreaks on buildfarm member castoroides. Since the macro is neverreferenced, it should dodge that problem, although this doesn'tseem like the cleanest way of hiding things from front-end compiles.Report and review by Tom Lane; patch by me.
1 parente7caacf commit81c766b

File tree

2 files changed

+5
-8
lines changed

2 files changed

+5
-8
lines changed

‎src/backend/access/heap/tuptoaster.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2316,5 +2316,5 @@ init_toast_snapshot(Snapshot toast_snapshot)
23162316
if (snapshot==NULL)
23172317
elog(ERROR,"no known snapshots");
23182318

2319-
InitToastSnapshot(toast_snapshot,snapshot->lsn,snapshot->whenTaken);
2319+
InitToastSnapshot(*toast_snapshot,snapshot->lsn,snapshot->whenTaken);
23202320
}

‎src/include/utils/tqual.h

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -104,12 +104,9 @@ extern bool ResolveCminCmaxDuringDecoding(struct HTAB *tuplecid_data,
104104
* Similarly, some initialization is required for SnapshotToast. We need
105105
* to set lsn and whenTaken correctly to support snapshot_too_old.
106106
*/
107-
staticinlinevoid
108-
InitToastSnapshot(Snapshotsnapshot,XLogRecPtrlsn,int64whenTaken)
109-
{
110-
snapshot->satisfies=HeapTupleSatisfiesToast;
111-
snapshot->lsn=lsn;
112-
snapshot->whenTaken=whenTaken;
113-
}
107+
#defineInitToastSnapshot(snapshotdata,l,w) \
108+
((snapshotdata).satisfies = HeapTupleSatisfiesDirty, \
109+
(snapshotdata).lsn = (l),\
110+
(snapshotdata).whenTaken = (w))
114111

115112
#endif/* TQUAL_H */

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp