8000 Restore sane locking behavior during parallel query. · postgres/postgres@29ef2b3 · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","url":"/postgres/postgres/commit/29ef2b310da9892fda075ff9ee12da7f92d5da6e","authoredDate":"2018-10-06T15:49:37.000-04:00","committedDate":"2018-10-06T15:49:37.000-04:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eRestore sane locking behavior during parallel query.\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"Commit \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/postgres/postgres/commit/9a3cebeaa7fdc1b0485475eb18121eb06968dc5d/hovercard\" href=\"https://github.com/postgres/postgres/commit/9a3cebeaa7fdc1b0485475eb18121eb06968dc5d\"\u003e\u003ctt\u003e9a3cebe\u003c/tt\u003e\u003c/a\u003e changed things so that parallel workers didn't obtain\nany lock of their own on tables they access. That was clearly a bad\nidea, but I'd mistakenly supposed that it was the intended end result\nof the series of patches for simplifying the executor's lock management.\nUndo that change in relation_open(), and adjust ExecOpenScanRelation()\nso that it gets the correct lock if inside a parallel worker.\n\nIn passing, clean up some more obsolete comments about when locks\nare acquired.\n\nDiscussion: \u003ca href=\"https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp\" rel=\"nofollow\"\u003ehttps://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp\u003c/a\u003e","authors":[{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false}],"committerAttribution":false,"committer":{"login":"tglsfdc","displayName":"Tom Lane","avatarUrl":"https://avatars.githubusercontent.com/u/8755309?v=4","path":"/tglsfdc","isGitHub":false},"parents":["f2343653f5b2aecfc759f36dbb3fd2a61f36853e"],"globalRelayId":"MDY6Q29tbWl0OTI3NDQyOjI5ZWYyYjMxMGRhOTg5MmZkYTA3NWZmOWVlMTJkYTdmOTJkNWRhNmU=","sha1":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","sha2":"29ef2b310da9892fda075ff9ee12da7f92d5da6e"},"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":1139,"text":"@@ -1140,13 +1140,9 @@ relation_open(Oid relationId, LOCKMODE lockmode)","html":"@@ -1140,13 +1140,9 @@ relation_open(Oid relationId, LOCKMODE lockmode)","displayNoNewLineWarning":false,"position":0,"left":1139,"right":1139},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1140,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":1140,"right":1140},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1141,"text":" \t * If we didn't get the lock ourselves, assert that caller holds one,","html":" \u003cspan class=pl-c\u003e\t * If we didn\u0026#39;t get the lock ourselves, assert that caller holds one,\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":1141,"right":1141},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1142,"text":" \t * except in bootstrap mode where no locks are used.","html":" \u003cspan class=pl-c\u003e\t * except in bootstrap mode where no locks are used.\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":1142,"right":1142},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1143,"text":"-\t *","html":"-\u003cspan class=pl-c\u003e\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1143,"right":1142},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1144,"text":"-\t * Also, parallel workers currently assume that their parent holds locks","html":"-\u003cspan class=pl-c\u003e\t * Also, parallel workers currently assume that their parent holds locks\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":1144,"right":1142},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1145,"text":"-\t * for tables used in the parallel query (a mighty shaky assumption).","html":"-\u003cspan class=pl-c\u003e\t * for tables used in the parallel query (a mighty shaky assumption).\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":1145,"right":1142},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1143,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":1146,"right":1143},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1144,"text":" \tAssert(lockmode != NoLock ||","html":" \t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003elockmode\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-s1\u003eNoLock\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":1147,"right":1144},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1145,"text":" \t\t IsBootstrapProcessingMode() ||","html":" \t\t \u003cspan class=pl-en\u003eIsBootstrapProcessingMode\u003c/span\u003e() \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":1148,"right":1145},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1149,"text":"-\t\t IsParallelWorker() ||","html":"-\t\t \u003cspan class=pl-en\u003eIsParallelWorker\u003c/span\u003e() \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":1149,"right":1145},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1146,"text":" \t\t CheckRelationLockedByMe(r, AccessShareLock, true));","html":" \t\t \u003cspan class=pl-en\u003eCheckRelationLockedByMe\u003c/span\u003e(\u003cspan class=pl-s1\u003er\u003c/span\u003e, \u003cspan class=pl-s1\u003eAccessShareLock\u003c/span\u003e, true));","displayNoNewLineWarning":false,"position":11,"left":1150,"right":1146},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1147,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":12,"left":1151,"right":1147},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1148,"text":" \t/* Make note that we've accessed a temporary relation */","html":" \t\u003cspan class=pl-c\u003e/* Make note that we\u0026#39;ve accessed a temporary relation */\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":1152,"right":1148}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":9511,"linesChanged":4,"newTreeEntry":{"lineCount":9511,"path":"src/backend/access/heap/heapam.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/access/heap/heapam.c","mode":100644},"linesAdded":0,"linesDeleted":4,"path":"src/backend/access/heap/heapam.c","pathDigest":"3b097bc5bff5567d6b7406cdc244c4776320db676812ead1676559914a256a0a","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1621,"text":"@@ -1622,8 +1622,8 @@ ExecEndPlan(PlanState *planstate, EState *estate)","html":"@@ -1622,8 +1622,8 @@ ExecEndPlan(PlanState *planstate, EState *estate)","displayNoNewLineWarning":false,"position":0,"left":1621,"right":1621},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1622,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":1,"left":1622,"right":1622},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1623,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":1623,"right":1623},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1624,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":1624,"right":1624},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1625,"text":"-\t * close whatever rangetable Relations have been opened. We did not","html":"-\u003cspan class=\"pl-c\"\u003e\t * close whatever rangetable Relations have been opened. We \u003cspan class=\"x x-first x-last\"\u003edid\u003c/span\u003e not\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1625,"right":1624},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1626,"text":"-\t * acquire locks in ExecGetRangeTableRelation, so don't release 'em here.","html":"-\u003cspan class=\"pl-c\"\u003e\t * \u003cspan class=\"x x-first x-last\"\u003eacquire \u003c/span\u003elocks \u003cspan class=\"x x-first x-last\"\u003ein ExecGetRangeTableRelation, so don't release 'em here\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":1626,"right":1624},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1625,"text":"+\t * close whatever rangetable Relations have been opened. We do not","html":"+\u003cspan class=\"pl-c\"\u003e\t * close whatever rangetable Relations have been opened. We \u003cspan class=\"x x-first x-last\"\u003edo\u003c/span\u003e not\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":1626,"right":1625},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1626,"text":"+\t * release any locks we might hold on those rels.","html":"+\u003cspan class=\"pl-c\"\u003e\t * \u003cspan class=\"x x-first x-last\"\u003erelease any \u003c/span\u003elocks \u003cspan class=\"x x-first x-last\"\u003ewe might hold on those rels\u003c/span\u003e.\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":1626,"right":1626},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1627,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":1627,"right":1627},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1628,"text":" \tnum_relations = estate-\u003ees_range_table_size;","html":" \t\u003cspan class=pl-s1\u003enum_relations\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eestate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ees_range_table_size\u003c/span\u003e;","displayNoNewLineWarning":false,"position":9,"left":1628,"right":1628},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1629,"text":" \tfor (i = 0; i \u003c num_relations; i++)","html":" \t\u003cspan class=pl-k\u003efor\u003c/span\u003e (\u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026lt;\u003c/span\u003e \u003cspan class=pl-s1\u003enum_relations\u003c/span\u003e; \u003cspan class=pl-s1\u003ei\u003c/span\u003e\u003cspan class=pl-c1\u003e++\u003c/span\u003e)","displayNoNewLineWarning":false,"position":10,"left":1629,"right":1629}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3301,"linesChanged":4,"newTreeEntry":{"lineCount":3301,"path":"src/backend/executor/execMain.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/execMain.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/backend/executor/execMain.c","pathDigest":"ed8e9724b668cf25323e7d12c3354102d66936be19eae302d7ca599988e5bfc8","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":731,"text":"@@ -732,16 +732,30 @@ ExecGetRangeTableRelation(EState *estate, Index rti)","html":"@@ -732,16 +732,30 @@ ExecGetRangeTableRelation(EState *estate, Index rti)","displayNoNewLineWarning":false,"position":0,"left":731,"right":731},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":732,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":732,"right":732},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":733,"text":" \t\tAssert(rte-\u003ertekind == RTE_RELATION);","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ertekind\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eRTE_RELATION\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":733,"right":733},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":734,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":734,"right":734},{"stylingDirective":null,"type":"DELETION","blobLineNumber":735,"text":"-\t\trel = estate-\u003ees_relations[rti - 1] = heap_open(rte-\u003erelid, NoLock);","html":"-\t\t\u003cspan class=pl-s1\u003erel\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eestate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ees_relations\u003c/span\u003e[\u003cspan class=pl-s1\u003erti\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eheap_open\u003c/span\u003e(\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eNoLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":735,"right":734},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":735,"text":"+\t\tif (!IsParallelWorker())","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-en\u003eIsParallelWorker\u003c/span\u003e())","displayNoNewLineWarning":false,"position":5,"left":735,"right":735},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":736,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":6,"left":735,"right":736},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":737,"text":"+\t\t\t/*","html":"+\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":735,"right":737},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":738,"text":"+\t\t\t * In a normal query, we should already have the appropriate lock,","html":"+\u003cspan class=pl-c\u003e\t\t\t * In a normal query, we should already have the appropriate lock,\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":735,"right":738},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":739,"text":"+\t\t\t * but verify that through an Assert. Since there's already an","html":"+\u003cspan class=pl-c\u003e\t\t\t * but verify that through an Assert. Since there\u0026#39;s already an\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":735,"right":739},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":740,"text":"+\t\t\t * Assert inside heap_open that insists on holding some lock, it","html":"+\u003cspan class=pl-c\u003e\t\t\t * Assert inside heap_open that insists on holding some lock, it\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":735,"right":740},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":741,"text":"+\t\t\t * seems sufficient to check this only when rellockmode is higher","html":"+\u003cspan class=pl-c\u003e\t\t\t * seems sufficient to check this only when rellockmode is higher\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":735,"right":741},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":742,"text":"+\t\t\t * than the minimum.","html":"+\u003cspan class=pl-c\u003e\t\t\t * than the minimum.\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":735,"right":742},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":743,"text":"+\t\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":735,"right":743},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":744,"text":"+\t\t\trel = heap_open(rte-\u003erelid, NoLock);","html":"+\t\t\t\u003cspan class=pl-s1\u003erel\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eheap_open\u003c/span\u003e(\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eNoLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":735,"right":744},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":745,"text":"+\t\t\tAssert(rte-\u003erellockmode == AccessShareLock ||","html":"+\t\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erellockmode\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-s1\u003eAccessShareLock\u003c/span\u003e \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":735,"right":745},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":746,"text":"+\t\t\t\t CheckRelationLockedByMe(rel, rte-\u003erellockmode, false));","html":"+\t\t\t\t \u003cspan class=pl-en\u003eCheckRelationLockedByMe\u003c/span\u003e(\u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erellockmode\u003c/span\u003e, false));","displayNoNewLineWarning":false,"position":16,"left":735,"right":746},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":747,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":17,"left":735,"right":747},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":748,"text":"+\t\telse","html":"+\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":18,"left":735,"right":748},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":749,"text":"+\t\t{","html":"+\t\t{","displayNoNewLineWarning":false,"position":19,"left":735,"right":749},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":750,"text":"+\t\t\t/*","html":"+\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":735,"right":750},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":751,"text":"+\t\t\t * If we are a parallel worker, we need to obtain our own local","html":"+\u003cspan class=pl-c\u003e\t\t\t * If we are a parallel worker, we need to obtain our own local\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":735,"right":751},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":752,"text":"+\t\t\t * lock on the relation. This ensures sane behavior in case the","html":"+\u003cspan class=pl-c\u003e\t\t\t * lock on the relation. This ensures sane behavior in case the\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":735,"right":752},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":753,"text":"+\t\t\t * parent process exits before we do.","html":"+\u003cspan class=pl-c\u003e\t\t\t * parent process exits before we do.\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":735,"right":753},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":754,"text":"+\t\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":24,"left":735,"right":754},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":755,"text":"+\t\t\trel = heap_open(rte-\u003erelid, rte-\u003erellockmode);","html":"+\t\t\t\u003cspan class=pl-s1\u003erel\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eheap_open\u003c/span\u003e(\u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelid\u003c/span\u003e, \u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erellockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":25,"left":735,"right":755},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":756,"text":"+\t\t}","html":"+\t\t}","displayNoNewLineWarning":false,"position":26,"left":735,"right":756},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":757,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":27,"left":736,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":737,"text":"-\t\t/*","html":"-\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":28,"left":737,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":738,"text":"-\t\t * Verify that appropriate lock was obtained before execution.","html":"-\u003cspan class=pl-c\u003e\t\t * Verify that appropriate lock was obtained before execution.\u003c/span\u003e","displayNoNewLineWarning":false,"position":29,"left":738,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":739,"text":"-\t\t *","html":"-\u003cspan class=pl-c\u003e\t\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":30,"left":739,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":740,"text":"-\t\t * In the case of parallel query, only the leader would've obtained","html":"-\u003cspan class=pl-c\u003e\t\t * In the case of parallel query, only the leader would\u0026#39;ve obtained\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":740,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":741,"text":"-\t\t * the lock (that needs to be fixed, though).","html":"-\u003cspan class=pl-c\u003e\t\t * the lock (that needs to be fixed, though).\u003c/span\u003e","displayNoNewLineWarning":false,"position":32,"left":741,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":742,"text":"-\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":742,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":743,"text":"-\t\tAssert(IsParallelWorker() ||","html":"-\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-en\u003eIsParallelWorker\u003c/span\u003e() \u003cspan class=pl-c1\u003e||\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":743,"right":757},{"stylingDirective":null,"type":"DELETION","blobLineNumber":744,"text":"-\t\t\t CheckRelationLockedByMe(rel, rte-\u003erellockmode, false));","html":"-\t\t\t \u003cspan class=pl-en\u003eCheckRelationLockedByMe\u003c/span\u003e(\u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-s1\u003erte\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erellockmode\u003c/span\u003e, false));","displayNoNewLineWarning":false,"position":35,"left":744,"right":757},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":758,"text":"+\t\testate-\u003ees_relations[rti - 1] = rel;","html":"+\t\t\u003cspan class=pl-s1\u003eestate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ees_relations\u003c/span\u003e[\u003cspan class=pl-s1\u003erti\u003c/span\u003e \u003cspan class=pl-c1\u003e-\u003c/span\u003e \u003cspan class=pl-c1\u003e1\u003c/span\u003e] \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e;","displayNoNewLineWarning":false,"position":36,"left":744,"right":758},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":759,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":37,"left":745,"right":759},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":760,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":38,"left":746,"right":760},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":761,"text":" \treturn rel;","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e;","displayNoNewLineWarning":false,"position":39,"left":747,"right":761}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1065,"linesChanged":32,"newTreeEntry":{"lineCount":1065,"path":"src/backend/executor/execUtils.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/execUtils.c","mode":100644},"linesAdded":23,"linesDeleted":9,"path":"src/backend/executor/execUtils.c","pathDigest":"b48b322902e8cb8cf66825110ae659fcb3f7a15ad84cef5d4b3c3349d4618eb4","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":898,"text":"@@ -899,16 +899,12 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)","html":"@@ -899,16 +899,12 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":898,"right":898},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":899,"text":" \tExecAssignExprContext(estate, \u0026scanstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":899,"right":899},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":900,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":900,"right":900},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":901,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":901,"right":901},{"stylingDirective":null,"type":"DELETION","blobLineNumber":902,"text":"-\t * open the base relation and acquire appropriate lock on it.","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation\u003cspan class=\"x x-first x-last\"\u003e and acquire appropriate lock on it.\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":902,"right":901},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":902,"text":"+\t * open the scan relation","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":902,"right":902},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":903,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":903,"right":903},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":904,"text":" \tcurrentRelation = ExecOpenScanRelation(estate, node-\u003escan.scanrelid, eflags);","html":" \t\u003cspan class=pl-s1\u003ecurrentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-s1\u003enode\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan\u003c/span\u003e.\u003cspan class=pl-c1\u003escanrelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eeflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":904,"right":904},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":905,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":905,"right":905},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":906,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":906,"right":906},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":907,"text":" \t * initialize child nodes","html":" \u003cspan class=pl-c\u003e\t * initialize child nodes\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":907,"right":907},{"stylingDirective":null,"type":"DELETION","blobLineNumber":908,"text":"-\t *","html":"-\u003cspan class=pl-c\u003e\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":908,"right":907},{"stylingDirective":null,"type":"DELETION","blobLineNumber":909,"text":"-\t * We do this after ExecOpenScanRelation because the child nodes will open","html":"-\u003cspan class=pl-c\u003e\t * We do this after ExecOpenScanRelation because the child nodes will open\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":909,"right":907},{"stylingDirective":null,"type":"DELETION","blobLineNumber":910,"text":"-\t * indexscans on our relation's indexes, and we want to be sure we have","html":"-\u003cspan class=pl-c\u003e\t * indexscans on our relation\u0026#39;s indexes, and we want to be sure we have\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":910,"right":907},{"stylingDirective":null,"type":"DELETION","blobLineNumber":911,"text":"-\t * acquired a lock on the relation first.","html":"-\u003cspan class=pl-c\u003e\t * acquired a lock on the relation first.\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":911,"right":907},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":908,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":912,"right":908},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":909,"text":" \touterPlanState(scanstate) = ExecInitNode(outerPlan(node), estate, eflags);","html":" \t\u003cspan class=pl-en\u003eouterPlanState\u003c/span\u003e(\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e) \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eExecInitNode\u003c/span\u003e(\u003cspan class=pl-en\u003eouterPlan\u003c/span\u003e(\u003cspan class=pl-s1\u003enode\u003c/span\u003e), \u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-s1\u003eeflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":16,"left":913,"right":909},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":910,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":17,"left":914,"right":910}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1106,"linesChanged":6,"newTreeEntry":{"lineCount":1106,"path":"src/backend/executor/nodeBitmapHeapscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeBitmapHeapscan.c","mode":100644},"linesAdded":1,"linesDeleted":5,"path":"src/backend/executor/nodeBitmapHeapscan.c","pathDigest":"836c06f7861abbcd96f3d577b885c0d500ade900acc3379dc838a82b1c0fd85e","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d 8000 5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":54,"text":"@@ -55,7 +55,7 @@ ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags)","html":"@@ -55,7 +55,7 @@ ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":54,"right":54},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":55,"text":" \tExecAssignExprContext(estate, \u0026css-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003ecss\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":55,"right":55},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":56,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":56,"right":56},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":57,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":57,"right":57},{"stylingDirective":null,"type":"DELETION","blobLineNumber":58,"text":"-\t * open the base relation, if any, and acquire an appropriate lock on it","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation, if any\u003cspan class=\"x x-first x-last\"\u003e, and acquire an appropriate lock on it\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":58,"right":57},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":58,"text":"+\t * open the scan relation, if any","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation, if any\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":58,"right":58},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":59,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":59,"right":59},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":60,"text":" \tif (scanrelid \u003e 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003escanrelid\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":7,"left":60,"right":60},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":61,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":8,"left":61,"right":61}],"diffNumber":4,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":227,"linesChanged":2,"newTreeEntry":{"lineCount":227,"path":"src/backend/executor/nodeCustom.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeCustom.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/executor/nodeCustom.c","pathDigest":"8a41fd1f5cfcb55785e1ad4d9afb66e95bc46f6a1ca8b1c699cf7e70303bf316","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":155,"text":"@@ -156,8 +156,8 @@ ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)","html":"@@ -156,8 +156,8 @@ ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":155,"right":155},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":156,"text":" \tExecAssignExprContext(estate, \u0026scanstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":156,"right":156},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":157,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":157,"right":157},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":158,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":158,"right":158},{"stylingDirective":null,"type":"DELETION","blobLineNumber":159,"text":"-\t * open the base relation, if any, and acquire an appropriate lock on it;","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation, if any\u003cspan class=\"x x-first x-last\"\u003e, and\u003c/span\u003e acquire \u003cspan class=\"x x-first x-last\"\u003ean appropriate lock on it;\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":159,"right":158},{"stylingDirective":null,"type":"DELETION","blobLineNumber":160,"text":"-\t * also acquire function pointers from the FDW's handler","html":"-\u003cspan class=\"pl-c\"\u003e\t * \u003cspan class=\"x x-first x-last\"\u003ealso acquire function pointers from the \u003c/span\u003eFDW's handler\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":160,"right":158},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":159,"text":"+\t * open the scan relation, if any; also acquire function pointers from the","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation, if any\u003cspan class=\"x x-first x-last\"\u003e; also\u003c/span\u003e acquire \u003cspan class=\"x x-first x-last\"\u003efunction pointers from the\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":160,"right":159},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":160,"text":"+\t * FDW's handler","html":"+\u003cspan class=\"pl-c\"\u003e\t * FDW's handler\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":160,"right":160},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":161,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":161,"right":161},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":162,"text":" \tif (scanrelid \u003e 0)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003escanrelid\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026gt;\u003c/span\u003e \u003cspan class=pl-c1\u003e0\u003c/span\u003e)","displayNoNewLineWarning":false,"position":9,"left":162,"right":162},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":163,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":10,"left":163,"right":163}],"diffNumber":5,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":385,"linesChanged":4,"newTreeEntry":{"lineCount":385,"path":"src/backend/executor/nodeForeignscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeForeignscan.c","mode":100644},"linesAdded":2,"linesDeleted":2,"path":"src/backend/executor/nodeForeignscan.c","pathDigest":"b0dc7f2820929fc64de2526004a292128a39e0ff452d74006e6ed5a8a7a3d245","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":510,"text":"@@ -511,7 +511,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)","html":"@@ -511,7 +511,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":510,"right":510},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":511,"text":" \tExecAssignExprContext(estate, \u0026indexstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eindexstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":511,"right":511},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":512,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":512,"right":512},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":513,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":513,"right":513},{"stylingDirective":null,"type":"DELETION","blobLineNumber":514,"text":"-\t * open the base relation and acquire appropriate lock on it.","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation\u003cspan class=\"x x-first x-last\"\u003e and acquire appropriate lock on it.\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":514,"right":513},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":514,"text":"+\t * open the scan relation","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":514,"right":514},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":515,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":515,"right":515},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":516,"text":" \tcurrentRelation = ExecOpenScanRelation(estate, node-\u003escan.scanrelid, eflags);","html":" \t\u003cspan class=pl-s1\u003ecurrentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-s1\u003enode\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan\u003c/span\u003e.\u003cspan class=pl-c1\u003escanrelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eeflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":516,"right":516},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":517,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":517,"right":517}],"diffNumber":6,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":733,"linesChanged":2,"newTreeEntry":{"lineCount":733,"path":"src/backend/executor/nodeIndexonlyscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeIndexonlyscan.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/executor/nodeIndexonlyscan.c","pathDigest":"381ffa77edaae9596c9e9ed60ac2b8671e4406053872e254a5e32a0cad60c144","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":932,"text":"@@ -933,7 +933,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)","html":"@@ -933,7 +933,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":932,"right":932},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":933,"text":" \tExecAssignExprContext(estate, \u0026indexstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eindexstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":933,"right":933},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":934,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":934,"right":934},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":935,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":935,"right":935},{"stylingDirective":null,"type":"DELETION","blobLineNumber":936,"text":"-\t * open the base relation and acquire appropriate lock on it.","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation\u003cspan class=\"x x-first x-last\"\u003e and acquire appropriate lock on it.\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":936,"right":935},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":936,"text":"+\t * open the scan relation","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":936,"right":936},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":937,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":937,"right":937},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":938,"text":" \tcurrentRelation = ExecOpenScanRelation(estate, node-\u003escan.scanrelid, eflags);","html":" \t\u003cspan class=pl-s1\u003ecurrentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-s1\u003enode\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan\u003c/span\u003e.\u003cspan class=pl-c1\u003escanrelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eeflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":938,"right":938},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":939,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":939,"right":939}],"diffNumber":7,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1769,"linesChanged":2,"newTreeEntry":{"lineCount":1769,"path":"src/backend/executor/nodeIndexscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeIndexscan.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/executor/nodeIndexscan.c","pathDigest":"3681f98804807673fc15ba79c08183046d0c264e75a566a0d9a41331d24a06b1","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":133,"text":"@@ -134,10 +134,7 @@ ExecInitSampleScan(SampleScan *node, EState *estate, int eflags)","html":"@@ -134,10 +134,7 @@ ExecInitSampleScan(SampleScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":133,"right":133},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":134,"text":" \tExecAssignExprContext(estate, \u0026scanstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":134,"right":134},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":135,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":135,"right":135},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":136,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":136,"right":136},{"stylingDirective":null,"type":"DELETION","blobLineNumber":137,"text":"-\t * Initialize scan relation.","html":"-\u003cspan class=pl-c\u003e\t * Initialize scan relation.\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":137,"right":136},{"stylingDirective":null,"type":"DELETION","blobLineNumber":138,"text":"-\t *","html":"-\u003cspan class=pl-c\u003e\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":138,"right":136},{"stylingDirective":null,"type":"DELETION","blobLineNumber":139,"text":"-\t * Get the relation object id from the relid'th entry in the range table,","html":"-\u003cspan class=pl-c\u003e\t * Get the relation object id from the relid\u0026#39;th entry in the range table,\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":139,"right":136},{"stylingDirective":null,"type":"DELETION","blobLineNumber":140,"text":"-\t * open that relation and acquire appropriate lock on it.","html":"-\u003cspan class=pl-c\u003e\t * open that relation and acquire appropriate lock on it.\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":140,"right":136},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":137,"text":"+\t * open the scan relation","html":"+\u003cspan class=pl-c\u003e\t * open the scan relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":140,"right":137},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":138,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":141,"right":138},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":139,"text":" \tscanstate-\u003ess.ss_currentRelation =","html":" \t\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003ess_currentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":142,"right":139},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":140,"text":" \t\tExecOpenScanRelation(estate,","html":" \t\t\u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":143,"right":140}],"diffNumber":8,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":564,"linesChanged":5,"newTreeEntry":{"lineCount":564,"path":"src/backend/executor/nodeSamplescan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeSamplescan.c","mode":100644},"linesAdded":1,"linesDeleted":4,"path":"src/backend/executor/nodeSamplescan.c","pathDigest":"47a41f86aec09234f2701ef2ee893c0607f85edb07153e2863b67ad0209bdf5f","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":162,"text":"@@ -163,10 +163,7 @@ ExecInitSeqScan(SeqScan *node, EState *estate, int eflags)","html":"@@ -163,10 +163,7 @@ ExecInitSeqScan(SeqScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":162,"right":162},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":163,"text":" \tExecAssignExprContext(estate, \u0026scanstate-\u003ess.ps);","html":" \t\u003cspan class=pl-en\u003eExecAssignExprContext\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003eps\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":163,"right":163},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":164,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":164,"right":164},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":165,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":165,"right":165},{"stylingDirective":null,"type":"DELETION","blobLineNumber":166,"text":"-\t * Initialize scan relation.","html":"-\u003cspan class=pl-c\u003e\t * Initialize scan relation.\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":166,"right":165},{"stylingDirective":null,"type":"DELETION","blobLineNumber":167,"text":"-\t *","html":"-\u003cspan class=pl-c\u003e\t *\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":167,"right":165},{"stylingDirective":null,"type":"DELETION","blobLineNumber":168,"text":"-\t * Get the relation object id from the relid'th entry in the range table,","html":"-\u003cspan class=pl-c\u003e\t * Get the relation object id from the relid\u0026#39;th entry in the range table,\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":168,"right":165},{"stylingDirective":null,"type":"DELETION","blobLineNumber":169,"text":"-\t * open that relation and acquire appropriate lock on it.","html":"-\u003cspan class=pl-c\u003e\t * open that relation and acquire appropriate lock on it.\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":169,"right":165},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":166,"text":"+\t * open the scan relation","html":"+\u003cspan class=pl-c\u003e\t * open the scan relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":169,"right":166},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":167,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":170,"right":167},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":168,"text":" \tscanstate-\u003ess.ss_currentRelation =","html":" \t\u003cspan class=pl-s1\u003escanstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ess\u003c/span\u003e.\u003cspan class=pl-c1\u003ess_currentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":171,"right":168},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":169,"text":" \t\tExecOpenScanRelation(estate,","html":" \t\t\u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":172,"right":169}],"diffNumber":9,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":326,"linesChanged":5,"newTreeEntry":{"lineCount":326,"path":"src/backend/executor/nodeSeqscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeSeqscan.c","mode":100644},"linesAdded":1,"linesDeleted":4,"path":"src/backend/executor/nodeSeqscan.c","pathDigest":"8f1da8166a37e420e6e16993baa36b3a2b57a389ada818a470d887eadae737a2","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":530,"text":"@@ -531,7 +531,7 @@ ExecInitTidScan(TidScan *node, EState *estate, int eflags)","html":"@@ -531,7 +531,7 @@ ExecInitTidScan(TidScan *node, EState *estate, int eflags)","displayNoNewLineWarning":false,"position":0,"left":530,"right":530},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":531,"text":" \ttidstate-\u003etss_TidPtr = -1;","html":" \t\u003cspan class=pl-s1\u003etidstate\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003etss_TidPtr\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e-1\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":531,"right":531},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":532,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":532,"right":532},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":533,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":533,"right":533},{"stylingDirective":null,"type":"DELETION","blobLineNumber":534,"text":"-\t * open the base relation and acquire appropriate lock on it.","html":"-\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003ebase\u003c/span\u003e relation\u003cspan class=\"x x-first x-last\"\u003e and acquire appropriate lock on it.\u003c/span\u003e\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":534,"right":533},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":534,"text":"+\t * open the scan relation","html":"+\u003cspan class=\"pl-c\"\u003e\t * open the \u003cspan class=\"x x-first x-last\"\u003escan\u003c/span\u003e relation\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":534,"right":534},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":535,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":6,"left":535,"right":535},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":536,"text":" \tcurrentRelation = ExecOpenScanRelation(estate, node-\u003escan.scanrelid, eflags);","html":" \t\u003cspan class=pl-s1\u003ecurrentRelation\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eExecOpenScanRelation\u003c/span\u003e(\u003cspan class=pl-s1\u003eestate\u003c/span\u003e, \u003cspan class=pl-s1\u003enode\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003escan\u003c/span\u003e.\u003cspan class=pl-c1\u003escanrelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eeflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":536,"right":536},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":537,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":537,"right":537}],"diffNumber":10,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":565,"linesChanged":2,"newTreeEntry":{"lineCount":565,"path":"src/backend/executor/nodeTidscan.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/executor/nodeTidscan.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/executor/nodeTidscan.c","pathDigest":"8bd09d2d464e5727c76b0bb81743ca5c4133e0a7b947c89e064dd98b6d0bd95f","status":"MODIFIED","truncatedReason":null,"oldOid":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","newOid":"29ef2b310da9892fda075ff9ee12da7f92d5da6e","copilotChatReference":null,"deletedSha":"f2343653f5b2aecfc759f36dbb3fd2a61f36853e","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/29ef2b310da9892fda075ff9ee12da7f92d5da6e","fileTreeExpanded":true,"headerInfo":{"additions":34,"deletions":34,"filesChanged":11,"filesChangedString":"11"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":11,"truncated":false,"byteCount":5459,"lineShownCount":154},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"Dpx12uRKg-8SEJtAYv0GTW03JTvX15n1noIGw3bVb_1D_IOIGzVdOW2Qb2IAtNcGMxZuY3tO1a7wU3iLu6dOuw"},"/users/diffview?diff=unified":{"post":"bNpKbNPdBihZs9oGqYcfQ1DKerYATaUfo0_A-8hdACAhurw-LKLY_iYzLiTLzs4IDusx7qzU6UTNnr6zBS8hZg"},"/notifications/thread":{"post":"_AjZvet-XSp_0dhKOLDxw44HXzu_ae7CZa5pSO5tAFOE7Esi8ghqLqrA9AMZT4WXXi4V1X_7RuhvLLNDQVEG0Q"}}},"title":"Restore sane locking behavior during parallel query. · postgres/postgres@29ef2b3","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 29ef2b3

Browse files
committed
Restore sane locking behavior during parallel query.
Commit 9a3cebe changed things so that parallel workers didn't obtain any lock of their own on tables they access. That was clearly a bad idea, but I'd mistakenly supposed that it was the intended end result of the series of patches for simplifying the executor's lock management. Undo that change in relation_open(), and adjust ExecOpenScanRelation() so that it gets the correct lock if inside a parallel worker. In passing, clean up some more obsolete comments about when locks are acquired. Discussion: https://postgr.es/m/468c85d9-540e-66a2-1dde-fec2b741e688@lab.ntt.co.jp
1 parent f234365 commit 29ef2b3

File tree

11 files changed

+34
-34
lines changed

11 files changed

+34
-34
lines changed

src/backend/access/heap/heapam.c

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1140,13 +1140,9 @@ relation_open(Oid relationId, LOCKMODE lockmode)
11401140
/*
11411141
* If we didn't get the lock ourselves, assert that caller holds one,
11421142
* except in bootstrap mode where no locks are used.
1143-
*
1144-
* Also, parallel workers currently assume that their parent holds locks
1145-
* for tables used in the parallel query (a mighty shaky assumption).
11461143
*/
11471144
Assert(lockmode != NoLock ||
11481145
IsBootstrapProcessingMode() ||
1149-
IsParallelWorker() ||
11501146
CheckRelationLockedByMe(r, AccessShareLock, true));
11511147

