<
8000
script type="application/json" data-target="react-app.embeddedData">{"payload":{"commit":{"oid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","url":"/postgres/postgres/commit/095d109ccd76ca4c46c4ea2be30d63d70361c5f9","authoredDate":"2023-11-30T15:25:57.000+07:00","committedDate":"2023-11-30T15:25:57.000+07:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eRemove redundant setting of hashkey after insertion\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"It's not necessary to fill the key field in most cases, since\nhash_search has already done that. Some existing call sites have an\nassert or comment that this contract has been fulfilled, but those\nare quite old and that practice seems unnecessary here.\n\nWhile at it, remove a nearby redundant assignment that a smart compiler\nwill elide anyway.\n\nZhao Junwang, with some adjustments by me\n\nReviewed by Nathan Bossart, with additional feedback from Tom Lane\n\nDiscussion: \u003ca href=\"http://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com\" rel=\"nofollow\"\u003ehttp://postgr.es/m/CAEG8a3%2BUPF%3DR2QGPgJMF2mKh8xPd1H2TmfH77zPuVUFdBpiGUA%40mail.gmail.com\u003c/a\u003e","authors":[{"login":"j-naylor","displayName":"John Naylor","avatarUrl":"https://avatars.githubusercontent.com/u/100744591?v=4","path":"/j-naylor","isGitHub":false}],"committerAttribution":false,"committer":{"login":"j-naylor","displayName":"John Naylor","avatarUrl":"https://avatars.githubusercontent.com/u/100744591?v=4","path":"/j-naylor","isGitHub":false},"parents":["489ca33081c8f590a314d4a09d9bee56a81f1a85"],"globalRelayId":"C_kwDOAA4m0toAKDA5NWQxMDljY2Q3NmNhNGM0NmM0ZWEyYmUzMGQ2M2Q3MDM2MWM1Zjk","sha1":"489ca33081c8f590a314d4a09d9bee56a81f1a85","sha2":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9"},"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":2573,"text":"@@ -2574,7 +2574,6 @@ createNewConnection(const char *name, remoteConn *rconn)","html":"@@ -2574,7 +2574,6 @@ createNewConnection(const char *name, remoteConn *rconn)","displayNoNewLineWarning":false,"position":0,"left":2573,"right":2573},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2574,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":1,"left":2574,"right":2574},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2575,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":2575,"right":2575},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2576,"text":" \thentry-\u003erconn = rconn;","html":" \t\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erconn\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erconn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":2576,"right":2576},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2577,"text":"-\tstrlcpy(hentry-\u003ename, name, sizeof(hentry-\u003ename));","html":"-\t\u003cspan class=pl-en\u003estrlcpy\u003c/span\u003e(\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ename\u003c/span\u003e, \u003cspan class=pl-s1\u003ename\u003c/span\u003e, \u003cspan class=pl-k\u003esizeof\u003c/span\u003e(\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ename\u003c/span\u003e));","displayNoNewLineWarning":false,"position":4,"left":2577,"right":2576},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2577,"text":" }","html":" }","displayNoNewLineWarning":false,"position":5,"left":2578,"right":2577},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2578,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":2579,"right":2578},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2579,"text":" static void","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":2580,"right":2579}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3088,"linesChanged":1,"newTreeEntry":{"lineCount":3088,"path":"contrib/dblink/dblink.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"contrib/dblink/dblink.c","mode":100644},"linesAdded":0,"linesDeleted":1,"path":"contrib/dblink/dblink.c","pathDigest":"54593f080c0fd65965d885e53613683ee447e95dcd5176d9121663a391fc42cf","status":"MODIFIED","truncatedReason":null,"oldOid":"489ca33081c8f590a314d4a09d9bee56a81f1a85","newOid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","copilotChatReference":null,"deletedSha":"489ca33081c8f590a314d4a09d9bee56a81f1a85","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":2304,"text":"@@ -2305,15 +2305,13 @@ AddEventToPendingNotifies(Notification *n)","html":"@@ -2305,15 +2305,13 @@ AddEventToPendingNotifies(Notification *n)","displayNoNewLineWarning":false,"position":0,"left":2304,"right":2304},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2305,"text":" \t\tforeach(l, pendingNotifies-\u003eevents)","html":" \t\t\u003cspan class=pl-en\u003eforeach\u003c/span\u003e(\u003cspan class=pl-s1\u003el\u003c/span\u003e, \u003cspan class=pl-s1\u003ependingNotifies\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eevents\u003c/span\u003e)","displayNoNewLineWarning":false,"position":1,"left":2305,"right":2305},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2306,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":2,"left":2306,"right":2306},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2307,"text":" \t\t\tNotification *oldn = (Notification *) lfirst(l);","html":" \t\t\t\u003cspan class=pl-smi\u003eNotification\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eoldn\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e (\u003cspan class=pl-smi\u003eNotification\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-en\u003elfirst\u003c/span\u003e(\u003cspan class=pl-s1\u003el\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":2307,"right":2307},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2308,"text":"-\t\t\tNotificationHash *hentry;","html":"-\t\t\t\u003cspan class=pl-smi\u003eNotificationHash\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":2308,"right":2307},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2308,"text":" \t\t\tbool\t\tfound;","html":" \t\t\t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003efound\u003c/span\u003e;","displayNoNewLineWarning":false,"position":5,"left":2309,"right":2308},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2309,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":2310,"right":2309},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2311,"text":"-\t\t\thentry = (NotificationHash *) hash_search(pendingNotifies-\u003ehashtab,","html":"-\t\t\t\u003cspan class=\"pl-s1 x x-first\"\u003ehentry\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e=\u003c/span\u003e\u003cspan class=\"x\"\u003e (\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eNotificationHash\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e*\u003c/span\u003e) \u003cspan class=\"pl-en\"\u003ehash_search\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ependingNotifies\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ehashtab\u003c/span\u003e,","displayNoNewLineWarning":false,"position":7,"left":2311,"right":2309},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2312,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t\t \u0026oldn,","html":"-\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoldn\u003c/span\u003e,","displayNoNewLineWarning":false,"position":8,"left":2312,"right":2309},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2313,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t\t HASH_ENTER,","html":"-\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eHASH_ENTER\u003c/span\u003e,","displayNoNewLineWarning":false,"position":9,"left":2313,"right":2309},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2314,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t\t \u0026found);","html":"-\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":2314,"right":2309},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2310,"text":"+\t\t\t(void) hash_search(pendingNotifies-\u003ehashtab,","html":"+\t\t\t\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x x-last\"\u003evoid\u003c/span\u003e) \u003cspan class=\"pl-en\"\u003ehash_search\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ependingNotifies\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ehashtab\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":2314,"right":2310},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2311,"text":"+\t\t\t\t\t\t\t \u0026oldn,","html":"+\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003eoldn\u003c/span\u003e,","displayNoNewLineWarning":false,"position":12,"left":2314,"right":2311},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2312,"text":"+\t\t\t\t\t\t\t HASH_ENTER,","html":"+\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eHASH_ENTER\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":2314,"right":2312},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2313,"text":"+\t\t\t\t\t\t\t \u0026found);","html":"+\t\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":2314,"right":2313},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2314,"text":" \t\t\tAssert(!found);","html":" \t\t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(!\u003cspan class=pl-s1\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":15,"left":2315,"right":2314},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2316,"text":"-\t\t\thentry-\u003eevent = oldn;","html":"-\t\t\t\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eevent\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eoldn\u003c/span\u003e;","displayNoNewLineWarning":false,"position":16,"left":2316,"right":2314},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2315,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":17,"left":2317,"right":2315},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2316,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":18,"left":2318,"right":2316},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2317,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":19,"left":2319,"right":2317},{"stylingDirective":null,"type":"HUNK","blobLineNumber":2320,"text":"@@ -2323,15 +2321,13 @@ AddEventToPendingNotifies(Notification *n)","html":"@@ -2323,15 +2321,13 @@ AddEventToPendingNotifies(Notification *n)","displayNoNewLineWarning":false,"position":20,"left":2322,"right":2320},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2321,"text":" \t/* Add event to the hash table if needed */","html":" \t\u003cspan class=pl-c\u003e/* Add event to the hash table if needed */\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":2323,"right":2321},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2322,"text":" \tif (pendingNotifies-\u003ehashtab != NULL)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003ependingNotifies\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ehashtab\u003c/span\u003e \u003cspan class=pl-c1\u003e!=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e)","displayNoNewLineWarning":false,"position":22,"left":2324,"right":2322},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2323,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":23,"left":2325,"right":2323},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2326,"text":"-\t\tNotificationHash *hentry;","html":"-\t\t\u003cspan class=pl-smi\u003eNotificationHash\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e;","displayNoNewLineWarning":false,"position":24,"left":2326,"right":2323},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2324,"text":" \t\tbool\t\tfound;","html":" \t\t\u003cspan class=pl-smi\u003ebool\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003efound\u003c/span\u003e;","displayNoNewLineWarning":false,"position":25,"left":2327,"right":2324},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2325,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":26,"left":2328,"right":2325},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2329,"text":"-\t\thentry = (NotificationHash *) hash_search(pendingNotifies-\u003ehashtab,","html":"-\t\t\u003cspan class=\"pl-s1 x x-first\"\u003ehentry\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e=\u003c/span\u003e\u003cspan class=\"x\"\u003e (\u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003eNotificationHash\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003e*\u003c/span\u003e) \u003cspan class=\"pl-en\"\u003ehash_search\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ependingNotifies\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ehashtab\u003c/span\u003e,","displayNoNewLineWarning":false,"position":27,"left":2329,"right":2325},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2330,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t \u0026n,","html":"-\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003en\u003c/span\u003e,","displayNoNewLineWarning":false,"position":28,"left":2330,"right":2325},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2331,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t HASH_ENTER,","html":"-\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eHASH_ENTER\u003c/span\u003e,","displayNoNewLineWarning":false,"position":29,"left":2331,"right":2325},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2332,"text":"-\t\t\t\t\t\t\t\t\t\t\t\t \u0026found);","html":"-\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e\t\t\t\t\t\t\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":30,"left":2332,"right":2325},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2326,"text":"+\t\t(void) hash_search(pendingNotifies-\u003ehashtab,","html":"+\t\t\u003cspan class=\"x x-first\"\u003e(\u003c/span\u003e\u003cspan class=\"pl-smi x x-last\"\u003evoid\u003c/span\u003e) \u003cspan class=\"pl-en\"\u003ehash_search\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ependingNotifies\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003ehashtab\u003c/span\u003e,","displayNoNewLineWarning":false,"position":31,"left":2332,"right":2326},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2327,"text":"+\t\t\t\t\t\t \u0026n,","html":"+\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003en\u003c/span\u003e,","displayNoNewLineWarning":false,"position":32,"left":2332,"right":2327},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2328,"text":"+\t\t\t\t\t\t HASH_ENTER,","html":"+\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eHASH_ENTER\u003c/span\u003e,","displayNoNewLineWarning":false,"position":33,"left":2332,"right":2328},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":2329,"text":"+\t\t\t\t\t\t \u0026found);","html":"+\t\t\t\t\t\t\u003cspan class=\"x x-first x-last\"\u003e \u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u003c/span\u003e\u003cspan class=\"pl-s1\"\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":34,"left":2332,"right":2329},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2330,"text":" \t\tAssert(!found);","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(!\u003cspan class=pl-s1\u003efound\u003c/span\u003e);","displayNoNewLineWarning":false,"position":35,"left":2333,"right":2330},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2334,"text":"-\t\thentry-\u003eevent = n;","html":"-\t\t\u003cspan class=pl-s1\u003ehentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eevent\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003en\u003c/span\u003e;","displayNoNewLineWarning":false,"position":36,"left":2334,"right":2330},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2331,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":37,"left":2335,"right":2331},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2332,"text":" }","html":" }","displayNoNewLineWarning":false,"position":38,"left":2336,"right":2332},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2333,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":39,"left":2337,"right":2333}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":2380,"linesChanged":20,"newTreeEntry":{"lineCount":2380,"path":"src/backend/commands/async.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/async.c","mode":100644},"linesAdded":8,"linesDeleted":12,"path":"src/backend/commands/async.c","pathDigest":"f488b052d761d1cb3569dca01e9ad795a6804d67ccb05a647e1a7b4b4dca1429","status":"MODIFIED","truncatedReason":null,"oldOid":"489ca33081c8f590a314d4a09d9bee56a81f1a85","newOid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","copilotChatReference":null,"deletedSha":"489ca33081c8f590a314d4a09d9bee56a81f1a85","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":2103,"text":"@@ -2104,10 +2104,7 @@ ExecuteTruncateGuts(List *explicit_rels,","html":"@@ -2104,10 +2104,7 @@ ExecuteTruncateGuts(List *explicit_rels,","displayNoNewLineWarning":false,"position":0,"left":2103,"right":2103},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2104,"text":" \t\t\t/* Find or create cached entry for the foreign table */","html":" \t\t\t/* Find or create cached entry for the foreign table */","displayNoNewLineWarning":false,"position":1,"left":2104,"right":2104},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2105,"text":" \t\t\tft_info = hash_search(ft_htab, \u0026serverid, HASH_ENTER, \u0026found);","html":" \t\t\tft_info = hash_search(ft_htab, \u0026amp;serverid, HASH_ENTER, \u0026amp;found);","displayNoNewLineWarning":false,"position":2,"left":2105,"right":2105},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2106,"text":" \t\t\tif (!found)","html":" \t\t\tif (!found)","displayNoNewLineWarning":false,"position":3,"left":2106,"right":2106},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2107,"text":"-\t\t\t{","html":"-\t\t\t{","displayNoNewLineWarning":false,"position":4,"left":2107,"right":2106},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2108,"text":"-\t\t\t\tft_info-\u003eserverid = serverid;","html":"-\t\t\t\tft_info-\u0026gt;serverid = serverid;","displayNoNewLineWarning":false,"position":5,"left":2108,"right":2106},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2107,"text":" \t\t\t\tft_info-\u003erels = NIL;","html":" \t\t\t\tft_info-\u0026gt;rels = NIL;","displayNoNewLineWarning":false,"position":6,"left":2109,"right":2107},{"stylingDirective":null,"type":"DELETION","blobLineNumber":2110,"text":"-\t\t\t}","html":"-\t\t\t}","displayNoNewLineWarning":false,"position":7,"left":2110,"right":2107},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2108,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":2111,"right":2108},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2109,"text":" \t\t\t/*","html":" \t\t\t/*","displayNoNewLineWarning":false,"position":9,"left":2112,"right":2109},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":2110,"text":" \t\t\t * Save the foreign table in the entry of the server that the","html":" \t\t\t * Save the foreign table in the entry of the server that the","displayNoNewLineWarning":false,"position":10,"left":2113,"right":2110}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":20243,"linesChanged":3,"newTreeEntry":{"lineCount":20243,"path":"src/backend/commands/tablecmds.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/tablecmds.c","mode":100644},"linesAdded":0,"linesDeleted":3,"path":"src/backend/commands/tablecmds.c","pathDigest":"d373fb790605aded212c2e3a0fbe8c015d110077ff46c07d0a6d6647a2d7e928","status":"MODIFIED","truncatedReason":null,"oldOid":"489ca33081c8f590a314d4a09d9bee56a81f1a85","newOid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","copilotChatReference":null,"deletedSha":"489ca33081c8f590a314d4a09d9bee56a81f1a85","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":508,"text":"@@ -509,7 +509,6 @@ pa_allocate_worker(TransactionId xid)","html":"@@ -509,7 +509,6 @@ pa_allocate_worker(TransactionId xid)","displayNoNewLineWarning":false,"position":0,"left":508,"right":508},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":509,"text":" \twinfo-\u003ein_use = true;","html":" \t\u003cspan class=pl-s1\u003ewinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ein_use\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e true;","displayNoNewLineWarning":false,"position":1,"left":509,"right":509},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":510,"text":" \twinfo-\u003eserialize_changes = false;","html":" \t\u003cspan class=pl-s1\u003ewinfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eserialize_changes\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e false;","displayNoNewLineWarning":false,"position":2,"left":510,"right":510},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":511,"text":" \tentry-\u003ewinfo = winfo;","html":" \t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003ewinfo\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003ewinfo\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":511,"right":511},{"stylingDirective":null,"type":"DELETION","blobLineNumber":512,"text":"-\tentry-\u003exid = xid;","html":"-\t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003exid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003exid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":512,"right":511},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":512,"text":" }","html":" }","displayNoNewLineWarning":false,"position":5,"left":513,"right":512},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":513,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":514,"right":513},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":514,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":7,"left":515,"right":514}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1639,"linesChanged":1,"newTreeEntry":{"lineCount":1639,"path":"src/backend/replication/logical/applyparallelworker.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/replication/logical/applyparallelworker.c","mode":100644},"linesAdded":0,"linesDeleted":1,"path":"src/backend/replication/logical/applyparallelworker.c","pathDigest":"ed7922c1f0464f68a77982ecf26a148b573756b87fe1439a3d05af2d63f794c2","status":"MODIFIED","truncatedReason":null,"oldOid":"489ca33081c8f590a314d4a09d9bee56a81f1a85","newOid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","copilotChatReference":null,"deletedSha":"489ca33081c8f590a314d4a09d9bee56a81f1a85","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":656,"text":"@@ -657,7 +657,6 @@ logicalrep_partition_open(LogicalRepRelMapEntry *root,","html":"@@ -657,7 +657,6 @@ logicalrep_partition_open(LogicalRepRelMapEntry *root,","displayNoNewLineWarning":false,"position":0,"left":656,"right":656},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":657,"text":" \t\tint\t\t\ti;","html":" \t\t\u003cspan class=pl-smi\u003eint\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003ei\u003c/span\u003e;","displayNoNewLineWarning":false,"position":1,"left":657,"right":657},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":658,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":2,"left":658,"right":658},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":659,"text":" \t\t/* Remote relation is copied as-is from the root entry. */","html":" \t\t\u003cspan class=pl-c\u003e/* Remote relation is copied as-is from the root entry. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":659,"right":659},{"stylingDirective":null,"type":"DELETION","blobLineNumber":660,"text":"-\t\tentry = \u0026part_entry-\u003erelmapentry;","html":"-\t\t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003epart_entry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelmapentry\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":660,"right":659},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":660,"text":" \t\tentry-\u003eremoterel.remoteid = remoterel-\u003eremoteid;","html":" \t\t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eremoterel\u003c/span\u003e.\u003cspan class=pl-c1\u003eremoteid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eremoterel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eremoteid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":5,"left":661,"right":660},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":661,"text":" \t\tentry-\u003eremoterel.nspname = pstrdup(remoterel-\u003enspname);","html":" \t\t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eremoterel\u003c/span\u003e.\u003cspan class=pl-c1\u003enspname\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epstrdup\u003c/span\u003e(\u003cspan class=pl-s1\u003eremoterel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enspname\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":662,"right":661},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":662,"text":" \t\tentry-\u003eremoterel.relname = pstrdup(remoterel-\u003erelname);","html":" \t\t\u003cspan class=pl-s1\u003eentry\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eremoterel\u003c/span\u003e.\u003cspan class=pl-c1\u003erelname\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003epstrdup\u003c/span\u003e(\u003cspan class=pl-s1\u003eremoterel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelname\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":663,"right":662}],"diffNumber":4,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":911,"linesChanged":1,"newTreeEntry":{"lineCount":911,"path":"src/backend/replication/logical/relation.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/replication/logical/relation.c","mode":100644},"linesAdded":0,"linesDeleted":1,"path":"src/backend/replication/logical/relation.c","pathDigest":"21e9553e47ee5794740a21def5eca246d45cf8f35680a4a1aa54f3f65cd208b0","status":"MODIFIED","truncatedReason":null,"oldOid":"489ca33081c8f590a314d4a09d9bee56a81f1a85","newOid":"095d109ccd76ca4c46c4ea2be30d63d70361c5f9","copilotChatReference":null,"deletedSha":"489ca33081c8f590a314d4a09d9bee56a81f1a85","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/095d109ccd76ca4c46c4ea2be30d63d70361c5f9","fileTreeExpanded":true,"headerInfo":{"additions":8,"deletions":18,"filesChanged":5,"filesChangedString":"5"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":5,"truncated":false,"byteCount":2086,"lineShownCount":75},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"rqvinwcrgPC2-_GHL5gTQgxwt6Gs1zgzO--3cP08_tT6eS4r0Ik8xr9QPviSSft0_LZYqo-R8EHbio6NbsK0Ow"},"/users/diffview?diff=unified":{"post":"0RJUeX283FN74uhW_Xzp3r5OsMQpRvHJm6BtQQA73ESFwJjNqh5gZXJJJylArQHoTohfzwoAObt7xVS8k8WWqw"},"/notifications/thread":{"post":"Wf1AQVQEOaFAovsEyOmPSIQtoHiaos
8000
HFReec1qOBcKcH0_vCeoGHvTwbSj1IgwKwLLoUSr5gLOcp72ItyT5tBA"}}},"title":"Remove redundant setting of hashkey after insertion · postgres/postgres@095d109","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}}}
File tree Expand file tree Collapse file tree 5 files changed +8
-18
lines changed Expand file tree Collapse file tree 5 files changed +8
-18
lines changed Original file line number Diff line number Diff line change @@ -2574,7 +2574,6 @@ createNewConnection(const char *name, remoteConn *rconn)
2574
2574
}
2575
2575
2576
2576
hentry -> rconn = rconn ;
2577
- strlcpy (hentry -> name , name , sizeof (hentry -> name ));
2578
2577
}
2579
2578
2580
2579
static void
Original file line number Diff line number Diff line change @@ -2305,15 +2305,13 @@ AddEventToPendingNotifies(Notification *n)
2305
2305
foreach (l , pendingNotifies -> events )
2306
2306
{
2307
2307
Notification * oldn = (Notification * ) lfirst (l );
2308
- NotificationHash * hentry ;
2309
2308
bool found ;
2310
2309
2311
- hentry = ( NotificationHash * ) hash_search (pendingNotifies -> hashtab ,
2312
- & oldn ,
2313
- HASH_ENTER ,
2314
- & found );
2310
+ ( void ) hash_search (pendingNotifies -> hashtab ,
2311
+ & oldn ,
2312
+ HASH_ENTER ,
2313
+ & found );
2315
2314
Assert (!found );
2316
- hentry -> event = oldn ;
2317
2315
}
2318
2316
}
2319
2317
@@ -2323,15 +2321,13 @@ AddEventToPendingNotifies(Notification *n)
2323
2321
/* Add event to the hash table if needed */
2324
2322
if (pendingNotifies -> hashtab != NULL )
2325
2323
{
2326
- NotificationHash * hentry ;
2327
2324
bool found ;
2328
2325
2329
- hentry = ( NotificationHash * ) hash_search (pendingNotifies -> hashtab ,
2330
- & n ,
2331
- HASH_ENTER ,
2332
- & found );
2326
+ ( void ) hash_search (pendingNotifies -> hashtab ,
2327
+ & n ,
2328
+ HASH_ENTER ,
2329
+ & found );
2333
2330
Assert (!found );
2334
- hentry -> event = n ;
2335
2331
}
2336
2332
}
2337
2333
Original file line number Diff line number Diff line change @@ -2104,10 +2104,7 @@ ExecuteTruncateGuts(List *explicit_rels,
2104
2104
/* Find or create cached entry for the foreign table */
2105
2105
ft_info = hash_search(ft_htab, &serverid, HASH_ENTER, &found);
2106
2106
if (!found)
2107
- {
2108
- ft_info->serverid = serverid;
2109
2107
ft_info->rels = NIL;
2110
- }
2111
2108
2112
2109
/*
2113
2110
* Save the foreign table in the entry of the server that the
Original file line number Diff line number Diff line change @@ -509,7 +509,6 @@ pa_allocate_worker(TransactionId xid)
509
509
winfo -> in_use = true;
510
510
winfo -> serialize_changes = false;
511
511
entry -> winfo = winfo ;
512
- entry -> xid = xid ;
513
512
}
514
513
515
514
/*
Original file line number Diff line number Diff line change @@ -657,7 +657,6 @@ logicalrep_partition_open(LogicalRepRelMapEntry *root,
657
657
int i ;
658
658
659
659
/* Remote relation is copied as-is from the root entry. */
660
- entry = & part_entry -> relmapentry ;
661
660
entry -> remoterel .remoteid = remoterel -> remoteid ;
662
661
entry -> remoterel .nspname = pstrdup (remoterel -> nspname );
663
662
entry -> remoterel .relname = pstrdup (remoterel -> relname );
You can’t perform that action at this time.
0 commit comments