8000 Handle wraparound during truncation in multixact/members · postgres/postgres@722acf5 · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"722acf51a0d074d19782ad7e97ebe3fdb63fbb87","url":"/postgres/postgres/commit/722acf51a0d074d19782ad7e97ebe3fdb63fbb87","authoredDate":"2014-01-02T18:16:54.000-03:00","committedDate":"2014-01-02T18:16:54.000-03:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eHandle wraparound during truncation in multixact/members\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"In pg_multixact/members, relying on modulo-2^32 arithmetic for\nwraparound handling doesn't work all that well. Because we don't\nexplicitely track wraparound of the allocation counter for members, it\nis possible that the \"live\" area exceeds 2^31 entries; trying to remove\nSLRU segments that are \"old\" according to the original logic might lead\nto removal of segments still in use. To fix, have the truncation\nroutine use a tailored SlruScanDirectory callback that keeps track of\nthe live area in actual use; that way, when the live range exceeds 2^31\nentries, the oldest segments still live will not get removed untimely.\n\nThis new SlruScanDir callback needs to take care not to remove segments\nthat are \"in the future\": if new SLRU segments appear while the\ntruncation is ongoing, make sure we don't remove them. This requires\nexamination of shared memory state to recheck for false positives, but\ntesting suggests that this doesn't cause a problem. The original coding\ndidn't suffer from this pitfall because segments created when truncation\nis running are never considered to be removable.\n\nPer Andres Freund's investigation of bug #8673 reported by Serge\nNegodyuck.","authors":[{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false}],"committerAttribution":false,"committer":{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false},"parents":["3cff1879f8d03cb729368722ca823a4bf74c0cac"],"globalRelayId":"MDY6Q29tbWl0OTI3NDQyOjcyMmFjZjUxYTBkMDc0ZDE5NzgyYWQ3ZTk3ZWJlM2ZkYjYzZmJiODc=","sha1":"3cff1879f8d03cb729368722ca823a4bf74c0cac","sha2":"722acf51a0d074d19782ad7e97ebe3fdb63fbb87"},"currentUser":null,"repo":{"id":927442,"defaultBranch":"master","name":"postgres","ownerLogin":"postgres","currentUserCanPush":false,"isFork":false,"isEmpty":false,"createdAt":"2010-09-21T11:35:45.000Z","ownerAvatar":"https://avatars.githubusercontent.com/u/177543?v=4","public":true,"private":false,"isOrgOwned":true},"diffEntryData":[{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":576,"text":"@@ -577,8 +577,13 @@ MultiXactIdSetOldestMember(void)","html":"@@ -577,8 +577,13 @@ MultiXactIdSetOldestMember(void)","displayNoNewLineWarning":false,"position":0,"left":576,"right":576},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":577,"text":" \t\t * another someone else could compute an OldestVisibleMXactId that","html":" \u003cspan class=pl-c\u003e\t\t * another someone else could compute an OldestVisibleMXactId that\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":577,"right":577},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":578,"text":" \t\t * would be after the value we are going to store when we get control","html":" \u003cspan class=pl-c\u003e\t\t * would be after the value we are going to store when we get control\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":578,"right":578},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":579,"text":" \t\t * back. Which would be wrong.","html":" \u003cspan class=pl-c\u003e\t\t * back. Which would be wrong.\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":579,"right":579},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":580,"text":"+\t\t *","html":"+\u003cspan class=pl-c\u003e\t\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":579,"right":580},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":581,"text":"+\t\t * Note that a shared lock is sufficient, because it's enough to stop","html":"+\u003cspan class=pl-c\u003e\t\t * Note that a shared lock is sufficient, because it\u0026#39;s enough to stop\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":579,"right":581},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":582,"text":"+\t\t * someone from advancing nextMXact; and nobody else could be trying to","html":"+\u003cspan class=pl-c\u003e\t\t * someone from advancing nextMXact; and nobody else could be trying to\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":579,"right":582},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":583,"text":"+\t\t * write to our OldestMember entry, only reading (and we assume storing","html":"+\u003cspan class=pl-c\u003e\t\t * write to our OldestMember entry, only reading (and we assume storing\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":579,"right":583},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":584,"text":"+\t\t * it is atomic.)","html":"+\u003cspan class=pl-c\u003e\t\t * it is atomic.)\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":579,"right":584},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":585,"text":" \t\t */","html":" \u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":580,"right":585},{"stylingDirective":null,"type":"DELETION","blobLineNumber":581,"text":"-\t\tLWLockAcquire(MultiXactGenLock, LW_EXCLUSIVE);","html":"-\t\t\u003cspan class=\"pl-en\"\u003eLWLockAcquire\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMultiXactGenLock\u003c/span\u003e, \u003cspan class=\"pl-c1 x x-first x-last\"\u003eLW_EXCLUSIVE\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":581,"right":585},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":586,"text":"+\t\tLWLockAcquire(MultiXactGenLock, LW_SHARED);","html":"+\t\t\u003cspan class=\"pl-en\"\u003eLWLockAcquire\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eMultiXactGenLock\u003c/span\u003e, \u003cspan class=\"pl-c1 x x-first x-last\"\u003eLW_SHARED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":11,"left":581,"right":586},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":587,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":582,"right":587},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":588,"text":" \t\t/*","html":" \t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":583,"right":588},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":589,"text":" \t\t * We have to beware of the possibility that nextMXact is in the","html":" \u003cspan class=pl-c\u003e\t\t * We have to beware of the possibility that nextMXact is in the\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":584,"right":589},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1563,"text":"@@ -1559,7 +1564,7 @@ AtEOXact_MultiXact(void)","html":"@@ -1559,7 +1564,7 @@ AtEOXact_MultiXact(void)","displayNoNewLineWarning":false,"position":15,"left":1558,"right":1563},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1564,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":16,"left":1559,"right":1564},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1565,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":1560,"right":1565},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1566,"text":" * AtPrepare_MultiXact","html":" \u003cspan class=pl-c\u003e * AtPrepare_MultiXact\u003c/span\u003e","displayNoNewLineWarning":false,"position":18,"left":1561,"right":1566},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1562,"text":"- *\t\tSave multixact state at 2PC tranasction prepare","html":"-\u003cspan class=\"pl-c\"\u003e *\t\tSave multixact state at 2PC \u003cspan class=\"x x-first x-last\"\u003etranasction\u003c/span\u003e prepare\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":1562,"right":1566},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1567,"text":"+ *\t\tSave multixact state at 2PC transaction prepare","html":"+\u003cspan class=\"pl-c\"\u003e *\t\tSave multixact state at 2PC \u003cspan class=\"x x-first x-last\"\u003etransaction\u003c/span\u003e prepare\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":1562,"right":1567},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1568,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":1563,"right":1568},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1569,"text":" * In this phase, we only store our OldestMemberMXactId value in the two-phase","html":" \u003cspan class=pl-c\u003e * In this phase, we only store our OldestMemberMXactId value in the two-phase\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":1564,"right":1569},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1570,"text":" * state file.","html":" \u003cspan class=pl-c\u003e * state file.\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":1565,"right":1570},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2339,"text":"@@ -2335,6 +2340,65 @@ GetOldestMultiXactId(void)","html":"@@ -2335,6 +2340,65 @@ GetOldestMultiXactId(void)","displayNoNewLineWarning":false,"position":24,"left":2334,"right":2339},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2340,"text":" \treturn oldestMXact;","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eoldestMXact\u003c/span\u003e;","displayNoNewLineWarning":false,"position":25,"left":2335,"right":2340},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2341,"text":" }","html":" }","displayNoNewLineWarning":false,"position":26,"left":2336,"right":2341},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2342,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":27,"left":2337,"right":2342},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2343,"text":"+/*","html":"+\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":28,"left":2337,"right":2343},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2344,"text":"+ * SlruScanDirectory callback.","html":"+\u003cspan class=pl-c\u003e * SlruScanDirectory callback.\u003c/span\u003e","displayNoNewLineWarning":false,"position":29,"left":2337,"right":2344},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2345,"text":"+ * \t\tThis callback deletes segments that are outside the range determined by","html":"+\u003cspan class=pl-c\u003e * \t\tThis callback deletes segments that are outside the range determined by\u003c/span\u003e","displayNoNewLineWarning":false,"position":30,"left":2337,"right":2345},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2346,"text":"+ * \t\tthe given page numbers.","html":"+\u003cspan class=pl-c\u003e * \t\tthe given page numbers.\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":2337,"right":2346},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2347,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":32,"left":2337,"right":2347},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2348,"text":"+ * Both range endpoints are exclusive (that is, segments containing any of","html":"+\u003cspan class=pl-c\u003e * Both range endpoints are exclusive (that is, segments containing any of\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":2337,"right":2348},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2349,"text":"+ * those pages are kept.)","html":"+\u003cspan class=pl-c\u003e * those pages are kept.)\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":2337,"right":2349},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2350,"text":"+ */","html":"+\u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":2337,"right":2350},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2351,"text":"+typedef struct MembersLiveRange","html":"+\u003cspan class=pl-k\u003etypedef\u003c/span\u003e \u003cspan class=pl-k\u003estruct\u003c/span\u003e \u003cspan class=pl-smi\u003eMembersLiveRange\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":2337,"right":2351},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2352,"text":"+{","html":"+{","displayNoNewLineWarning":false,"position":37,"left":2337,"right":2352},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2353,"text":"+\tint\t\trangeStart;","html":"+\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e;","displayNoNewLineWarning":false,"position":38,"left":2337,"right":2353},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2354,"text":"+\tint\t\trangeEnd;","html":"+\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e;","displayNoNewLineWarning":false,"position":39,"left":2337,"right":2354},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2355,"text":"+} MembersLiveRange;","html":"+} \u003cspan class=pl-smi\u003eMembersLiveRange\u003c/span\u003e;","displayNoNewLineWarning":false,"position":40,"left":2337,"right":2355},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2356,"text":"+","html":"+","displayNoNewLineWarning":false,"position":41,"left":2337,"right":2356},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2357,"text":"+static bool","html":"+\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":42,"left":2337,"right":2357},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2358,"text":"+SlruScanDirCbRemoveMembers(SlruCtl ctl, char *filename, int segpage,","html":"+\u003cspan class=pl-en\u003eSlruScanDirCbRemoveMembers\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e,","displayNoNewLineWarning":false,"position":43,"left":2337,"right":2358},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2359,"text":"+\t\t\t\t\t\t void *data)","html":"+\t\t\t\t\t\t \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edata\u003c/span\u003e)","displayNoNewLineWarning":false,"position":44,"left":2337,"right":2359},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2360,"text":"+{","html":"+{","displayNoNewLineWarning":false,"position":45,"left":2337,"right":2360},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2361,"text":"+\tMembersLiveRange *range = (MembersLiveRange *) data;","html":"+\t\u003cspan class=pl-smi\u003eMembersLiveRange\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003erange\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e (\u003cspan class=pl-smi\u003eMembersLiveRange\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003edata\u003c/span\u003e;","displayNoNewLineWarning":false,"position":46,"left":2337,"right":2361},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2362,"text":"+\tMultiXactOffset\tnextOffset;","html":"+\t\u003cspan class=pl-smi\u003eMultiXactOffset\u003c/span\u003e\t\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e;","displayNoNewLineWarning":false,"position":47,"left":2337,"right":2362},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2363,"text":"+","html":"+","displayNoNewLineWarning":false,"position":48,"left":2337,"right":2363},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2364,"text":"+\tif ((segpage == range-\u003erangeStart) ||","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e ((\u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e) \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":49,"left":2337,"right":2364},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2365,"text":"+\t\t(segpage == range-\u003erangeEnd))","html":"+\t\t(\u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e))","displayNoNewLineWarning":false,"position":50,"left":2337,"right":2365},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2366,"text":"+\t\treturn false;\t\t/* easy case out */","html":"+\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e false;\t\t\u003cspan class=pl-c\u003e/* easy case out */\u003c/span\u003e","displayNoNewLineWarning":false,"position":51,"left":2337,"right":2366},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2367,"text":"+","html":"+","displayNoNewLineWarning":false,"position":52,"left":2337,"right":2367},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2368,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":53,"left":2337,"right":2368},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2369,"text":"+\t * To ensure that no segment is spuriously removed, we must keep track","html":"+\u003cspan class=pl-c\u003e\t * To ensure that no segment is spuriously removed, we must keep track\u003c/span\u003e","displayNoNewLineWarning":false,"position":54,"left":2337,"right":2369},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2370,"text":"+\t * of new segments added since the start of the directory scan; to do this,","html":"+\u003cspan class=pl-c\u003e\t * of new segments added since the start of the directory scan; to do this,\u003c/span\u003e","displayNoNewLineWarning":false,"position":55,"left":2337,"right":2370},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2371,"text":"+\t * we update our end-of-range point as we run.","html":"+\u003cspan class=pl-c\u003e\t * we update our end-of-range point as we run.\u003c/span\u003e","displayNoNewLineWarning":false,"position":56,"left":2337,"right":2371},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2372,"text":"+\t *","html":"+\u003cspan class=pl-c\u003e\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":57,"left":2337,"right":2372},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2373,"text":"+\t * As an optimization, we can skip looking at shared memory if we know for","html":"+\u003cspan class=pl-c\u003e\t * As an optimization, we can skip looking at shared memory if we know for\u003c/span\u003e","displayNoNewLineWarning":false,"position":58,"left":2337,"right":2373},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2374,"text":"+\t * certain that the current segment must be kept. This is so because","html":"+\u003cspan class=pl-c\u003e\t * certain that the current segment must be kept. This is so because\u003c/span\u003e","displayNoNewLineWarning":false,"position":59,"left":2337,"right":2374},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2375,"text":"+\t * nextOffset never decreases, and we never increase rangeStart during any","html":"+\u003cspan class=pl-c\u003e\t * nextOffset never decreases, and we never increase rangeStart during any\u003c/span\u003e","displayNoNewLineWarning":false,"position":60,"left":2337,"right":2375},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2376,"text":"+\t * one run.","html":"+\u003cspan class=pl-c\u003e\t * one run.\u003c/span\u003e","displayNoNewLineWarning":false,"position":61,"left":2337,"right":2376},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2377,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":62,"left":2337,"right":2377},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2378,"text":"+\tif (!((range-\u003erangeStart \u003e range-\u003erangeEnd \u0026\u0026","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!((\u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":63,"left":2337,"right":2378},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2379,"text":"+\t\t segpage \u003e range-\u003erangeEnd \u0026\u0026 segpage \u003c range-\u003erangeStart) ||","html":"+\t\t \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e) \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":64,"left":2337,"right":2379},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2380,"text":"+\t\t (range-\u003erangeStart \u003c range-\u003erangeEnd \u0026\u0026","html":"+\t\t (\u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":65,"left":2337,"right":2380},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2381,"text":"+\t\t (segpage \u003c range-\u003erangeStart || segpage \u003e range-\u003erangeEnd))))","html":"+\t\t (\u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e))))","displayNoNewLineWarning":false,"position":66,"left":2337,"right":2381},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2382,"text":"+\t\treturn false;","html":"+\t\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e false;","displayNoNewLineWarning":false,"position":67,"left":2337,"right":2382},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2383,"text":"+","html":"+","displayNoNewLineWarning":false,"position":68,"left":2337,"right":2383},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2384,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":69,"left":2337,"right":2384},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2385,"text":"+\t * Update our idea of the end of the live range.","html":"+\u003cspan class=pl-c\u003e\t * Update our idea of the end of the live range.\u003c/span\u003e","displayNoNewLineWarning":false,"position":70,"left":2337,"right":2385},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2386,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":71,"left":2337,"right":2386},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2387,"text":"+\tLWLockAcquire(MultiXactGenLock, LW_SHARED);","html":"+\t\u003cspan class=pl-en\u003eLWLockAcquire\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactGenLock\u003c/span\u003e, \u003cspan class=pl-c1\u003eLW_SHARED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":72,"left":2337,"right":2387},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2388,"text":"+\tnextOffset = MultiXactState-\u003enextOffset;","html":"+\t\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eMultiXactState\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enextOffset\u003c/span\u003e;","displayNoNewLineWarning":false,"position":73,"left":2337,"right":2388},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2389,"text":"+\tLWLockRelease(MultiXactGenLock);","html":"+\t\u003cspan class=pl-en\u003eLWLockRelease\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactGenLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":74,"left":2337,"right":2389},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2390,"text":"+\trange-\u003erangeEnd = MXOffsetToMemberPage(nextOffset);","html":"+\t\u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eMXOffsetToMemberPage\u003c/span\u003e(\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e);","displayNoNewLineWarning":false,"position":75,"left":2337,"right":2390},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2391,"text":"+","html":"+","displayNoNewLineWarning":false,"position":76,"left":2337,"right":2391},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2392,"text":"+\t/* Recheck the deletion condition. If it still holds, perform deletion */","html":"+\t\u003cspan class=pl-c\u003e/* Recheck the deletion condition. If it still holds, perform deletion */\u003c/span\u003e","displayNoNewLineWarning":false,"position":77,"left":2337,"right":2392},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2393,"text":"+\tif ((range-\u003erangeStart \u003e range-\u003erangeEnd \u0026\u0026","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e ((\u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":78,"left":2337,"right":2393},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2394,"text":"+\t\t segpage \u003e range-\u003erangeEnd \u0026\u0026 segpage \u003c range-\u003erangeStart) ||","html":"+\t\t \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e) \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":79,"left":2337,"right":2394},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2395,"text":"+\t\t(range-\u003erangeStart \u003c range-\u003erangeEnd \u0026\u0026","html":"+\t\t(\u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":80,"left":2337,"right":2395},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2396,"text":"+\t\t (segpage \u003c range-\u003erangeStart || segpage \u003e range-\u003erangeEnd)))","html":"+\t\t (\u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e)))","displayNoNewLineWarning":false,"position":81,"left":2337,"right":2396},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2397,"text":"+\t\tSlruDeleteSegment(ctl, filename);","html":"+\t\t\u003cspan class=pl-en\u003eSlruDeleteSegment\u003c/span\u003e(\u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":82,"left":2337,"right":2397},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2398,"text":"+","html":"+","displayNoNewLineWarning":false,"position":83,"left":2337,"right":2398},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2399,"text":"+\treturn false;\t\t\t\t/* keep going */","html":"+\t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e false;\t\t\t\t\u003cspan class=pl-c\u003e/* keep going */\u003c/span\u003e","displayNoNewLineWarning":false,"position":84,"left":2337,"right":2399},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2400,"text":"+}","html":"+}","displayNoNewLineWarning":false,"position":85,"left":2337,"right":2400},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2401,"text":"+","html":"+","displayNoNewLineWarning":false,"position":86,"left":2337,"right":2401},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2402,"text":" typedef struct mxtruncinfo","html":" \u003cspan class=pl-k\u003etypedef\u003c/span\u003e \u003cspan class=pl-k\u003estruct\u003c/span\u003e \u003cspan class=pl-smi\u003emxtruncinfo\u003c/span\u003e","displayNoNewLineWarning":false,"position":87,"left":2338,"right":2402},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2403,"text":" {","html":" {","displayNoNewLineWarning":false,"position":88,"left":2339,"right":2403},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2404,"text":" \tint\t\t\tearliestExistingPage;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-c1\u003eearliestExistingPage\u003c/span\u003e;","displayNoNewLineWarning":false,"position":89,"left":2340,"right":2404},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2439,"text":"@@ -2376,8 +2440,10 @@ void","html":"@@ -2376,8 +2440,10 @@ void","displayNoNewLineWarning":false,"position":90,"left":23 8000 75,"right":2439},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2440,"text":" TruncateMultiXact(MultiXactId oldestMXact)","html":" \u003cspan class=pl-en\u003eTruncateMultiXact\u003c/span\u003e(\u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003eoldestMXact\u003c/span\u003e)","displayNoNewLineWarning":false,"position":91,"left":2376,"right":2440},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2441,"text":" {","html":" {","displayNoNewLineWarning":false,"position":92,"left":2377,"right":2441},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2442,"text":" \tMultiXactOffset oldestOffset;","html":" \t\u003cspan class=pl-smi\u003eMultiXactOffset\u003c/span\u003e \u003cspan class=pl-s1\u003eoldestOffset\u003c/span\u003e;","displayNoNewLineWarning":false,"position":93,"left":2378,"right":2442},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2443,"text":"+\tMultiXactOffset\tnextOffset;","html":"+\t\u003cspan class=pl-smi\u003eMultiXactOffset\u003c/span\u003e\t\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e;","displayNoNewLineWarning":false,"position":94,"left":2378,"right":2443},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2444,"text":" \tmxtruncinfo trunc;","html":" \t\u003cspan class=pl-smi\u003emxtruncinfo\u003c/span\u003e \u003cspan class=pl-s1\u003etrunc\u003c/span\u003e;","displayNoNewLineWarning":false,"position":95,"left":2379,"right":2444},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2445,"text":" \tMultiXactId earliest;","html":" \t\u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003eearliest\u003c/span\u003e;","displayNoNewLineWarning":false,"position":96,"left":2380,"right":2445},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2446,"text":"+\tMembersLiveRange\trange;","html":"+\t\u003cspan class=pl-smi\u003eMembersLiveRange\u003c/span\u003e\t\u003cspan class=pl-s1\u003erange\u003c/span\u003e;","displayNoNewLineWarning":false,"position":97,"left":2380,"right":2446},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2447,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":98,"left":2381,"right":2447},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2448,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":99,"left":2382,"right":2448},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2449,"text":" \t * Note we can't just plow ahead with the truncation; it's possible that","html":" \u003cspan class=pl-c\u003e\t * Note we can\u0026#39;t just plow ahead with the truncation; it\u0026#39;s possible that\u003c/span\u003e","displayNoNewLineWarning":false,"position":100,"left":2383,"right":2449},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2489,"text":"@@ -2424,9 +2490,23 @@ TruncateMultiXact(MultiXactId oldestMXact)","html":"@@ -2424,9 +2490,23 @@ TruncateMultiXact(MultiXactId oldestMXact)","displayNoNewLineWarning":false,"position":101,"left":2423,"right":2489},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2490,"text":" \tSimpleLruTruncate(MultiXactOffsetCtl,","html":" \t\u003cspan class=pl-en\u003eSimpleLruTruncate\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactOffsetCtl\u003c/span\u003e,","displayNoNewLineWarning":false,"position":102,"left":2424,"right":2490},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2491,"text":" \t\t\t\t\t MultiXactIdToOffsetPage(oldestMXact));","html":" \t\t\t\t\t \u003cspan class=pl-en\u003eMultiXactIdToOffsetPage\u003c/span\u003e(\u003cspan class=pl-s1\u003eoldestMXact\u003c/span\u003e));","displayNoNewLineWarning":false,"position":103,"left":2425,"right":2491},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2492,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":104,"left":2426,"right":2492},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2427,"text":"-\t/* truncate MultiXactMembers and we're done */","html":"-\t\u003cspan class=pl-c\u003e/* truncate MultiXactMembers and we\u0026#39;re done */\u003c/span\u003e","displayNoNewLineWarning":false,"position":105,"left":2427,"right":2492},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2428,"text":"-\tSimpleLruTruncate(MultiXactMemberCtl,","html":"-\t\u003cspan class=pl-en\u003eSimpleLruTruncate\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactMemberCtl\u003c/span\u003e,","displayNoNewLineWarning":false,"position":106,"left":2428,"right":2492},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2429,"text":"-\t\t\t\t\t MXOffsetToMemberPage(oldestOffset));","html":"-\t\t\t\t\t \u003cspan class=pl-en\u003eMXOffsetToMemberPage\u003c/span\u003e(\u003cspan class=pl-s1\u003eoldestOffset\u003c/span\u003e));","displayNoNewLineWarning":false,"position":107,"left":2429,"right":2492},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2493,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":108,"left":2429,"right":2493},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2494,"text":"+\t * To truncate MultiXactMembers, we need to figure out the active page","html":"+\u003cspan class=pl-c\u003e\t * To truncate MultiXactMembers, we need to figure out the active page\u003c/span\u003e","displayNoNewLineWarning":false,"position":109,"left":2429,"right":2494},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2495,"text":"+\t * range and delete all files outside that range. The start point is the","html":"+\u003cspan class=pl-c\u003e\t * range and delete all files outside that range. The start point is the\u003c/span\u003e","displayNoNewLineWarning":false,"position":110,"left":2429,"right":2495},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2496,"text":"+\t * start of the segment containing the oldest offset; an end point of the","html":"+\u003cspan class=pl-c\u003e\t * start of the segment containing the oldest offset; an end point of the\u003c/span\u003e","displayNoNewLineWarning":false,"position":111,"left":2429,"right":2496},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2497,"text":"+\t * segment containing the next offset to use is enough. The end point is","html":"+\u003cspan class=pl-c\u003e\t * segment containing the next offset to use is enough. The end point is\u003c/span\u003e","displayNoNewLineWarning":false,"position":112,"left":2429,"right":2497},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2498,"text":"+\t * updated as MultiXactMember gets extended concurrently, elsewhere.","html":"+\u003cspan class=pl-c\u003e\t * updated as MultiXactMember gets extended concurrently, elsewhere.\u003c/span\u003e","displayNoNewLineWarning":false,"position":113,"left":2429,"right":2498},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2499,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":114,"left":2429,"right":2499},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2500,"text":"+\trange.rangeStart = MXOffsetToMemberPage(oldestOffset);","html":"+\t\u003cspan class=pl-s1\u003erange\u003c/span\u003e.\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eMXOffsetToMemberPage\u003c/span\u003e(\u003cspan class=pl-s1\u003eoldestOffset\u003c/span\u003e);","displayNoNewLineWarning":false,"position":115,"left":2429,"right":2500},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2501,"text":"+\trange.rangeStart -= range.rangeStart % SLRU_PAGES_PER_SEGMENT;","html":"+\t\u003cspan class=pl-s1\u003erange\u003c/span\u003e.\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e \u003cspan class=pl-c1\u003e-=\u003c/span\u003e \u003cspan class=pl-s1\u003erange\u003c/span\u003e.\u003cspan class=pl-c1\u003erangeStart\u003c/span\u003e % \u003cspan class=pl-c1\u003eSLRU_PAGES_PER_SEGMENT\u003c/span\u003e;","displayNoNewLineWarning":false,"position":116,"left":2429,"right":2501},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2502,"text":"+","html":"+","displayNoNewLineWarning":false,"position":117,"left":2429,"right":2502},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2503,"text":"+\tLWLockAcquire(MultiXactGenLock, LW_SHARED);","html":"+\t\u003cspan class=pl-en\u003eLWLockAcquire\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactGenLock\u003c/span\u003e, \u003cspan class=pl-c1\u003eLW_SHARED\u003c/span\u003e);","displayNoNewLineWarning":false,"position":118,"left":2429,"right":2503},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2504,"text":"+\tnextOffset = MultiXactState-\u003enextOffset;","html":"+\t\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eMultiXactState\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enextOffset\u003c/span\u003e;","displayNoNewLineWarning":false,"position":119,"left":2429,"right":2504},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2505,"text":"+\tLWLockRelease(MultiXactGenLock);","html":"+\t\u003cspan class=pl-en\u003eLWLockRelease\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactGenLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":120,"left":2429,"right":2505},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2506,"text":"+","html":"+","displayNoNewLineWarning":false,"position":121,"left":2429,"right":2506},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2507,"text":"+\trange.rangeEnd = MXOffsetToMemberPage(nextOffset);","html":"+\t\u003cspan class=pl-s1\u003erange\u003c/span\u003e.\u003cspan class=pl-c1\u003erangeEnd\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eMXOffsetToMemberPage\u003c/span\u003e(\u003cspan class=pl-s1\u003enextOffset\u003c/span\u003e);","displayNoNewLineWarning":false,"position":122,"left":2429,"right":2507},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2508,"text":"+","html":"+","displayNoNewLineWarning":false,"position":123,"left":2429,"right":2508},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2509,"text":"+\tSlruScanDirectory(MultiXactMemberCtl, SlruScanDirCbRemoveMembers, \u0026range);","html":"+\t\u003cspan class=pl-en\u003eSlruScanDirectory\u003c/span\u003e(\u003cspan class=pl-s1\u003eMultiXactMemberCtl\u003c/span\u003e, \u003cspan class=pl-s1\u003eSlruScanDirCbRemoveMembers\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003erange\u003c/span\u003e);","displayNoNewLineWarning":false,"position":124,"left":2429,"right":2509},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2510,"text":" }","html":" }","displayNoNewLineWarning":false,"position":125,"left":2430,"right":2510},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2511,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":126,"left":2431,"right":2511},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2512,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":127,"left":2432,"right":2512}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2762,"linesChanged":90,"newTreeEntry":{"lineCount":2762,"path":"src/backend/access/transam/multixact.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/access/transam/multixact.c","mode":100644},"linesAdded":85,"linesDeleted":5,"path":"src/backend/access/transam/multixact.c","pathDigest":"44cd0606f86c1b634f58425af61b91f986697733b5637eef8b2328d94086e594","status":"MODIFIED","truncatedReason":null,"oldOid":"3cff1879f8d03cb729368722ca823a4bf74c0cac","newOid":"722acf51a0d074d19782ad7e97ebe3fdb63fbb87","copilotChatReference":null,"deletedSha":"3cff1879f8d03cb729368722ca823a4bf74c0cac","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1209,"text":"@@ -1210,6 +1210,17 @@ restart:;","html":"@@ -1210,6 +1210,17 @@ restart:;","displayNoNewLineWarning":false,"position":0,"left":1209,"right":1209},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1210,"text":" \t(void) SlruScanDirectory(ctl, SlruScanDirCbDeleteCutoff, \u0026cutoffPage);","html":" \t(\u003cspan class=pl-smi\u003evoid\u003c/span\u003e) \u003cspan class=pl-en\u003eSlruScanDirectory\u003c/span\u003e(\u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-s1\u003eSlruScanDirCbDeleteCutoff\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003ecutoffPage\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":1210,"right":1210},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1211,"text":" }","html":" }","displayNoNewLineWarning":false,"position":2,"left":1211,"right":1211},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1212,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":1212,"right":1212},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1213,"text":"+void","html":"+\u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1212,"right":1213},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1214,"text":"+SlruDeleteSegment(SlruCtl ctl, char *filename)","html":"+\u003cspan class=pl-en\u003eSlruDeleteSegment\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e)","displayNoNewLineWarning":false,"position":5,"left":1212,"right":1214},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1215,"text":"+{","html":"+{","displayNoNewLineWarning":false,"position":6,"left":1212,"right":1215},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1216,"text":"+\tchar\t\tpath[MAXPGPATH];","html":"+\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003epath\u003c/span\u003e[\u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":7,"left":1212,"right":1216},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1217,"text":"+","html":"+","displayNoNewLineWarning":false,"position":8,"left":1212,"right":1217},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1218,"text":"+\tsnprintf(path, MAXPGPATH, \"%s/%s\", ctl-\u003eDir, filename);","html":"+\t\u003cspan class=pl-en\u003esnprintf\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e, \u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;%s/%s\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003ectl\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eDir\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":9,"left":1212,"right":1218},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1219,"text":"+\tereport(DEBUG2,","html":"+\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eDEBUG2\u003c/span\u003e,","displayNoNewLineWarning":false,"position":10,"left":1212,"right":1219},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1220,"text":"+\t\t\t(errmsg(\"removing file \\\"%s\\\"\", path)));","html":"+\t\t\t(\u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;removing file \\\u0026quot;%s\\\u0026quot;\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003epath\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":11,"left":1212,"right":1220},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1221,"text":"+\tunlink(path);","html":"+\t\u003cspan class=pl-en\u003eunlink\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e);","displayNoNewLineWarning":false,"position":12,"left":1212,"right":1221},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1222,"text":"+}","html":"+}","displayNoNewLineWarning":false,"position":13,"left":1212,"right":1222},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1223,"text":"+","html":"+","displayNoNewLineWarning":false,"position":14,"left":1212,"right":1223},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1224,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":1213,"right":1224},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1225,"text":" * SlruScanDirectory callback","html":" \u003cspan class=pl-c\u003e * SlruScanDirectory callback\u003c/span\u003e","displayNoNewLineWarning":false,"position":16,"left":1214,"right":1225},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1226,"text":" *\t\tThis callback reports true if there's any segment prior to the one","html":" \u003cspan class=pl-c\u003e *\t\tThis callback reports true if there\u0026#39;s any segment prior to the one\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":1215,"right":1226},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1245,"text":"@@ -1235,16 +1246,10 @@ SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, int segpage, void *data","html":"@@ -1235,16 +1246,10 @@ SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, int segpage, void *data","displayNoNewLineWarning":false,"position":18,"left":1234,"right":1245},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1246,"text":" static bool","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":1235,"right":1246},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1247,"text":" SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, int segpage, void *data)","html":" \u003cspan class=pl-en\u003eSlruScanDirCbDeleteCutoff\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e, \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edata\u003c/span\u003e)","displayNoNewLineWarning":false,"position":20,"left":1236,"right":1247},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1248,"text":" {","html":" {","displayNoNewLineWarning":false,"position":21,"left":1237,"right":1248},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1238,"text":"-\tchar\t\tpath[MAXPGPATH];","html":"-\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003epath\u003c/span\u003e[\u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":22,"left":1238,"right":1248},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1249,"text":" \tint\t\t\tcutoffPage = *(int *) data;","html":" \t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003ecutoffPage\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e(\u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-s1\u003edata\u003c/span\u003e;","displayNoNewLineWarning":false,"position":23,"left":1239,"right":1249},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1250,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":24,"left":1240,"right":1250},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1251,"text":" \tif (ctl-\u003ePagePrecedes(segpage, cutoffPage))","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003ectl\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-en\u003ePagePrecedes\u003c/span\u003e(\u003cspan class=pl-s1\u003esegpage\u003c/span\u003e, \u003cspan class=pl-s1\u003ecutoffPage\u003c/span\u003e))","displayNoNewLineWarning":false,"position":25,"left":1241,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1242,"text":"-\t{","html":"-\t{","displayNoNewLineWarning":false,"position":26,"left":1242,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1243,"text":"-\t\tsnprintf(path, MAXPGPATH, \"%s/%s\", ctl-\u003eDir, filename);","html":"-\t\t\u003cspan class=pl-en\u003esnprintf\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e, \u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;%s/%s\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003ectl\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eDir\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":27,"left":1243,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1244,"text":"-\t\tereport(DEBUG2,","html":"-\t\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eDEBUG2\u003c/span\u003e,","displayNoNewLineWarning":false,"position":28,"left":1244,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1245,"text":"-\t\t\t\t(errmsg(\"removing file \\\"%s\\\"\", path)));","html":"-\t\t\t\t(\u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;removing file \\\u0026quot;%s\\\u0026quot;\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003epath\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":29,"left":1245,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1246,"text":"-\t\tunlink(path);","html":"-\t\t\u003cspan class=pl-en\u003eunlink\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e);","displayNoNewLineWarning":false,"position":30,"left":1246,"right":1251},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1247,"text":"-\t}","html":"-\t}","displayNoNewLineWarning":false,"position":31,"left":1247,"right":1251},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1252,"text":"+\t\tSlruDeleteSegment(ctl, filename);","html":"+\t\t\u003cspan class=pl-en\u003eSlruDeleteSegment\u003c/span\u003e(\u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":32,"left":1247,"right":1252},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1253,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":33,"left":1248,"right":1253},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1254,"text":" \treturn false;\t\t\t\t/* keep going */","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e false;\t\t\t\t\u003cspan class=pl-c\u003e/* keep going */\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":1249,"right":1254},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1255,"text":" }","html":" }","displayNoNewLineWarning":false,"position":35,"left":1250,"right":1255},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1260,"text":"@@ -1256,12 +1261,7 @@ SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, int segpage, void *data)","html":"@@ -1256,12 +1261,7 @@ SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, int segpage, void *data)","displayNoNewLineWarning":false,"position":36,"left":1255,"right":1260},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1261,"text":" bool","html":" \u003cspan class=pl-smi\u003ebool\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":1256,"right":1261},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1262,"text":" SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)","html":" \u003cspan class=pl-en\u003eSlruScanDirCbDeleteAll\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e, \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edata\u003c/span\u003e)","displayNoNewLineWarning":false,"position":38,"left":1257,"right":1262},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1263,"text":" {","html":" {","displayNoNewLineWarning":false,"position":39,"left":1258,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1259,"text":"-\tchar\t\tpath[MAXPGPATH];","html":"-\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003epath\u003c/span\u003e[\u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e];","displayNoNewLineWarning":false,"position":40,"left":1259,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1260,"text":"-","html":"-","displayNoNewLineWarning":false,"position":41,"left":1260,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1261,"text":"-\tsnprintf(path, MAXPGPATH, \"%s/%s\", ctl-\u003eDir, filename);","html":"-\t\u003cspan class=pl-en\u003esnprintf\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e, \u003cspan class=pl-c1\u003eMAXPGPATH\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;%s/%s\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003ectl\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eDir\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":42,"left":1261,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1262,"text":"-\tereport(DEBUG2,","html":"-\t\u003cspan class=pl-en\u003eereport\u003c/span\u003e(\u003cspan class=pl-c1\u003eDEBUG2\u003c/span\u003e,","displayNoNewLineWarning":false,"position":43,"left":1262,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1263,"text":"-\t\t\t(errmsg(\"removing file \\\"%s\\\"\", path)));","html":"-\t\t\t(\u003cspan class=pl-en\u003eerrmsg\u003c/span\u003e(\u003cspan class=pl-s\u003e\u0026quot;removing file \\\u0026quot;%s\\\u0026quot;\u0026quot;\u003c/span\u003e, \u003cspan class=pl-s1\u003epath\u003c/span\u003e)));","displayNoNewLineWarning":false,"position":44,"left":1263,"right":1263},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1264,"text":"-\tunlink(path);","html":"-\t\u003cspan class=pl-en\u003eunlink\u003c/span\u003e(\u003cspan class=pl-s1\u003epath\u003c/span\u003e);","displayNoNewLineWarning":false,"position":45,"left":1264,"right":1263},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1264,"text":"+\tSlruDeleteSegment(ctl, filename);","html":"+\t\u003cspan class=pl-en\u003eSlruDeleteSegment\u003c/span\u003e(\u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":46,"left":1264,"right":1264},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1265,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":47,"left":1265,"right":1265},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1266,"text":" \treturn false;\t\t\t\t/* keep going */","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e false;\t\t\t\t\u003cspan class=pl-c\u003e/* keep going */\u003c/span\u003e","displayNoNewLineWarning":false,"position":48,"left":1266,"right":1266},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1267,"text":" }","html":" }","displayNoNewLineWarning":false,"position":49,"left":1267,"right":1267},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1271,"text":"@@ -1272,6 +1272,11 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)","html":"@@ -1272,6 +1272,11 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)","displayNoNewLineWarning":false,"position":50,"left":1271,"right":1271},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1272,"text":" * If the callback returns true, the scan is stopped. The last return value","html":" \u003cspan class=pl-c\u003e * If the callback returns true, the scan is stopped. The last return value\u003c/span\u003e","displayNoNewLineWarning":false,"position":51,"left":1272,"right":1272},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1273,"text":" * from the callback is returned.","html":" \u003cspan class=pl-c\u003e * from the callback is returned.\u003c/span\u003e","displayNoNewLineWarning":false,"position":52,"left":1273,"right":1273},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1274,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":53,"left":1274,"right":1274},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1275,"text":"+ * The callback receives the following arguments: 1. the SlruCtl struct for the","html":"+\u003cspan class=pl-c\u003e * The callback receives the following arguments: 1. the SlruCtl struct for the\u003c/span\u003e","displayNoNewLineWarning":false,"position":54,"left":1274,"right":1275},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1276,"text":"+ * slru being truncated; 2. the filename being considered; 3. the page number","html":"+\u003cspan class=pl-c\u003e * slru being truncated; 2. the filename being considered; 3. the page number\u003c/span\u003e","displayNoNewLineWarning":false,"position":55,"left":1274,"right":1276},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1277,"text":"+ * for the first page of that file; 4. a pointer to the opaque data given to us","html":"+\u003cspan class=pl-c\u003e * for the first page of that file; 4. a pointer to the opaque data given to us\u003c/span\u003e","displayNoNewLineWarning":false,"position":56,"left":1274,"right":1277},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1278,"text":"+ * by the caller.","html":"+\u003cspan class=pl-c\u003e * by the caller.\u003c/span\u003e","displayNoNewLineWarning":false,"position":57,"left":1274,"right":1278},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1279,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":58,"left":1274,"right":1279},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1280,"text":" * Note that the ordering in which the directory is scanned is not guaranteed.","html":" \u003cspan class=pl-c\u003e * Note that the ordering in which the directory is scanned is not guaranteed.\u003c/span\u003e","displayNoNewLineWarning":false,"position":59,"left":1275,"right":1280},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1281,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":60,"left":1276,"right":1281},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1282,"text":" * Note that no locking is applied.","html":" \u003cspan class=pl-c\u003e * Note that no locking is applied.\u003c/span\u003e","displayNoNewLineWarning":false,"position":61,"left":1277,"right":1282}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1312,"linesChanged":31,"newTreeEntry":{"lineCount":1312,"path":"src/backend/access/transam/slru.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/access/transam/slru.c","mode":100644},"linesAdded":18,"linesDeleted":13,"path":"src/backend/access/transam/slru.c","pathDigest":"736640d7eed428f20452d88b473bd17e62dc8c38ddefc6b7389633f76267df59","status":"MODIFIED","truncatedReason":null,"oldOid":"3cff1879f8d03cb729368722ca823a4bf74c0cac","newOid":"722acf51a0d074d19782ad7e97ebe3f 8000 db63fbb87","copilotChatReference":null,"deletedSha":"3cff1879f8d03cb729368722ca823a4bf74c0cac","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":149,"text":"@@ -150,6 +150,7 @@ extern bool SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno);","html":"@@ -150,6 +150,7 @@ extern bool SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno);","displayNoNewLineWarning":false,"position":0,"left":149,"right":149},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":150,"text":" typedef bool (*SlruScanCallback) (SlruCtl ctl, char *filename, int segpage,","html":" \u003cspan class=pl-k\u003etypedef\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e (\u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-smi\u003eSlruScanCallback\u003c/span\u003e) (\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esegpage\u003c/span\u003e,","displayNoNewLineWarning":false,"position":1,"left":150,"right":150},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":151,"text":" \t\t\t\t\t\t\t\t\t\t\t void *data);","html":" \t\t\t\t\t\t\t\t\t\t\t \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edata\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":151,"right":151},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":152,"text":" extern bool SlruScanDirectory(SlruCtl ctl, SlruScanCallback callback, void *data);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003eSlruScanDirectory\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003eSlruScanCallback\u003c/span\u003e \u003cspan class=pl-s1\u003ecallback\u003c/span\u003e, \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edata\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":152,"right":152},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":153,"text":"+extern void SlruDeleteSegment(SlruCtl ctl, char *filename);","html":"+\u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eSlruDeleteSegment\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":152,"right":153},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":154,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":5,"left":153,"right":154},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":155,"text":" /* SlruScanDirectory public callbacks */","html":" \u003cspan class=pl-c\u003e/* SlruScanDirectory public callbacks */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":154,"right":155},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":156,"text":" extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename,","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003eSlruScanDirCbReportPresence\u003c/span\u003e(\u003cspan class=pl-smi\u003eSlruCtl\u003c/span\u003e \u003cspan class=pl-s1\u003ectl\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003efilename\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":155,"right":156}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":161,"linesChanged":1,"newTreeEntry":{"lineCount":161,"path":"src/include/access/slru.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/access/slru.h","mode":100644},"linesAdded":1,"linesDeleted":0,"path":"src/include/access/slru.h","pathDigest":"3a928abd9479747714481ef5453cb79270479be75fb687aaed2f102eba2b03a2","status":"MODIFIED","truncatedReason":null,"oldOid":"3cff1879f8d03cb729368722ca823a4bf74c0cac","newOid":"722acf51a0d074d19782ad7e97ebe3fdb63fbb87","copilotChatReference":null,"deletedSha":"3cff1879f8d03cb729368722ca823a4bf74c0cac","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null}],"splitViewPreference":"unified","ignoreWhitespace":false,"repoOwnerGlobalRelayId":"MDEyOk9yZ2FuaXphdGlvbjE3NzU0Mw==","commentsPreference":"visible","diffLineSpacingPreference":"relaxed","useMonospaceFont":false,"pasteUrlLinkAsPlainText":false,"userNotices":[],"path":"/postgres/postgres/commit/722acf51a0d074d19782ad7e97ebe3fdb63fbb87","fileTreeExpanded":true,"headerInfo":{"additions":104,"deletions":18,"filesChanged":3,"filesChangedString":"3"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":3,"truncated":false,"byteCount":6880,"lineShownCount":198},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"Db2YgcyQvn_ax9z35jB5MJtTI3abfMvFDyxRTJsUnX2ymk4RutSBHq470N37O3g0FUd4y1R0tKEhVNE-GbXXSQ"},"/users/diffview?diff=unified":{"post":"_YZbuyPHO8lyAo1t-vmR-XyiyFRO6cfoFJJ0eZRNrO5CoY0rVYMEqAb-gUfn8pD98raT6YHhuIw66vQLFuzm2g"},"/notifications/thread":{"post":"p6rFMjjopUT9pcJwxAw9Ia2_g6xR9JW4IY9gHpJpWdwAWCSEB7kw34f8QfbFhpG1Gbqmf-dZaFmqYHVUeOECTg"}}},"title":"Handle wraparound during truncation in multixact/members · postgres/postgres@722acf5","appPayload":{"helpUrl":"https://docs.github.com","findInDiffWorkerPath":"/assets-cdn/worker/find-in-diff-worker-2bfe39677d14.js","enabled_features":{"diff_ux_refresh_beta":false,"diff_inline_comments":true,"diff_ux_refresh_ssr_five":false,"diff_ux_refresh_ssr_ten":false,"react_diff_line_type_character_correction":true}}}

Commit 722acf5

Browse files
committed
Handle wraparound during truncation in multixact/members
In pg_multixact/members, relying on modulo-2^32 arithmetic for wraparound handling doesn't work all that well. Because we don't explicitely track wraparound of the allocation counter for members, it is possible that the "live" area exceeds 2^31 entries; trying to remove SLRU segments that are "old" according to the original logic might lead to removal of segments still in use. To fix, have the truncation routine use a tailored SlruScanDirectory callback that keeps track of the live area in actual use; that way, when the live range exceeds 2^31 entries, the oldest segments still live will not get removed untimely. This new SlruScanDir callback needs to take care not to remove segments that are "in the future": if new SLRU segments appear while the truncation is ongoing, make sure we don't remove them. This requires examination of shared memory state to recheck for false positives, but testing suggests that this doesn't cause a problem. The original coding didn't suffer from this pitfall because segments created when truncation is running are never considered to be removable. Per Andres Freund's investigation of bug #8673 reported by Serge Negodyuck.
1 parent 3cff187 commit 722acf5

File tree

3 files changed

+104
-18
lines changed

3 files changed

+104
-18
lines changed

src/backend/access/transam/multixact.c

Lines changed: 85 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -577,8 +577,13 @@ MultiXactIdSetOldestMember(void)
577577
* another someone else could compute an OldestVisibleMXactId that
578578
* would be after the value we are going to store when we get control
579579
* back. Which would be wrong.
580+
*
581+
* Note that a shared lock is sufficient, because it's enough to stop
582+
* someone from advancing nextMXact; and nobody else could be trying to
583+
* write to our OldestMember entry, only reading (and we assume storing
584+
* it is atomic.)
580585
*/
581-
LWLockAcquire(MultiXactGenLock, LW_EXCLUSIVE);
586+
LWLockAcquire(MultiXactGenLock, LW_SHARED);
582587

583588
/*
584589
* We have to beware of the possibility that nextMXact is in the
@@ -1559,7 +1564,7 @@ AtEOXact_MultiXact(void)
15591564

15601565
/*
15611566
* AtPrepare_MultiXact
1562-
* Save multixact state at 2PC tranasction prepare
1567+
* Save multixact state at 2PC transaction prepare
15631568
*
15641569
* In this phase, we only store our OldestMemberMXactId value in the two-phase
15651570
* state file.
@@ -2335,6 +2340,65 @@ GetOldestMultiXactId(void)
23352340
return oldestMXact;
23362341
}
23372342

2343+
/*
2344+
* SlruScanDirectory callback.
2345+
* This callback deletes segments that are outside the range determined by
2346+
* the given page numbers.
2347+
*
2348+
* Both range endpoints are exclusive (that is, segments containing any of
2349+
* those pages are kept.)
2350+
*/
2351+
typedef struct MembersLiveRange
2352+
{
2353+
int rangeStart;
2354+
int rangeEnd;
2355+
} MembersLiveRange;
2356+
2357+
static bool
2358+
SlruScanDirCbRemoveMembers(SlruCtl ctl, char *filename, int segpage,
2359+
void *data)
2360+
{
2361+
MembersLiveRange *range = (MembersLiveRange *) data;
2362+
MultiXactOffset nextOffset;
2363+
2364+
if ((segpage == range->rangeStart) ||
2365+
(segpage == range->rangeEnd))
2366+
return false; /* easy case out */
2367+
2368+
/*
2369+
* To ensure that no segment is spuriously removed, we must keep track
2370+
* of new segments added since the start of the directory scan; to do this,
2371+
* we update our end-of-range point as we run.
2372+
*
2373+
* As an optimization, we can skip looking at shared memory if we know for
2374+
* certain that the current segment must be kept. This is so because
2375+
* nextOffset never decreases, and we never increase rangeStart during any
2376+
* one run.
2377+
*/
2378+
if (!((range->rangeStart > range->rangeEnd &&
2379+
segpage > range->rangeEnd && segpage < range->rangeStart) ||
2380+
(range->rangeStart < range->rangeEnd &&
2381+
(segpage < range->rangeStart || segpage > range->rangeEnd))))
2382+
return false;
2383+
2384+
/*
2385+
* Update our idea of the end of the live range.
2386+
*/
2387+
LWLockAcquire(MultiXactGenLock, LW_SHARED);
2388+
nextOffset = MultiXactState->nextOffset;
2389+
LWLockRelease(MultiXactGenLock);
2390+
range->rangeEnd = MXOffsetToMemberPage(nextOffset);
2391+
2392+
/* Recheck the deletion condition. If it still holds, perform deletion */
2393+
if ((range->rangeStart > range->rangeEnd &&
2394+
segpage > range->rangeEnd && segpage < range->rangeStart) ||
2395+
(range->rangeStart < range->rangeEnd &&
2396+
(segpage < range->rangeStart || segpage > range->rangeEnd)))
2397+
SlruDeleteSegment(ctl, filename);
2398+
2399+
return false; /* keep going */
2400+
}
2401+
23382402
typedef struct mxtruncinfo
23392403
{
23402404
int earliestExistingPage;
@@ -2376,8 +2440,10 @@ void
23762440
TruncateMultiXact(MultiXactId oldestMXact)
23772441
{
23782442
MultiXactOffset oldestOffset;
2443+
MultiXactOffset nextOffset;
23792444
mxtruncinfo trunc;
23802445
MultiXactId earliest;
2446+
MembersLiveRange range;
23812447

23822448
/*
23832449
* Note we can't just plow ahead with the truncation; it's possible that
@@ -2424,9 +2490,23 @@ TruncateMultiXact(MultiXactId oldestMXact)
24242490
SimpleLruTruncate(MultiXactOffsetCtl,
24252491
MultiXactIdToOffsetPage(oldestMXact));
24262492

2427-
/* truncate MultiXactMembers and we're done */
2428-
SimpleLruTruncate(MultiXactMemberCtl,
2429-
MXOffsetToMemberPage(oldestOffset));
2493+
/*
2494+
* To truncate MultiXactMembers, we need to figure out the active page
2495+
* range and delete all files outside that range. The start point is the
2496+
* start of the segment containing the oldest offset; an end point of the
2497+
* segment containing the next offset to use is enough. The end point is
2498+
* updated as MultiXactMember gets extended concurrently, elsewhere.
2499+
*/
2500+
range.rangeStart = MXOffsetToMemberPage(oldestOffset);
2501+
range.rangeStart -= range.rangeStart % SLRU_PAGES_PER_SEGMENT;
2502+
2503+
LWLockAcquire(MultiXactGenLock, LW_SHARED);
2504+
nextOffset = MultiXactState->nextOffset;
2505+
LWLockRelease(MultiXactGenLock);
2506+
2507+
range.rangeEnd = MXOffsetToMemberPage(nextOffset);
2508+
2509+
SlruScanDirectory(MultiXactMemberCtl, SlruScanDirCbRemoveMembers, &range);
24302510
}
24312511

24322512
/*

src/backend/access/transam/slru.c

Lines changed: 18 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1210,6 +1210,17 @@ restart:;
12101210
(void) SlruScanDirectory(ctl, SlruScanDirCbDeleteCutoff, &cutoffPage);
12111211
}
12121212

1213+
void
1214+
SlruDeleteSegment(SlruCtl ctl, char *filename)
1215+
{
1216+
char path[MAXPGPATH];
1217+
1218+
snprintf(path, MAXPGPATH, "%s/%s", ctl->Dir, filename);
1219+
ereport(DEBUG2,
1220+
(errmsg("removing file \"%s\"", path)));
1221+
unlink(path);
1222+
}
1223+
12131224
/*
12141225
* SlruScanDirectory callback
12151226
* This callback reports true if there's any segment prior to the one
@@ -1235,16 +1246,10 @@ SlruScanDirCbReportPresence(SlruCtl ctl, char *filename, int segpage, void *data
12351246
static bool
12361247
SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, int segpage, void *data)
12371248
{
1238-
char path[MAXPGPATH];
12391249
int cutoffPage = *(int *) data;
12401250

12411251
if (ctl->PagePrecedes(segpage, cutoffPage))
1242-
{
1243-
snprintf(path, MAXPGPATH, "%s/%s", ctl->Dir, filename);
1244-
ereport(DEBUG2,
1245-
(errmsg("removing file \"%s\"", path)));
1246-
unlink(path);
1247-
}
1252+
SlruDeleteSegment(ctl, filename);
12481253

12491254
return false; /* keep going */
12501255
}
@@ -1256,12 +1261,7 @@ SlruScanDirCbDeleteCutoff(SlruCtl ctl, char *filename, int segpage, void *data)
12561261
bool
12571262
SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)
12581263
{
1259-
char path[MAXPGPATH];
1260-
1261-
snprintf(path, MAXPGPATH, "%s/%s", ctl->Dir, filename);
1262-
ereport(DEBUG2,
1263-
(errmsg("removing file \"%s\"", path)));
1264-
unlink(path);
1264+
SlruDeleteSegment(ctl, filename);
12651265

12661266
return false; /* keep going */
12671267
}
@@ -1272,6 +1272,11 @@ SlruScanDirCbDeleteAll(SlruCtl ctl, char *filename, int segpage, void *data)
12721272
* If the callback returns true, the scan is stopped. The last return value
12731273
* from the callback is returned.
12741274
*
1275+
* The callback receives the following arguments: 1. the SlruCtl struct for the
1276+
* slru being truncated; 2. the filename being considered; 3. the page number
1277+
* for the first page of that file; 4. a pointer to the opaque data given to us
1278+
* by the caller.
1279+
*
12751280
* Note that the ordering in which the directory is scanned is not guaranteed.
12761281
*
12771282
* Note that no locking is applied.

src/include/access/slru.h

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -150,6 +150,7 @@ extern bool SimpleLruDoesPhysicalPageExist(SlruCtl ctl, int pageno);
150150
typedef bool (*SlruScanCallback) (SlruCtl ctl, char *filename, int segpage,
151151
void *data);
152152
extern bool SlruScanDirectory(SlruCtl ctl, SlruScanCallback callback, void *data);
153+
extern void SlruDeleteSegment(SlruCtl ctl, char *filename);
153154

154155
/* SlruScanDirectory public callbacks */
155156
extern bool SlruScanDirCbReportPresence(SlruCtl ctl, char *filename,

0 commit comments

Comments
 (0)
0