11521148
/* Make note that we've accessed a temporary relation */

src/backend/executor/execMain.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1622,8 +1622,8 @@ ExecEndPlan(PlanState *planstate, EState *estate)
16221622
}
16231623

16241624
/*
1625-
* close whatever rangetable Relations have been opened. We did not
1626-
* acquire locks in ExecGetRangeTableRelation, so don't release 'em here.
1625+
* close whatever rangetable Relations have been opened. We do not
1626+
* release any locks we might hold on those rels.
16271627
*/
16281628
num_relations = estate->es_range_table_size;
16291629
for (i = 0; i < num_relations; i++)

src/backend/executor/execUtils.c

Lines changed: 23 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -732,16 +732,30 @@ ExecGetRangeTableRelation(EState *estate, Index rti)
732732

733733
Assert(rte->rtekind == RTE_RELATION);
734734

735-
rel = estate->es_relations[rti - 1] = heap_open(rte->relid, NoLock);
735+
if (!IsParallelWorker())
736+
{
737+
/*
738+
* In a normal query, we should already have the appropriate lock,
739+
* but verify that through an Assert. Since there's already an
740+
* Assert inside heap_open that insists on holding some lock, it
741+
* seems sufficient to check this only when rellockmode is higher
742+
* than the minimum.
743+
*/
744+
rel = heap_open(rte->relid, NoLock);
745+
Assert(rte->rellockmode == AccessShareLock ||
746+
CheckRelationLockedByMe(rel, rte->rellockmode, false));
747+
}
748+
else
749+
{
750+
/*
751+
* If we are a parallel worker, we need to obtain our own local
752+
* lock on the relation. This ensures sane behavior in case the
753+
* parent process exits before we do.
754+
*/
755+
rel = heap_open(rte->relid, rte->rellockmode);
756+
}
736757

737-
/*
738-
* Verify that appropriate lock was obtained before execution.
739-
*
740-
* In the case of parallel query, only the leader would've obtained
741-
* the lock (that needs to be fixed, though).
742-
*/
743-
Assert(IsParallelWorker() ||
744-
CheckRelationLockedByMe(rel, rte->rellockmode, false));
758+
estate->es_relations[rti - 1] = rel;
745759
}
746760

747761
return rel;

src/backend/executor/nodeBitmapHeapscan.c

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -899,16 +899,12 @@ ExecInitBitmapHeapScan(BitmapHeapScan *node, EState *estate, int eflags)
899899
ExecAssignExprContext(estate, &scanstate->ss.ps);
900900

901901
/*
902-
* open the base relation and acquire appropriate lock on it.
902+
* open the scan relation
903903
*/
904904
currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
905905

906906
/*
907907
* initialize child nodes
908-
*
909-
* We do this after ExecOpenScanRelation because the child nodes will open
910-
* indexscans on our relation's indexes, and we want to be sure we have
911-
* acquired a lock on the relation first.
912908
*/
913909
outerPlanState(scanstate) = ExecInitNode(outerPlan(node), estate, eflags);
914910

src/backend/executor/nodeCustom.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@ ExecInitCustomScan(CustomScan *cscan, EState *estate, int eflags)
5555
ExecAssignExprContext(estate, &css->ss.ps);
5656

5757
/*
58-
* open the base relation, if any, and acquire an appropriate lock on it
58+
* open the scan relation, if any
5959
*/
6060
if (scanrelid > 0)
6161
{

src/backend/executor/nodeForeignscan.c

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -156,8 +156,8 @@ ExecInitForeignScan(ForeignScan *node, EState *estate, int eflags)
156156
ExecAssignExprContext(estate, &scanstate->ss.ps);
157157

158158
/*
159-
* open the base relation, if any, and acquire an appropriate lock on it;
160-
* also acquire function pointers from the FDW's handler
159+
* open the scan relation, if any; also acquire function pointers from the
160+
* FDW's handler
161161
*/
162162
if (scanrelid > 0)
163163
{

src/backend/executor/nodeIndexonlyscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -511,7 +511,7 @@ ExecInitIndexOnlyScan(IndexOnlyScan *node, EState *estate, int eflags)
511511
ExecAssignExprContext(estate, &indexstate->ss.ps);
512512

513513
/*
514-
* open the base relation and acquire appropriate lock on it.
514+
* open the scan relation
515515
*/
516516
currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
517517

src/backend/executor/nodeIndexscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -933,7 +933,7 @@ ExecInitIndexScan(IndexScan *node, EState *estate, int eflags)
933933
ExecAssignExprContext(estate, &indexstate->ss.ps);
934934

935935
/*
936-
* open the base relation and acquire appropriate lock on it.
936+
* open the scan relation
937937
*/
938938
currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
939939

src/backend/executor/nodeSamplescan.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -134,10 +134,7 @@ ExecInitSampleScan(SampleScan *node, EState *estate, int eflags)
134134
ExecAssignExprContext(estate, &scanstate->ss.ps);
135135

136136
/*
137-
* Initialize scan relation.
138-
*
139-
* Get the relation object id from the relid'th entry in the range table,
140-
* open that relation and acquire appropriate lock on it.
137+
* open the scan relation
141138
*/
142139
scanstate->ss.ss_currentRelation =
143140
ExecOpenScanRelation(estate,

src/backend/executor/nodeSeqscan.c

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -163,10 +163,7 @@ ExecInitSeqScan(SeqScan *node, EState *estate, int eflags)
163163
ExecAssignExprContext(estate, &scanstate->ss.ps);
164164

165165
/*
166-
* Initialize scan relation.
167-
*
168-
* Get the relation object id from the relid'th entry in the range table,
169-
* open that relation and acquire appropriate lock on it.
166+
* open the scan relation
170167
*/
171168
scanstate->ss.ss_currentRelation =
172169
ExecOpenScanRelation(estate,

src/backend/executor/nodeTidscan.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -531,7 +531,7 @@ ExecInitTidScan(TidScan *node, EState *estate, int eflags)
531531
tidstate->tss_TidPtr = -1;
532532

533533
/*
534-
* open the base relation and acquire appropriate lock on it.
534+
* open the scan relation
535535
*/
536536
currentRelation = ExecOpenScanRelation(estate, node->scan.scanrelid, eflags);
537537

0 commit comments

Comments
 (0)
0