8000 Get rid of SET LOGGED indexes persistence kludge · postgres/postgres@85b506b · GitHub
[go: up one dir, main page]

Skip to content
{"payload":{"commit":{"oid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","url":"/postgres/postgres/commit/85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","authoredDate":"2014-11-15T01:19:49.000-03:00","committedDate":"2014-11-15T01:19:49.000-03:00","shortMessage":null,"shortMessageMarkdown":"\u003cdiv\u003eGet rid of SET LOGGED indexes persistence kludge\u003c/div\u003e","shortMessageMarkdownLink":null,"bodyMessageHtml":"This removes ATChangeIndexesPersistence() introduced by \u003ca class=\"commit-link\" data-hovercard-type=\"commit\" data-hovercard-url=\"https://github.com/postgres/postgres/commit/f41872d0c1239d36ab03393c39ec0b70e9ee2a3c/hovercard\" href=\"https://github.com/postgres/postgres/commit/f41872d0c1239d36ab03393c39ec0b70e9ee2a3c\"\u003e\u003ctt\u003ef41872d\u003c/tt\u003e\u003c/a\u003e\nwhich was too ugly to live for long. Instead, the correct persistence\nmarking is passed all the way down to reindex_index, so that the\ntransient relation built to contain the index relfilenode can\nget marked correctly right from the start.\n\nAuthor: Fabrízio de Royes Mello\nReview and editorialization by Michael Paquier\n and Álvaro Herrera","authors":[{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false}],"committerAttribution":false,"committer":{"login":"alvherre","displayName":"Alvaro Herrera","avatarUrl":"https://avatars.githubusercontent.com/u/340005?v=4","path":"/alvherre","isGitHub":false},"parents":["e4d1e264918f4019c86c807e7c349658f7a10397"],"globalRelayId":"MDY6Q29tbWl0OTI3NDQyOjg1YjUwNmJiZmMyOTM3YzlhYmRmY2NlNGUwMWE4ZmVjYThlNjRlZTg=","sha1":"e4d1e264918f4019c86c807e7c349658f7a10397","sha2":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8"},"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":1979,"text":"@@ -1980,7 +1980,7 @@ index_build(Relation heapRelation,","html":"@@ -1980,7 +1980,7 @@ index_build(Relation heapRelation,","displayNoNewLineWarning":false,"position":0,"left":1979,"right":1979},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1980,"text":" \t * created it, or truncated twice in a subsequent transaction, the","html":" \u003cspan class=pl-c\u003e\t * created it, or truncated twice in a subsequent transaction, the\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":1980,"right":1980},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1981,"text":" \t * relfilenode won't change, and nothing needs to be done here.","html":" \u003cspan class=pl-c\u003e\t * relfilenode won\u0026#39;t change, and nothing needs to be done here.\u003c/span\u003e","displayNoNewLineWarning":false,"position":2,"left":1981,"right":1981},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1982,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":3,"left":1982,"right":1982},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1983,"text":"-\tif (heapRelation-\u003erd_rel-\u003erelpersistence == RELPERSISTENCE_UNLOGGED \u0026\u0026","html":"-\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1 x x-first x-last\"\u003eheapRelation\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003erd_rel\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003erelpersistence\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eRELPERSISTENCE_UNLOGGED\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":4,"left":1983,"right":1982},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1983,"text":"+\tif (indexRelation-\u003erd_rel-\u003erelpersistence == RELPERSISTENCE_UNLOGGED \u0026\u0026","html":"+\t\u003cspan class=\"pl-k\"\u003eif\u003c/span\u003e (\u003cspan class=\"pl-s1 x x-first x-last\"\u003eindexRelation\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003erd_rel\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1\"\u003erelpersistence\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e==\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003eRELPERSISTENCE_UNLOGGED\u003c/span\u003e \u003cspan class=\"pl-c1\"\u003e\u0026amp;\u0026amp;\u003c/span\u003e","displayNoNewLineWarning":false,"position":5,"left":1983,"right":1983},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1984,"text":" \t\t!smgrexists(indexRelation-\u003erd_smgr, INIT_FORKNUM))","html":" \t\t!\u003cspan class=pl-en\u003esmgrexists\u003c/span\u003e(\u003cspan class=pl-s1\u003eindexRelation\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_smgr\u003c/span\u003e, \u003cspan class=pl-c1\u003eINIT_FORKNUM\u003c/span\u003e))","displayNoNewLineWarning":false,"position":6,"left":1984,"right":1984},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1985,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":7,"left":1985,"right":1985},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1986,"text":" \t\tRegProcedure ambuildempty = indexRelation-\u003erd_am-\u003eambuildempty;","html":" \t\t\u003cspan class=pl-smi\u003eRegProcedure\u003c/span\u003e \u003cspan class=pl-s1\u003eambuildempty\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eindexRelation\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_am\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eambuildempty\u003c/span\u003e;","displayNoNewLineWarning":false,"position":8,"left":1986,"right":1986},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3129,"text":"@@ -3130,7 +3130,7 @@ IndexGetRelation(Oid indexId, bool missing_ok)","html":"@@ -3130,7 +3130,7 @@ IndexGetRelation(Oid indexId, bool missing_ok)","displayNoNewLineWarning":false,"position":9,"left":3129,"right":3129},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3130,"text":" * reindex_index - This routine is used to recreate a single index","html":" \u003cspan class=pl-c\u003e * reindex_index - This routine is used to recreate a single index\u003c/span\u003e","displayNoNewLineWarning":false,"position":10,"left":3130,"right":3130},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3131,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":11,"left":3131,"right":3131},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3132,"text":" void","html":" \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":3132,"right":3132},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3133,"text":"-reindex_index(Oid indexId, bool skip_constraint_checks)","html":"-\u003cspan class=\"pl-en\"\u003ereindex_index\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eindexId\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eskip_constraint_checks\u003c/span\u003e)","displayNoNewLineWarning":false,"position":13,"left":3133,"right":3132},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3133,"text":"+reindex_index(Oid indexId, bool skip_constraint_checks, char persistence)","html":"+\u003cspan class=\"pl-en\"\u003ereindex_index\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eindexId\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003ebool\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eskip_constraint_checks\u003c/span\u003e\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003epersistence\u003c/span\u003e)","displayNoNewLineWarning":false,"position":14,"left":3133,"right":3133},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3134,"text":" {","html":" {","displayNoNewLineWarning":false,"position":15,"left":3134,"right":3134},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3135,"text":" \tRelation\tiRel,","html":" \t\u003cspan class=pl-smi\u003eRelation\u003c/span\u003e\t\u003cspan class=pl-s1\u003eiRel\u003c/span\u003e,","displayNoNewLineWarning":false,"position":16,"left":3135,"right":3135},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3136,"text":" \t\t\t\theapRelation;","html":" \t\t\t\t\u003cspan class=pl-s1\u003eheapRelation\u003c/span\u003e;","displayNoNewLineWarning":false,"position":17,"left":3136,"right":3136},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3190,"text":"@@ -3191,6 +3191,9 @@ reindex_index(Oid indexId, bool skip_constraint_checks)","html":"@@ -3191,6 +3191,9 @@ reindex_index(Oid indexId, bool skip_constraint_checks)","displayNoNewLineWarning":false,"position":18,"left":3190,"right":3190},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3191,"text":" \t\t\tindexInfo-\u003eii_ExclusionStrats = NULL;","html":" \t\t\t\u003cspan class=pl-s1\u003eindexInfo\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003eii_ExclusionStrats\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNULL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":19,"left":3191,"right":3191},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3192,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":20,"left":3192,"right":3192},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3193,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":21,"left":3193,"right":3193},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3194,"text":"+\t\t/* Set the relpersistence of the new index */","html":"+\t\t\u003cspan class=pl-c\u003e/* Set the relpersistence of the new index */\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":3193,"right":3194},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3195,"text":"+\t\tiRel-\u003erd_rel-\u003erelpersistence = persistence;","html":"+\t\t\u003cspan class=pl-s1\u003eiRel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_rel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003epersistence\u003c/span\u003e;","displayNoNewLineWarning":false,"position":23,"left":3193,"right":3195},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3196,"text":"+","html":"+","displayNoNewLineWarning":false,"position":24,"left":3193,"right":3196},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3197,"text":" \t\t/* We'll build a new physical relation for the index */","html":" \t\t\u003cspan class=pl-c\u003e/* We\u0026#39;ll build a new physical relation for the index */\u003c/span\u003e","displayNoNewLineWarning":false,"position":25,"left":3194,"right":3197},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3198,"text":" \t\tRelationSetNewRelfilenode(iRel, InvalidTransactionId,","html":" \t\t\u003cspan class=pl-en\u003eRelationSetNewRelfilenode\u003c/span\u003e(\u003cspan class=pl-s1\u003eiRel\u003c/span\u003e, \u003cspan class=pl-s1\u003eInvalidTransactionId\u003c/span\u003e,","displayNoNewLineWarning":false,"position":26,"left":3195,"right":3198},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3199,"text":" \t\t\t\t\t\t\t\t InvalidMultiXactId);","html":" \t\t\t\t\t\t\t\t \u003cspan class=pl-s1\u003eInvalidMultiXactId\u003c/span\u003e);","displayNoNewLineWarning":false,"position":27,"left":3196,"right":3199},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3312,"text":"@@ -3310,6 +3313,12 @@ reindex_index(Oid indexId, bool skip_constraint_checks)","html":"@@ -3310,6 +3313,12 @@ reindex_index(Oid indexId, bool skip_constraint_checks)","displayNoNewLineWarning":false,"position":28,"left":3309,"right":3312},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3313,"text":" * performance, other callers should include the flag only after transforming","html":" \u003cspan class=pl-c\u003e * performance, other callers should include the flag only after transforming\u003c/span\u003e","displayNoNewLineWarning":false,"position":29,"left":3310,"right":3313},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3314,"text":" * the data in a manner that risks a change in constraint validity.","html":" \u003cspan class=pl-c\u003e * the data in a manner that risks a change in constraint validity.\u003c/span\u003e","displayNoNewLineWarning":false,"position":30,"left":3311,"right":3314},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3315,"text":" *","html":" \u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":31,"left":3312,"right":3315},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3316,"text":"+ * REINDEX_REL_FORCE_INDEXES_UNLOGGED: if true, set the persistence of the","html":"+\u003cspan class=pl-c\u003e * REINDEX_REL_FORCE_INDEXES_UNLOGGED: if true, set the persistence of the\u003c/span\u003e","displayNoNewLineWarning":false,"position":32,"left":3312,"right":3316},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3317,"text":"+ * rebuilt indexes to unlogged.","html":"+\u003cspan class=pl-c\u003e * rebuilt indexes to unlogged.\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":3312,"right":3317},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3318,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":34,"left":3312,"right":3318},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3319,"text":"+ * REINDEX_REL_FORCE_INDEXES_LOGGED: if true, set the persistence of the","html":"+\u003cspan class=pl-c\u003e * REINDEX_REL_FORCE_INDEXES_LOGGED: if true, set the persistence of the\u003c/span\u003e","displayNoNewLineWarning":false,"position":35,"left":3312,"right":3319},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3320,"text":"+ * rebuilt indexes to permanent.","html":"+\u003cspan class=pl-c\u003e * rebuilt indexes to permanent.\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":3312,"right":3320},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3321,"text":"+ *","html":"+\u003cspan class=pl-c\u003e *\u003c/span\u003e","displayNoNewLineWarning":false,"position":37,"left":3312,"right":3321},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3322,"text":" * Returns true if any indexes were rebuilt (including toast table's index","html":" \u003cspan class=pl-c\u003e * Returns true if any indexes were rebuilt (including toast table\u0026#39;s index\u003c/span\u003e","displayNoNewLineWarning":false,"position":38,"left":3313,"right":3322},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3323,"text":" * when relevant). Note that a CommandCounterIncrement will occur after each","html":" \u003cspan class=pl-c\u003e * when relevant). Note that a CommandCounterIncrement will occur after each\u003c/span\u003e","displayNoNewLineWarning":false,"position":39,"left":3314,"right":3323},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3324,"text":" * index rebuild.","html":" \u003cspan class=pl-c\u003e * index rebuild.\u003c/span\u003e","displayNoNewLineWarning":false,"position":40,"left":3315,"right":3324},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3379,"text":"@@ -3371,6 +3380,7 @@ reindex_relation(Oid relid, int flags)","html":"@@ -3371,6 +3380,7 @@ reindex_relation(Oid relid, int flags)","displayNoNewLineWarning":false,"position":41,"left":3370,"right":3379},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3380,"text":" \t{","html":" \t{","displayNoNewLineWarning":false,"position":42,"left":3371,"right":3380},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3381,"text":" \t\tList\t *doneIndexes;","html":" \t\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003edoneIndexes\u003c/span\u003e;","displayNoNewLineWarning":false,"position":43,"left":3372,"right":3381},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3382,"text":" \t\tListCell *indexId;","html":" \t\t\u003cspan class=pl-smi\u003eListCell\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eindexId\u003c/span\u003e;","displayNoNewLineWarning":false,"position":44,"left":3373,"right":3382},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3383,"text":"+\t\tchar\t\tpersistence;","html":"+\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e\t\t\u003cspan class=pl-s1\u003epersistence\u003c/span\u003e;","displayNoNewLineWarning":false,"position":45,"left":3373,"right":3383},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3384,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":46,"left":3374,"right":3384},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3385,"text":" \t\tif (flags \u0026 REINDEX_REL_SUPPRESS_INDEX_USE)","html":" \t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eflags\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_SUPPRESS_INDEX_USE\u003c/span\u003e)","displayNoNewLineWarning":false,"position":47,"left":3375,"right":3385},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3386,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":48,"left":3376,"right":3386},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3393,"text":"@@ -3384,6 +3394,17 @@ reindex_relation(Oid relid, int flags)","html":"@@ -3384,6 +3394,17 @@ reindex_relation(Oid relid, int flags)","displayNoNewLineWarning":false,"position":49,"left":3383,"right":3393},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3394,"text":" \t\t\tCommandCounterIncrement();","html":" \t\t\t\u003cspan class=pl-en\u003eCommandCounterIncrement\u003c/span\u003e();","displayNoNewLineWarning":false,"position":50,"left":3384,"right":3394},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3395,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":51,"left":3385,"right":3395},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3396,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":52,"left":3386,"right":3396},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3397,"text":"+\t\t/*","html":"+\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":53,"left":3386,"right":3397},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3398,"text":"+\t\t * Compute persistence of indexes: same as that of owning rel, unless","html":"+\u003cspan class=pl-c\u003e\t\t * Compute persistence of indexes: same as that of owning rel, unless\u003c/span\u003e","displayNoNewLineWarning":false,"position":54,"left":3386,"right":3398},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3399,"text":"+\t\t * caller specified otherwise.","html":"+\u003cspan class=pl-c\u003e\t\t * caller specified otherwise.\u003c/span\u003e","displayNoNewLineWarning":false,"position":55,"left":3386,"right":3399},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3400,"text":"+\t\t */","html":"+\u003cspan class=pl-c\u003e\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":56,"left":3386,"right":3400},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3401,"text":"+\t\tif (flags \u0026 REINDEX_REL_FORCE_INDEXES_UNLOGGED)","html":"+\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eflags\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_UNLOGGED\u003c/span\u003e)","displayNoNewLineWarning":false,"position":57,"left":3386,"right":3401},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3402,"text":"+\t\t\tpersistence = RELPERSISTENCE_UNLOGGED;","html":"+\t\t\t\u003cspan class=pl-s1\u003epersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eRELPERSISTENCE_UNLOGGED\u003c/span\u003e;","displayNoNewLineWarning":false,"position":58,"left":3386,"right":3402},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3403,"text":"+\t\telse if (flags \u0026 REINDEX_REL_FORCE_INDEXES_PERMANENT)","html":"+\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eflags\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_PERMANENT\u003c/span\u003e)","displayNoNewLineWarning":false,"position":59,"left":3386,"right":3403},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3404,"text":"+\t\t\tpersistence = RELPERSISTENCE_PERMANENT;","html":"+\t\t\t\u003cspan class=pl-s1\u003epersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eRELPERSISTENCE_PERMANENT\u003c/span\u003e;","displayNoNewLineWarning":false,"position":60,"left":3386,"right":3404},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3405,"text":"+\t\telse","html":"+\t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":61,"left":3386,"right":3405},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3406,"text":"+\t\t\tpersistence = rel-\u003erd_rel-\u003erelpersistence;","html":"+\t\t\t\u003cspan class=pl-s1\u003epersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_rel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e;","displayNoNewLineWarning":false,"position":62,"left":3386,"right":3406},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3407,"text":"+","html":"+","displayNoNewLineWarning":false,"position":63,"left":3386,"right":3407},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3408,"text":" \t\t/* Reindex all the indexes. */","html":" \t\t\u003cspan class=pl-c\u003e/* Reindex all the indexes. */\u003c/span\u003e","displayNoNewLineWarning":false,"position":64,"left":3387,"right":3408},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3409,"text":" \t\tdoneIndexes = NIL;","html":" \t\t\u003cspan class=pl-s1\u003edoneIndexes\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eNIL\u003c/span\u003e;","displayNoNewLineWarning":false,"position":65,"left":3388,"right":3409},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3410,"text":" \t\tforeach(indexId, indexIds)","html":" \t\t\u003cspan class=pl-en\u003eforeach\u003c/span\u003e(\u003cspan class=pl-s1\u003eindexId\u003c/span\u003e, \u003cspan class=pl-s1\u003eindexIds\u003c/span\u003e)","displayNoNewLineWarning":false,"position":66,"left":3389,"right":3410},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3413,"text":"@@ -3393,7 +3414,8 @@ reindex_relation(Oid relid, int flags)","html":"@@ -3393,7 +3414,8 @@ reindex_relation(Oid relid, int flags)","displayNoNewLineWarning":false,"position":67,"left":3392,"right":3413},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3414,"text":" \t\t\tif (is_pg_class)","html":" \t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003eis_pg_class\u003c/span\u003e)","displayNoNewLineWarning":false,"position":68,"left":3393,"right":3414},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3415,"text":" \t\t\t\tRelationSetIndexList(rel, doneIndexes, InvalidOid);","html":" \t\t\t\t\u003cspan class=pl-en\u003eRelationSetIndexList\u003c/span\u003e(\u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-s1\u003edoneIndexes\u003c/span\u003e, \u003cspan class=pl-s1\u003eInvalidOid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":69,"left":3394,"right":3415},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3416,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":70,"left":3395,"right":3416},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3396,"text":"-\t\t\treindex_index(indexOid, !(flags \u0026 REINDEX_REL_CHECK_CONSTRAINTS));","html":"-\t\t\t\u003cspan class=pl-en\u003ereindex_index\u003c/span\u003e(\u003cspan class=pl-s1\u003eindexOid\u003c/span\u003e, !(\u003cspan class=pl-s1\u003eflags\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_CHECK_CONSTRAINTS\u003c/span\u003e));","displayNoNewLineWarning":false,"position":71,"left":3396,"right":3416},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3417,"text":"+\t\t\treindex_index(indexOid, !(flags \u0026 REINDEX_REL_CHECK_CONSTRAINTS),","html":"+\t\t\t\u003cspan class=pl-en\u003ereindex_index\u003c/span\u003e(\u003cspan class=pl-s1\u003eindexOid\u003c/span\u003e, !(\u003cspan class=pl-s1\u003eflags\u003c/span\u003e \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_CHECK_CONSTRAINTS\u003c/span\u003e),","displayNoNewLineWarning":false,"position":72,"left":3396,"right":3417},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3418,"text":"+\t\t\t\t\t\t persistence);","html":"+\t\t\t\t\t\t \u003cspan class=pl-s1\u003epersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":73,"left":3396,"right":3418},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3419,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":74,"left":3397,"right":3419},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3420,"text":" \t\t\tCommandCounterIncrement();","html":" \t\t\t\u003cspan class=pl-en\u003eCommandCounterIncrement\u003c/span\u003e();","displayNoNewLineWarning":false,"position":75,"left":3398,"right":3420},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3421,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":76,"left":3399,"right":3421}],"diffNumber":0,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":3570,"linesChanged":28,"newTreeEntry":{"lineCount":3570,"path":"src/backend/catalog/index.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/catalog/index.c","mode":100644},"linesAdded":25,"linesDeleted":3,"path":"src/backend/catalog/index.c","pathDigest":"586c72d2cf381d9ba233e5324edeccfa0debb512306bd7dfcfafbd9f0d67ac08","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":588,"text":"@@ -589,7 +589,8 @@ rebuild_relation(Relation OldHeap, Oid indexOid, bool verbose)","html":"@@ -589,7 +589,8 @@ rebuild_relation(Relation OldHeap, Oid indexOid, bool verbose)","displayNoNewLineWarning":false,"position":0,"left":588,"right":588},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":589,"text":" \t */","html":" \u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":1,"left":589,"right":589},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":590,"text":" \tfinish_heap_swap(tableOid, OIDNewHeap, is_system_catalog,","html":" \t\u003cspan class=pl-en\u003efinish_heap_swap\u003c/span\u003e(\u003cspan class=pl-s1\u003etableOid\u003c/span\u003e, \u003cspan class=pl-s1\u003eOIDNewHeap\u003c/span\u003e, \u003cspan class=pl-s1\u003eis_system_catalog\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":590,"right":590},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":591,"text":" \t\t\t\t\t swap_toast_by_content, false, true,","html":" \t\t\t\t\t \u003cspan class=pl-s1\u003eswap_toast_by_content\u003c/span\u003e, false, true,","displayNoNewLineWarning":false,"position":3,"left":591,"right":591},{"stylingDirective":null,"type":"DELETION","blobLineNumber":592,"text":"-\t\t\t\t\t frozenXid, cutoffMulti);","html":"-\t\t\t\t\t \u003cspan class=pl-s1\u003efrozenXid\u003c/span\u003e, \u003cspan class=pl-s1\u003ecutoffMulti\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":592,"right":591},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":592,"text":"+\t\t\t\t\t frozenXid, cutoffMulti,","html":"+\t\t\t\t\t \u003cspan class=pl-s1\u003efrozenXid\u003c/span\u003e, \u003cspan class=pl-s1\u003ecutoffMulti\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":592,"right":592},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":593,"text":"+\t\t\t\t\t OldHeap-\u003erd_rel-\u003erelpersistence);","html":"+\t\t\t\t\t \u003cspan class=pl-s1\u003eOldHeap\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_rel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":592,"right":593},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":594,"text":" }","html":" }","displayNoNewLineWarning":false,"position":7,"left":593,"right":594},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":595,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":8,"left":594,"right":595},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":596,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":9,"left":595,"right":596},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1475,"text":"@@ -1475,7 +1476,8 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","html":"@@ -1475,7 +1476,8 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","displayNoNewLineWarning":false,"position":10,"left":1474,"right":1475},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1476,"text":" \t\t\t\t bool check_constraints,","html":" \t\t\t\t \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003echeck_constraints\u003c/span\u003e,","displayNoNewLineWarning":false,"position":11,"left":1475,"right":1476},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1477,"text":" \t\t\t\t bool is_internal,","html":" \t\t\t\t \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003eis_internal\u003c/span\u003e,","displayNoNewLineWarning":false,"position":12,"left":1476,"right":1477},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1478,"text":" \t\t\t\t TransactionId frozenXid,","html":" \t\t\t\t \u003cspan class=pl-smi\u003eTransactionId\u003c/span\u003e \u003cspan class=pl-s1\u003efrozenXid\u003c/span\u003e,","displayNoNewLineWarning":false,"position":13,"left":1477,"right":1478},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1478,"text":"-\t\t\t\t MultiXactId cutoffMulti)","html":"-\t\t\t\t \u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003ecutoffMulti\u003c/span\u003e)","displayNoNewLineWarning":false,"position":14,"left":1478,"right":1478},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1479,"text":"+\t\t\t\t MultiXactId cutoffMulti,","html":"+\t\t\t\t \u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003ecutoffMulti\u003c/span\u003e,","displayNoNewLineWarning":false,"position":15,"left":1478,"right":1479},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1480,"text":"+\t\t\t\t char newrelpersistence)","html":"+\t\t\t\t \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003enewrelpersistence\u003c/span\u003e)","displayNoNewLineWarning":false,"position":16,"left":1478,"right":1480},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1481,"text":" {","html":" {","displayNoNewLineWarning":false,"position":17,"left":1479,"right":1481},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1482,"text":" \tObjectAddress object;","html":" \t\u003cspan class=pl-smi\u003eObjectAddress\u003c/span\u003e \u003cspan class=pl-s1\u003eobject\u003c/span\u003e;","displayNoNewLineWarning":false,"position":18,"left":1480,"right":1482},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1483,"text":" \tOid\t\t\tmapped_tables[4];","html":" \t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003emapped_tables\u003c/span\u003e[\u003cspan class=pl-c1\u003e4\u003c/span\u003e];","displayNoNewLineWarning":false,"position":19,"left":1481,"right":1483},{"stylingDirective":null,"type":"HUNK","blobLineNumber":1520,"text":"@@ -1519,6 +1521,16 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","html":"@@ -1519,6 +1521,16 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","displayNoNewLineWarning":false,"position":20,"left":1518,"right":1520},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1521,"text":" \treindex_flags = REINDEX_REL_SUPPRESS_INDEX_USE;","html":" \t\u003cspan class=pl-s1\u003ereindex_flags\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_SUPPRESS_INDEX_USE\u003c/span\u003e;","displayNoNewLineWarning":false,"position":21,"left":1519,"right":1521},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1522,"text":" \tif (check_constraints)","html":" \t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003echeck_constraints\u003c/span\u003e)","displayNoNewLineWarning":false,"position":22,"left":1520,"right":1522},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1523,"text":" \t\treindex_flags |= REINDEX_REL_CHECK_CONSTRAINTS;","html":" \t\t\u003cspan class=pl-s1\u003ereindex_flags\u003c/span\u003e |= \u003cspan class=pl-c1\u003eREINDEX_REL_CHECK_CONSTRAINTS\u003c/span\u003e;","displayNoNewLineWarning":false,"position":23,"left":1521,"right":1523},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1524,"text":"+","html":"+","displayNoNewLineWarning":false,"position":24,"left":1521,"right":1524},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1525,"text":"+\t/*","html":"+\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":25,"left":1521,"right":1525},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1526,"text":"+\t * Ensure that the indexes have the same persistence as the parent","html":"+\u003cspan class=pl-c\u003e\t * Ensure that the indexes have the same persistence as the parent\u003c/span\u003e","displayNoNewLineWarning":false,"position":26,"left":1521,"right":1526},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1527,"text":"+\t * relation.","html":"+\u003cspan class=pl-c\u003e\t * relation.\u003c/span\u003e","displayNoNewLineWarning":false,"position":27,"left":1521,"right":1527},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1528,"text":"+\t */","html":"+\u003cspan class=pl-c\u003e\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":28,"left":1521,"right":1528},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1529,"text":"+\tif (newrelpersistence == RELPERSISTENCE_UNLOGGED)","html":"+\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003enewrelpersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eRELPERSISTENCE_UNLOGGED\u003c/span\u003e)","displayNoNewLineWarning":false,"position":29,"left":1521,"right":1529},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1530,"text":"+\t\treindex_flags |= REINDEX_REL_FORCE_INDEXES_UNLOGGED;","html":"+\t\t\u003cspan class=pl-s1\u003ereindex_flags\u003c/span\u003e |= \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_UNLOGGED\u003c/span\u003e;","displayNoNewLineWarning":false,"position":30,"left":1521,"right":1530},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1531,"text":"+\telse if (newrelpersistence == RELPERSISTENCE_PERMANENT)","html":"+\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e \u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003enewrelpersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-c1\u003eRELPERSISTENCE_PERMANENT\u003c/span\u003e)","displayNoNewLineWarning":false,"position":31,"left":1521,"right":1531},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1532,"text":"+\t\treindex_flags |= REINDEX_REL_FORCE_INDEXES_PERMANENT;","html":"+\t\t\u003cspan class=pl-s1\u003ereindex_flags\u003c/span\u003e |= \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_PERMANENT\u003c/span\u003e;","displayNoNewLineWarning":false,"position":32,"left":1521,"right":1532},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1533,"text":"+","html":"+","displayNoNewLineWarning":false,"position":33,"left":1521,"right":1533},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1534,"text":" \treindex_relation(OIDOldHeap, reindex_flags);","html":" \t\u003cspan class=pl-en\u003ereindex_relation\u003c/span\u003e(\u003cspan class=pl-s1\u003eOIDOldHeap\u003c/span\u003e, \u003cspan class=pl-s1\u003ereindex_flags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":34,"left":1522,"right":1534},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1535,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":35,"left":1523,"right":1535},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1536,"text":" \t/*","html":" \t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":36,"left":1524,"right":1536}],"diffNumber":1,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1736,"linesChanged":16,"newTreeEntry":{"lineCount":1736,"path":"src/backend/commands/cluster.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/cluster.c","mode":100644},"linesAdded":14,"linesDeleted":2,"path":"src/backend/commands/cluster.c","pathDigest":"580946961ee5f8a0a962862aecbc170a11480bef4b3290515f2b9fa3380ea77f","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":1688,"text":"@@ -1689,7 +1689,7 @@ ReindexIndex(RangeVar *indexRelation)","html":"@@ -1689,7 +1689,7 @@ ReindexIndex(RangeVar *indexRelation)","displayNoNewLineWarning":false,"position":0,"left":1688,"right":1688},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1689,"text":" \t\t\t\t\t\t\t\t\t RangeVarCallbackForReindexIndex,","html":" \t\t\t\t\t\t\t\t\t \u003cspan class=pl-s1\u003eRangeVarCallbackForReindexIndex\u003c/span\u003e,","displayNoNewLineWarning":false,"position":1,"left":1689,"right":1689},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1690,"text":" \t\t\t\t\t\t\t\t\t (void *) \u0026heapOid);","html":" \t\t\t\t\t\t\t\t\t (\u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e) \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003eheapOid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":1690,"right":1690},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1691,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":1691,"right":1691},{"stylingDirective":null,"type":"DELETION","blobLineNumber":1692,"text":"-\treindex_index(indOid, false);","html":"-\t\u003cspan class=\"pl-en\"\u003ereindex_index\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eindOid\u003c/span\u003e, false);","displayNoNewLineWarning":false,"position":4,"left":1692,"right":1691},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":1692,"text":"+\treindex_index(indOid, false, indexRelation-\u003erelpersistence);","html":"+\t\u003cspan class=\"pl-en\"\u003ereindex_index\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003eindOid\u003c/span\u003e, false\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1 x\"\u003eindexRelation\u003c/span\u003e\u003cspan class=\"pl-c1 x\"\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=\"pl-c1 x x-last\"\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":1692,"right":1692},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1693,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":1693,"right":1693},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1694,"text":" \treturn indOid;","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e \u003cspan class=pl-s1\u003eindOid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":7,"left":1694,"right":1694},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":1695,"text":" }","html":" }","displayNoNewLineWarning":false,"position":8,"left":1695,"right":1695}],"diffNumber":2,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":1903,"linesChanged":2,"newTreeEntry":{"lineCount":1903,"path":"src/backend/commands/indexcmds.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/indexcmds.c","mode":100644},"linesAdded":1,"linesDeleted":1,"path":"src/backend/commands/indexcmds.c","pathDigest":"111f77b321d894beea2b6a25406b3d540e5e2441c3f13841b60c0bb5bb961063","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":66,"text":"@@ -67,7 +67,7 @@ static void mv_GenerateOper(StringInfo buf, Oid opoid);","html":"@@ -67,7 +67,7 @@ static void mv_GenerateOper(StringInfo buf, Oid opoid);","displayNoNewLineWarning":false,"position":0,"left":66,"right":66},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":67,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":67,"right":67},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":68,"text":" static void refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003erefresh_by_match_merge\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003ematviewOid\u003c/span\u003e, \u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003etempOid\u003c/span\u003e, \u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003erelowner\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":68,"right":68},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":69,"text":" \t\t\t\t\t\t int save_sec_context);","html":" \t\t\t\t\t\t \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003esave_sec_context\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":69,"right":69},{"stylingDirective":null,"type":"DELETION","blobLineNumber":70,"text":"-static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap);","html":"-\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":70,"right":69},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":70,"text":"+static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence);","html":"+\u003cspan class=\"pl-k\"\u003estatic\u003c/span\u003e \u003cspan class=\"pl-smi\"\u003evoid\u003c/span\u003e \u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":5,"left":70,"right":70},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":71,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":6,"left":71,"right":71},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":72,"text":" static void OpenMatViewIncrementalMaintenance(void);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eOpenMatViewIncrementalMaintenance\u003c/span\u003e(\u003cspan class=pl-smi\u003evoid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":72,"right":72},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":73,"text":" static void CloseMatViewIncrementalMaintenance(void);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eCloseMatViewIncrementalMaintenance\u003c/span\u003e(\u003cspan class=pl-smi\u003evoid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":8,"left":73,"right":73},{"stylingDirective":null,"type":"HUNK","blobLineNumber":302,"text":"@@ -303,7 +303,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,","html":"@@ -303,7 +303,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,","displayNoNewLineWarning":false,"position":9,"left":302,"right":302},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":303,"text":" \t\tAssert(matview_maintenance_depth == old_depth);","html":" \t\t\u003cspan class=pl-en\u003eAssert\u003c/span\u003e(\u003cspan class=pl-s1\u003ematview_maintenance_depth\u003c/span\u003e \u003cspan class=pl-c1\u003e==\u003c/span\u003e \u003cspan class=pl-s1\u003eold_depth\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":303,"right":303},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":304,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":11,"left":304,"right":304},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":305,"text":" \telse","html":" \t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":305,"right":305},{"stylingDirective":null,"type":"DELETION","blobLineNumber":306,"text":"-\t\trefresh_by_heap_swap(matviewOid, OIDNewHeap);","html":"-\t\t\u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e);","displayNoNewLineWarning":false,"position":13,"left":306,"right":305},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":306,"text":"+\t\trefresh_by_heap_swap(matviewOid, OIDNewHeap, relpersistence);","html":"+\t\t\u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":14,"left":306,"right":306},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":307,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":15,"left":307,"right":307},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":308,"text":" \t/* Roll back any GUC changes */","html":" \t\u003cspan class=pl-c\u003e/* Roll back any GUC changes */\u003c/span\u003e","displayNoNewLineWarning":false,"position":16,"left":308,"right":308},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":309,"text":" \tAtEOXact_GUC(false, save_nestlevel);","html":" \t\u003cspan class=pl-en\u003eAtEOXact_GUC\u003c/span\u003e(false, \u003cspan class=pl-s1\u003esave_nestlevel\u003c/span\u003e);","displayNoNewLineWarning":false,"position":17,"left":309,"right":309},{"stylingDirective":null,"type":"HUNK","blobLineNumber":758,"text":"@@ -759,10 +759,10 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,","html":"@@ -759,10 +759,10 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,","displayNoNewLineWarning":false,"position":18,"left":758,"right":758},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":759,"text":" * swapping is handled by the called function, so it is not needed here.","html":" \u003cspan class=pl-c\u003e * swapping is handled by the called function, so it is not needed here.\u003c/span\u003e","displayNoNewLineWarning":false,"position":19,"left":759,"right":759},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":760,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":20,"left":760,"right":760},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":761,"text":" static void","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":21,"left":761,"right":761},{"stylingDirective":null,"type":"DELETION","blobLineNumber":762,"text":"-refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap)","html":"-\u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e)","displayNoNewLineWarning":false,"position":22,"left":762,"right":761},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":762,"text":"+refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence)","html":"+\u003cspan class=\"pl-en\"\u003erefresh_by_heap_swap\u003c/span\u003e(\u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003ematviewOid\u003c/span\u003e, \u003cspan class=\"pl-smi\"\u003eOid\u003c/span\u003e \u003cspan class=\"pl-s1\"\u003eOIDNewHeap\u003c/span\u003e\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-smi x\"\u003echar\u003c/span\u003e\u003cspan class=\"x\"\u003e \u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003erelpersistence\u003c/span\u003e)","displayNoNewLineWarning":false,"position":23,"left":762,"right":762},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":763,"text":" {","html":" {","displayNoNewLineWarning":false,"position":24,"left":763,"right":763},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":764,"text":" \tfinish_heap_swap(matviewOid, OIDNewHeap, false, false, true, true,","html":" \t\u003cspan class=pl-en\u003efinish_heap_swap\u003c/span\u003e(\u003cspan class=pl-s1\u003ematviewOid\u003c/span\u003e, \u003cspan class=pl-s1\u003eOIDNewHeap\u003c/span\u003e, false, false, true, true,","displayNoNewLineWarning":false,"position":25,"left":764,"right":764},{"stylingDirective":null,"type":"DELETION","blobLineNumber":765,"text":"-\t\t\t\t\t RecentXmin, ReadNextMultiXactId());","html":"-\t\t\t\t\t \u003cspan class=\"pl-s1\"\u003eRecentXmin\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003eReadNextMultiXactId\u003c/span\u003e());","displayNoNewLineWarning":false,"position":26,"left":765,"right":764},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":765,"text":"+\t\t\t\t\t RecentXmin, ReadNextMultiXactId(), relpersistence);","html":"+\t\t\t\t\t \u003cspan class=\"pl-s1\"\u003eRecentXmin\u003c/span\u003e, \u003cspan class=\"pl-en\"\u003eReadNextMultiXactId\u003c/span\u003e()\u003cspan class=\"x x-first\"\u003e, \u003c/span\u003e\u003cspan class=\"pl-s1 x x-last\"\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":27,"left":765,"right":765},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":766,"text":" }","html":" }","displayNoNewLineWarning":false,"position":28,"left":766,"right":766},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":767,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":29,"left":767,"right":767},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":768,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":30,"left":768,"right":768}],"diffNumber":3,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":797,"linesChanged":8,"newTreeEntry":{"lineCount":797,"path":"src/backend/commands/matview.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/matview.c","mode":100644},"linesAdded":4,"linesDeleted":4,"path":"src/backend/commands/matview.c","pathDigest":"838f1686d6a90ce4a345829393f107a7807f1f08f14617ef3f31c4f73ec804fd","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":392,"text":"@@ -393,7 +393,6 @@ static void ATExecClusterOn(Relation rel, const char *indexName,","html":"@@ -393,7 +393,6 @@ static void ATExecClusterOn(Relation rel, const char *indexName,","displayNoNewLineWarning":false,"position":0,"left":392,"right":392},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":393,"text":" \t\t\t\tLOCKMODE lockmode);","html":" \t\t\t\t\u003cspan class=pl-smi\u003eLOCKMODE\u003c/span\u003e \u003cspan class=pl-s1\u003elockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":1,"left":393,"right":393},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":394,"text":" static void ATExecDropCluster(Relation rel, LOCKMODE lockmode);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eATExecDropCluster\u003c/span\u003e(\u003cspan class=pl-smi\u003eRelation\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-smi\u003eLOCKMODE\u003c/span\u003e \u003cspan class=pl-s1\u003elockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":394,"right":394},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":395,"text":" static bool ATPrepChangePersistence(Relation rel, bool toLogged);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003eATPrepChangePersistence\u003c/span\u003e(\u003cspan class=pl-smi\u003eRelation\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003etoLogged\u003c/span\u003e);","displayNoNewLineWarning":false,"position":3,"left":395,"right":395},{"stylingDirective":null,"type":"DELETION","blobLineNumber":396,"text":"-static void ATChangeIndexesPersistence(Oid relid, char relpersistence);","html":"-\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eATChangeIndexesPersistence\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003erelid\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":396,"right":395},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":396,"text":" static void ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eATPrepSetTableSpace\u003c/span\u003e(\u003cspan class=pl-smi\u003eAlteredTableInfo\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etab\u003c/span\u003e, \u003cspan class=pl-smi\u003eRelation\u003c/span\u003e \u003cspan class=pl-s1\u003erel\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":397,"right":396},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":397,"text":" \t\t\t\t\tchar *tablespacename, LOCKMODE lockmode);","html":" \t\t\t\t\t\u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003etablespacename\u003c/span\u003e, \u003cspan class=pl-smi\u003eLOCKMODE\u003c/span\u003e \u003cspan class=pl-s1\u003elockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":398,"right":397},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":398,"text":" static void ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode);","html":" \u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eATExecSetTableSpace\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003etableOid\u003c/span\u003e, \u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003enewTableSpace\u003c/span\u003e, \u003cspan class=pl-smi\u003eLOCKMODE\u003c/span\u003e \u003cspan class=pl-s1\u003elockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":399,"right":398},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3732,"text":"@@ -3734,16 +3733,6 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)","html":"@@ -3734,16 +3733,6 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)","displayNoNewLineWarning":false,"position":8,"left":3733,"right":3732},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3733,"text":" \t\t\t */","html":" \u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":9,"left":3734,"right":3733},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3734,"text":" \t\t\tATRewriteTable(tab, OIDNewHeap, lockmode);","html":" \t\t\t\u003cspan class=pl-en\u003eATRewriteTable\u003c/span\u003e(\u003cspan class=pl-s1\u003etab\u003c/span\u003e, \u003cspan class=pl-s1\u003eOIDNewHeap\u003c/span\u003e, \u003cspan class=pl-s1\u003elockmode\u003c/span\u003e);","displayNoNewLineWarning":false,"position":10,"left":3735,"right":3734},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3735,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":11,"left":3736,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3737,"text":"-\t\t\t/*","html":"-\t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":12,"left":3737,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3738,"text":"-\t\t\t * Change the persistence marking of indexes, if necessary. This","html":"-\u003cspan class=pl-c\u003e\t\t\t * Change the persistence marking of indexes, if necessary. This\u003c/span\u003e","displayNoNewLineWarning":false,"position":13,"left":3738,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3739,"text":"-\t\t\t * is so that the new copies are built with the right persistence","html":"-\u003cspan class=pl-c\u003e\t\t\t * is so that the new copies are built with the right persistence\u003c/span\u003e","displayNoNewLineWarning":false,"position":14,"left":3739,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3740,"text":"-\t\t\t * in the reindex step below. Note we cannot do this earlier,","html":"-\u003cspan class=pl-c\u003e\t\t\t * in the reindex step below. Note we cannot do this earlier,\u003c/span\u003e","displayNoNewLineWarning":false,"position":15,"left":3740,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3741,"text":"-\t\t\t * because the rewrite step might read the indexes, and that would","html":"-\u003cspan class=pl-c\u003e\t\t\t * because the rewrite step might read the indexes, and that would\u003c/span\u003e","displayNoNewLineWarning":false,"position":16,"left":3741,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3742,"text":"-\t\t\t * cause buffers for them to have the wrong setting.","html":"-\u003cspan class=pl-c\u003e\t\t\t * cause buffers for them to have the wrong setting.\u003c/span\u003e","displayNoNewLineWarning":false,"position":17,"left":3742,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3743,"text":"-\t\t\t */","html":"-\u003cspan class=pl-c\u003e\t\t\t */\u003c/span\u003e","displayNoNewLineWarning":false,"position":18,"left":3743,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3744,"text":"-\t\t\tif (tab-\u003echgPersistence)","html":"-\t\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (\u003cspan class=pl-s1\u003etab\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003echgPersistence\u003c/span\u003e)","displayNoNewLineWarning":false,"position":19,"left":3744,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3745,"text":"-\t\t\t\tATChangeIndexesPersistence(tab-\u003erelid, tab-\u003enewrelpersistence);","html":"-\t\t\t\t\u003cspan class=pl-en\u003eATChangeIndexesPersistence\u003c/span\u003e(\u003cspan class=pl-s1\u003etab\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelid\u003c/span\u003e, \u003cspan class=pl-s1\u003etab\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enewrelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":20,"left":3745,"right":3735},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3746,"text":"-","html":"-","displayNoNewLineWarning":false,"position":21,"left":3746,"right":3735},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3736,"text":" \t\t\t/*","html":" \t\t\t\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":22,"left":3747,"right":3736},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3737,"text":" \t\t\t * Swap the physical files of the old and new heaps, then rebuild","html":" \u003cspan class=pl-c\u003e\t\t\t * Swap the physical files of the old and new heaps, then rebuild\u003c/span\u003e","displayNoNewLineWarning":false,"position":23,"left":3748,"right":3737},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3738,"text":" \t\t\t * indexes and discard the old heap. We can use RecentXmin for","html":" \u003cspan class=pl-c\u003e\t\t\t * indexes and discard the old heap. We can use RecentXmin for\u003c/span\u003e","displayNoNewLineWarning":false,"position":24,"left":3749,"right":3738},{"stylingDirective":null,"type":"HUNK","blobLineNumber":3744,"text":"@@ -3756,7 +3745,8 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)","html":"@@ -3756,7 +3745,8 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)","displayNoNewLineWarning":false,"position":25,"left":3755,"right":3744},{"stylingDirective":n 8000 ull,"type":"CONTEXT","blobLineNumber":3745,"text":" \t\t\t\t\t\t\t false, false, true,","html":" \t\t\t\t\t\t\t false, false, true,","displayNoNewLineWarning":false,"position":26,"left":3756,"right":3745},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3746,"text":" \t\t\t\t\t\t\t !OidIsValid(tab-\u003enewTableSpace),","html":" \t\t\t\t\t\t\t !\u003cspan class=pl-en\u003eOidIsValid\u003c/span\u003e(\u003cspan class=pl-s1\u003etab\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003enewTableSpace\u003c/span\u003e),","displayNoNewLineWarning":false,"position":27,"left":3757,"right":3746},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3747,"text":" \t\t\t\t\t\t\t RecentXmin,","html":" \t\t\t\t\t\t\t \u003cspan class=pl-s1\u003eRecentXmin\u003c/span\u003e,","displayNoNewLineWarning":false,"position":28,"left":3758,"right":3747},{"stylingDirective":null,"type":"DELETION","blobLineNumber":3759,"text":"-\t\t\t\t\t\t\t ReadNextMultiXactId());","html":"-\t\t\t\t\t\t\t \u003cspan class=pl-en\u003eReadNextMultiXactId\u003c/span\u003e());","displayNoNewLineWarning":false,"position":29,"left":3759,"right":3747},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3748,"text":"+\t\t\t\t\t\t\t ReadNextMultiXactId(),","html":"+\t\t\t\t\t\t\t \u003cspan class=pl-en\u003eReadNextMultiXactId\u003c/span\u003e(),","displayNoNewLineWarning":false,"position":30,"left":3759,"right":3748},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3749,"text":"+\t\t\t\t\t\t\t persistence);","html":"+\t\t\t\t\t\t\t \u003cspan class=pl-s1\u003epersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":31,"left":3759,"right":3749},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3750,"text":" \t\t}","html":" \t\t}","displayNoNewLineWarning":false,"position":32,"left":3760,"right":3750},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3751,"text":" \t\telse","html":" \t\t\u003cspan class=pl-k\u003eelse\u003c/span\u003e","displayNoNewLineWarning":false,"position":33,"left":3761,"right":3751},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3752,"text":" \t\t{","html":" \t\t{","displayNoNewLineWarning":false,"position":34,"left":3762,"right":3752},{"stylingDirective":null,"type":"HUNK","blobLineNumber":10868,"text":"@@ -10879,48 +10869,6 @@ ATPrepChangePersistence(Relation rel, bool toLogged)","html":"@@ -10879,48 +10869,6 @@ ATPrepChangePersistence(Relation rel, bool toLogged)","displayNoNewLineWarning":false,"position":35,"left":10878,"right":10868},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10869,"text":" \treturn true;","html":" \t\u003cspan class=pl-k\u003ereturn\u003c/span\u003e true;","displayNoNewLineWarning":false,"position":36,"left":10879,"right":10869},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10870,"text":" }","html":" }","displayNoNewLineWarning":false,"position":37,"left":10880,"right":10870},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10871,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":38,"left":10881,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10882,"text":"-/*","html":"-\u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":39,"left":10882,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10883,"text":"- * Update the pg_class entry of each index for the given relation to the","html":"-\u003cspan class=pl-c\u003e * Update the pg_class entry of each index for the given relation to the\u003c/span\u003e","displayNoNewLineWarning":false,"position":40,"left":10883,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10884,"text":"- * given persistence.","html":"-\u003cspan class=pl-c\u003e * given persistence.\u003c/span\u003e","displayNoNewLineWarning":false,"position":41,"left":10884,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10885,"text":"- */","html":"-\u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":42,"left":10885,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10886,"text":"-static void","html":"-\u003cspan class=pl-k\u003estatic\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e","displayNoNewLineWarning":false,"position":43,"left":10886,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10887,"text":"-ATChangeIndexesPersistence(Oid relid, char relpersistence)","html":"-\u003cspan class=pl-en\u003eATChangeIndexesPersistence\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003erelid\u003c/span\u003e, \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003erelpersistence\u003c/span\u003e)","displayNoNewLineWarning":false,"position":44,"left":10887,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10888,"text":"-{","html":"-{","displayNoNewLineWarning":false,"position":45,"left":10888,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10889,"text":"-\tRelation\trel;","html":"-\t\u003cspan class=pl-smi\u003eRelation\u003c/span\u003e\t\u003cspan class=pl-s1\u003erel\u003c/span\u003e;","displayNoNewLineWarning":false,"position":46,"left":10889,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10890,"text":"-\tRelation\tpg_class;","html":"-\t\u003cspan class=pl-smi\u003eRelation\u003c/span\u003e\t\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e;","displayNoNewLineWarning":false,"position":47,"left":10890,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10891,"text":"-\tList\t *indexes;","html":"-\t\u003cspan class=pl-smi\u003eList\u003c/span\u003e\t \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003eindexes\u003c/span\u003e;","displayNoNewLineWarning":false,"position":48,"left":10891,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10892,"text":"-\tListCell *cell;","html":"-\t\u003cspan class=pl-smi\u003eListCell\u003c/span\u003e \u003cspan class=pl-c1\u003e*\u003c/span\u003e\u003cspan class=pl-s1\u003ecell\u003c/span\u003e;","displayNoNewLineWarning":false,"position":49,"left":10892,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10893,"text":"-","html":"-","displayNoNewLineWarning":false,"position":50,"left":10893,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10894,"text":"-\tpg_class = heap_open(RelationRelationId, RowExclusiveLock);","html":"-\t\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eheap_open\u003c/span\u003e(\u003cspan class=pl-s1\u003eRelationRelationId\u003c/span\u003e, \u003cspan class=pl-s1\u003eRowExclusiveLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":51,"left":10894,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10895,"text":"-","html":"-","displayNoNewLineWarning":false,"position":52,"left":10895,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10896,"text":"-\t/* We already have a lock on the table */","html":"-\t\u003cspan class=pl-c\u003e/* We already have a lock on the table */\u003c/span\u003e","displayNoNewLineWarning":false,"position":53,"left":10896,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10897,"text":"-\trel = relation_open(relid, NoLock);","html":"-\t\u003cspan class=pl-s1\u003erel\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003erelation_open\u003c/span\u003e(\u003cspan class=pl-s1\u003erelid\u003c/span\u003e, \u003cspan class=pl-s1\u003eNoLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":54,"left":10897,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10898,"text":"-\tindexes = RelationGetIndexList(rel);","html":"-\t\u003cspan class=pl-s1\u003eindexes\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eRelationGetIndexList\u003c/span\u003e(\u003cspan class=pl-s1\u003erel\u003c/span\u003e);","displayNoNewLineWarning":false,"position":55,"left":10898,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10899,"text":"-\tforeach(cell, indexes)","html":"-\t\u003cspan class=pl-en\u003eforeach\u003c/span\u003e(\u003cspan class=pl-s1\u003ecell\u003c/span\u003e, \u003cspan class=pl-s1\u003eindexes\u003c/span\u003e)","displayNoNewLineWarning":false,"position":56,"left":10899,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10900,"text":"-\t{","html":"-\t{","displayNoNewLineWarning":false,"position":57,"left":10900,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10901,"text":"-\t\tOid\t\t\tindexid = lfirst_oid(cell);","html":"-\t\t\u003cspan class=pl-smi\u003eOid\u003c/span\u003e\t\t\t\u003cspan class=pl-s1\u003eindexid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003elfirst_oid\u003c/span\u003e(\u003cspan class=pl-s1\u003ecell\u003c/span\u003e);","displayNoNewLineWarning":false,"position":58,"left":10901,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10902,"text":"-\t\tHeapTuple\ttuple;","html":"-\t\t\u003cspan class=pl-smi\u003eHeapTuple\u003c/span\u003e\t\u003cspan class=pl-s1\u003etuple\u003c/span\u003e;","displayNoNewLineWarning":false,"position":59,"left":10902,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10903,"text":"-\t\tForm_pg_class pg_class_form;","html":"-\t\t\u003cspan class=pl-smi\u003eForm_pg_class\u003c/span\u003e \u003cspan class=pl-s1\u003epg_class_form\u003c/span\u003e;","displayNoNewLineWarning":false,"position":60,"left":10903,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10904,"text":"-","html":"-","displayNoNewLineWarning":false,"position":61,"left":10904,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10905,"text":"-\t\ttuple = SearchSysCacheCopy1(RELOID, ObjectIdGetDatum(indexid));","html":"-\t\t\u003cspan class=pl-s1\u003etuple\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-en\u003eSearchSysCacheCopy1\u003c/span\u003e(\u003cspan class=pl-c1\u003eRELOID\u003c/span\u003e, \u003cspan class=pl-en\u003eObjectIdGetDatum\u003c/span\u003e(\u003cspan class=pl-s1\u003eindexid\u003c/span\u003e));","displayNoNewLineWarning":false,"position":62,"left":10905,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10906,"text":"-\t\tif (!HeapTupleIsValid(tuple))","html":"-\t\t\u003cspan class=pl-k\u003eif\u003c/span\u003e (!\u003cspan class=pl-en\u003eHeapTupleIsValid\u003c/span\u003e(\u003cspan class=pl-s1\u003etuple\u003c/span\u003e))","displayNoNewLineWarning":false,"position":63,"left":10906,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10907,"text":"-\t\t\telog(ERROR, \"cache lookup failed for relation %u\",","html":"-\t\t\t\u003cspan class=pl-en\u003eelog\u003c/span\u003e(\u003cspan class=pl-c1\u003eERROR\u003c/span\u003e, \u003cspan class=pl-s\u003e\u0026quot;cache lookup failed for relation %u\u0026quot;\u003c/span\u003e,","displayNoNewLineWarning":false,"position":64,"left":10907,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10908,"text":"-\t\t\t\t indexid);","html":"-\t\t\t\t \u003cspan class=pl-s1\u003eindexid\u003c/span\u003e);","displayNoNewLineWarning":false,"position":65,"left":10908,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10909,"text":"-","html":"-","displayNoNewLineWarning":false,"position":66,"left":10909,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10910,"text":"-\t\tpg_class_form = (Form_pg_class) GETSTRUCT(tuple);","html":"-\t\t\u003cspan class=pl-s1\u003epg_class_form\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e (\u003cspan class=pl-smi\u003eForm_pg_class\u003c/span\u003e) \u003cspan class=pl-en\u003eGETSTRUCT\u003c/span\u003e(\u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":67,"left":10910,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10911,"text":"-\t\tpg_class_form-\u003erelpersistence = relpersistence;","html":"-\t\t\u003cspan class=pl-s1\u003epg_class_form\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erelpersistence\u003c/span\u003e;","displayNoNewLineWarning":false,"position":68,"left":10911,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10912,"text":"-\t\tsimple_heap_update(pg_class, \u0026tuple-\u003et_self, tuple);","html":"-\t\t\u003cspan class=pl-en\u003esimple_heap_update\u003c/span\u003e(\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etuple\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003et_self\u003c/span\u003e, \u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":69,"left":10912,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10913,"text":"-","html":"-","displayNoNewLineWarning":false,"position":70,"left":10913,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10914,"text":"-\t\t/* keep catalog indexes current */","html":"-\t\t\u003cspan class=pl-c\u003e/* keep catalog indexes current */\u003c/span\u003e","displayNoNewLineWarning":false,"position":71,"left":10914,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10915,"text":"-\t\tCatalogUpdateIndexes(pg_class, tuple);","html":"-\t\t\u003cspan class=pl-en\u003eCatalogUpdateIndexes\u003c/span\u003e(\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e, \u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":72,"left":10915,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10916,"text":"-","html":"-","displayNoNewLineWarning":false,"position":73,"left":10916,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10917,"text":"-\t\theap_freetuple(tuple);","html":"-\t\t\u003cspan class=pl-en\u003eheap_freetuple\u003c/span\u003e(\u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":74,"left":10917,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10918,"text":"-\t}","html":"-\t}","displayNoNewLineWarning":false,"position":75,"left":10918,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10919,"text":"-","html":"-","displayNoNewLineWarning":false,"position":76,"left":10919,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10920,"text":"-\theap_close(pg_class, RowExclusiveLock);","html":"-\t\u003cspan class=pl-en\u003eheap_close\u003c/span\u003e(\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e, \u003cspan class=pl-s1\u003eRowExclusiveLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":77,"left":10920,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10921,"text":"-\theap_close(rel, NoLock);","html":"-\t\u003cspan class=pl-en\u003eheap_close\u003c/span\u003e(\u003cspan class=pl-s1\u003erel\u003c/span\u003e, \u003cspan class=pl-s1\u003eNoLock\u003c/span\u003e);","displayNoNewLineWarning":false,"position":78,"left":10921,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10922,"text":"-}","html":"-}","displayNoNewLineWarning":false,"position":79,"left":10922,"right":10871},{"stylingDirective":null,"type":"DELETION","blobLineNumber":10923,"text":"-","html":"-","displayNoNewLineWarning":false,"position":80,"left":10923,"right":10871},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10872,"text":" /*","html":" \u003cspan class=pl-c\u003e/*\u003c/span\u003e","displayNoNewLineWarning":false,"position":81,"left":10924,"right":10872},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10873,"text":" * Execute ALTER TABLE SET SCHEMA","html":" \u003cspan class=pl-c\u003e * Execute ALTER TABLE SET SCHEMA\u003c/span\u003e","displayNoNewLineWarning":false,"position":82,"left":10925,"right":10873},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":10874,"text":" */","html":" \u003cspan class=pl-c\u003e */\u003c/span\u003e","displayNoNewLineWarning":false,"position":83,"left":10926,"right":10874}],"diffNumber":4,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":11566,"linesChanged":56,"newTreeEntry":{"lineCount":11566,"path":"src/backend/commands/tablecmds.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/commands/tablecmds.c","mode":100644},"linesAdded":2,"linesDeleted":54,"path":"src/backend/commands/tablecmds.c","pathDigest":"d373fb790605aded212c2e3a0fbe8c015d110077ff46c07d0a6d6647a2d7e928","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":3077,"text":"@@ -3078,6 +3078,7 @@ RelationSetNewRelfilenode(Relation relation, TransactionId freezeXid,","html":"@@ -3078,6 +3078,7 @@ RelationSetNewRelfilenode(Relation relation, TransactionId freezeXid,","displayNoNewLineWarning":false,"position":0,"left":3077,"right":3077},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3078,"text":" \t}","html":" \t}","displayNoNewLineWarning":false,"position":1,"left":3078,"right":3078},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3079,"text":" \tclassform-\u003erelfrozenxid = freezeXid;","html":" \t\u003cspan class=pl-s1\u003eclassform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelfrozenxid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003efreezeXid\u003c/span\u003e;","displayNoNewLineWarning":false,"position":2,"left":3079,"right":3079},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3080,"text":" \tclassform-\u003erelminmxid = minmulti;","html":" \t\u003cspan class=pl-s1\u003eclassform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelminmxid\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003eminmulti\u003c/span\u003e;","displayNoNewLineWarning":false,"position":3,"left":3080,"right":3080},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":3081,"text":"+\tclassform-\u003erelpersistence = relation-\u003erd_rel-\u003erelpersistence;","html":"+\t\u003cspan class=pl-s1\u003eclassform\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e \u003cspan class=pl-c1\u003e=\u003c/span\u003e \u003cspan class=pl-s1\u003erelation\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erd_rel\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003erelpersistence\u003c/span\u003e;","displayNoNewLineWarning":false,"position":4,"left":3080,"right":3081},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3082,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":5,"left":3081,"right":3082},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3083,"text":" \tsimple_heap_update(pg_class, \u0026tuple-\u003et_self, tuple);","html":" \t\u003cspan class=pl-en\u003esimple_heap_update\u003c/span\u003e(\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e, \u003cspan class=pl-c1\u003e\u0026amp;\u003c/span\u003e\u003cspan class=pl-s1\u003etuple\u003c/span\u003e\u003cspan class=pl-c1\u003e-\u0026gt;\u003c/span\u003e\u003cspan class=pl-c1\u003et_self\u003c/span\u003e, \u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":3082,"right":3083},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":3084,"text":" \tCatalogUpdateIndexes(pg_class, tuple);","html":" \t\u003cspan class=pl-en\u003eCatalogUpdateIndexes\u003c/span\u003e(\u003cspan class=pl-s1\u003epg_class\u003c/span\u003e, \u003cspan class=pl-s1\u003etuple\u003c/span\u003e);","displayNoNewLineWarning":false,"position":7,"left":3083,"right":3084}],"diffNumber":5,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":5275,"linesChanged":1,"newTreeEntry":{"lineCount":5275,"path":"src/backend/utils/cache/relcache.c","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/backend/utils/cache/relcache.c","mode":100644},"linesAdded":1,"linesDeleted":0,"path":"src/backend/utils/cache/relcache.c","pathDigest":"2ba7e4001546dd7fcc0d7bb872d9474ef85a6f6fa329d8168b9cb587bf0cce47","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":110,"text":"@@ -111,12 +111,15 @@ extern void validate_index(Oid heapId, Oid indexId, Snapshot snapshot);","html":"@@ -111,12 +111,15 @@ extern void validate_index(Oid heapId, Oid indexId, Snapshot snapshot);","displayNoNewLineWarning":false,"position":0,"left":110,"right":110},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":111,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":1,"left":111,"right":111},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":112,"text":" extern void index_set_state_flags(Oid indexId, IndexStateFlagsAction action);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003eindex_set_state_flags\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003eindexId\u003c/span\u003e, \u003cspan class=pl-smi\u003eIndexStateFlagsAction\u003c/span\u003e \u003cspan class=pl-s1\u003eaction\u003c/span\u003e);","displayNoNewLineWarning":false,"position":2,"left":112,"right":112},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":113,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":3,"left":113,"right":113},{"stylingDirective":null,"type":"DELETION","blobLineNumber":114,"text":"-extern void reindex_index(Oid indexId, bool skip_constraint_checks);","html":"-\u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003ereindex_index\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003eindexId\u003c/span\u003e, \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003eskip_constraint_checks\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":114,"right":113},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":114,"text":"+extern void reindex_index(Oid indexId, bool skip_constraint_checks,","html":"+\u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003evoid\u003c/span\u003e \u003cspan class=pl-en\u003ereindex_index\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003eindexId\u003c/span\u003e, \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003eskip_constraint_checks\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":114,"right":114},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":115,"text":"+\t\t\t char relpersistence);","html":"+\t\t\t \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003erelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":114,"right":115},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":116,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":7,"left":115,"right":116},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":117,"text":" /* Flag bits for reindex_relation(): */","html":" \u003cspan class=pl-c\u003e/* Flag bits for reindex_relation(): */\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":116,"right":117},{"stylingDirective":null,"type":"DELETION","blobLineNumber":117,"text":"-#define REINDEX_REL_PROCESS_TOAST\t\t0x01","html":"-\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_PROCESS_TOAST\u003c/span\u003e\t\t0x01","displayNoNewLineWarning":false,"position":9,"left":117,"right":117},{"stylingDirective":null,"type":"DELETION","blobLineNumber":118,"text":"-#define REINDEX_REL_SUPPRESS_INDEX_USE\t0x02","html":"-\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_SUPPRESS_INDEX_USE\u003c/span\u003e\t0x02","displayNoNewLineWarning":false,"position":10,"left":118,"right":117},{"stylingDirective":null,"type":"DELETION","blobLineNumber":119,"text":"-#define REINDEX_REL_CHECK_CONSTRAINTS\t0x04","html":"-\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_CHECK_CONSTRAINTS\u003c/span\u003e\t0x04","displayNoNewLineWarning":false,"position":11,"left":119,"right":117},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":118,"text":"+#define REINDEX_REL_PROCESS_TOAST\t\t\t0x01","html":"+\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_PROCESS_TOAST\u003c/span\u003e\t\t\t0x01","displayNoNewLineWarning":false,"position":12,"left":119,"right":118},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":119,"text":"+#define REINDEX_REL_SUPPRESS_INDEX_USE\t\t0x02","html":"+\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_SUPPRESS_INDEX_USE\u003c/span\u003e\t\t0x02","displayNoNewLineWarning":false,"position":13,"left":119,"right":119},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":120,"text":"+#define REINDEX_REL_CHECK_CONSTRAINTS\t\t0x04","html":"+\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_CHECK_CONSTRAINTS\u003c/span\u003e\t\t0x04","displayNoNewLineWarning":false,"position":14,"left":119,"right":120},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":121,"text":"+#define REINDEX_REL_FORCE_INDEXES_UNLOGGED\t0x08","html":"+\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_UNLOGGED\u003c/span\u003e\t0x08","displayNoNewLineWarning":false,"position":15,"left":119,"right":121},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":122,"text":"+#define REINDEX_REL_FORCE_INDEXES_PERMANENT\t0x10","html":"+\u003cspan class=pl-k\u003e#define\u003c/span\u003e \u003cspan class=pl-c1\u003eREINDEX_REL_FORCE_INDEXES_PERMANENT\u003c/span\u003e\t0x10","displayNoNewLineWarning":false,"position":16,"left":119,"right":122},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":123,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":17,"left":120,"right":123},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":124,"text":" extern bool reindex_relation(Oid relid, int flags);","html":" \u003cspan class=pl-k\u003eextern\u003c/span\u003e \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-en\u003ereindex_relation\u003c/span\u003e(\u003cspan class=pl-smi\u003eOid\u003c/span\u003e \u003cspan class=pl-s1\u003erelid\u003c/span\u003e, \u003cspan class=pl-smi\u003eint\u003c/span\u003e \u003cspan class=pl-s1\u003eflags\u003c/span\u003e);","displayNoNewLineWarning":false,"position":18,"left":121,"right":124},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":125,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":19,"left":122,"right":125}],"diffNumber":6,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":130,"linesChanged":11,"newTreeEntry":{"lineCount":130,"path":"src/include/catalog/index.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/catalog/index.h","mode":100644},"linesAdded":7,"linesDeleted":4,"path":"src/include/catalog/index.h","pathDigest":"50abc48efcc362f0d3194aceba6969429f46fa1f07a119e555255545e6655933","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","canToggleRichDiff":false,"defaultToRichDiff":false,"proseDifffHtml":null,"renderInfo":null,"dependencyDiffPath":null,"submodule":null},{"diffLines":[{"stylingDirective":null,"type":"HUNK","blobLineNumber":32,"text":"@@ -33,6 +33,7 @@ extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","html":"@@ -33,6 +33,7 @@ extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,","displayNoNewLineWarning":false,"position":0,"left":32,"right":32},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":33,"text":" \t\t\t\t bool check_constraints,","html":" \t\t\t\t \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003echeck_constraints\u003c/span\u003e,","displayNoNewLineWarning":false,"position":1,"left":33,"right":33},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":34,"text":" \t\t\t\t bool is_internal,","html":" \t\t\t\t \u003cspan class=pl-smi\u003ebool\u003c/span\u003e \u003cspan class=pl-s1\u003eis_internal\u003c/span\u003e,","displayNoNewLineWarning":false,"position":2,"left":34,"right":34},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":35,"text":" \t\t\t\t TransactionId frozenXid,","html":" \t\t\t\t \u003cspan class=pl-smi\u003eTransactionId\u003c/span\u003e \u003cspan class=pl-s1\u003efrozenXid\u003c/span\u003e,","displayNoNewLineWarning":false,"position":3,"left":35,"right":35},{"stylingDirective":null,"type":"DELETION","blobLineNumber":36,"text":"-\t\t\t\t MultiXactId minMulti);","html":"-\t\t\t\t \u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003eminMulti\u003c/span\u003e);","displayNoNewLineWarning":false,"position":4,"left":36,"right":35},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":36,"text":"+\t\t\t\t MultiXactId minMulti,","html":"+\t\t\t\t \u003cspan class=pl-smi\u003eMultiXactId\u003c/span\u003e \u003cspan class=pl-s1\u003eminMulti\u003c/span\u003e,","displayNoNewLineWarning":false,"position":5,"left":36,"right":36},{"stylingDirective":null,"type":"ADDITION","blobLineNumber":37,"text":"+\t\t\t\t char newrelpersistence);","html":"+\t\t\t\t \u003cspan class=pl-smi\u003echar\u003c/span\u003e \u003cspan class=pl-s1\u003enewrelpersistence\u003c/span\u003e);","displayNoNewLineWarning":false,"position":6,"left":36,"right":37},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":38,"text":" ","html":"\u003cbr\u003e","displayNoNewLineWarning":false,"position":7,"left":37,"right":38},{"stylingDirective":null,"type":"CONTEXT","blobLineNumber":39,"text":" #endif /* CLUSTER_H */","html":" \u003cspan class=pl-k\u003e#endif\u003c/span\u003e \u003cspan class=pl-c\u003e/* CLUSTER_H */\u003c/span\u003e","displayNoNewLineWarning":false,"position":8,"left":38,"right":39}],"diffNumber":7,"diffSize":"0 Bytes","isBinary":false,"isTooBig":false,"collapsed":false,"isSubmodule":false,"lineCount":39,"linesChanged":3,"newTreeEntry":{"lineCount":39,"path":"src/include/commands/cluster.h","mode":100644,"isGenerated":false},"oldTreeEntry":{"lineCount":0,"path":"src/include/commands/cluster.h","mode":100644},"linesAdded":2,"linesDeleted":1,"path":"src/include/commands/cluster.h","pathDigest":"6afb6f8d2b644429eb07b3fd1d8b28fa2a2707da2867c35ff7b50130ba379e8a","status":"MODIFIED","truncatedReason":null,"oldOid":"e4d1e264 10000 918f4019c86c807e7c349658f7a10397","newOid":"85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","copilotChatReference":null,"deletedSha":"e4d1e264918f4019c86c807e7c349658f7a10397","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/85b506bbfc2937c9abdfcce4e01a8feca8e64ee8","fileTreeExpanded":true,"headerInfo":{"additions":56,"deletions":69,"filesChanged":8,"filesChangedString":"8"},"moreDiffsToLoad":false,"asyncDiffLoadInfo":{"startIndex":8,"truncated":false,"byteCount":9753,"lineShownCount":275},"commentInfo":{"canComment":false,"locked":false,"canLock":false,"repoArchived":false},"csrf_tokens":{"/users/diffview?diff=split":{"post":"hR_aF1Est2kwzyyACt29fqIN8_UpceVKCBMy2cENJ1kNaOBbbIAaq-TUSiCm4GV83i-gfA2mxWYFveGBob6_ng"},"/users/diffview?diff=unified":{"post":"ZeGas8WgfKLRisUUoIAvWp8_c0B1lsM1iTzcq1IzoyvtlqD_-AzRYAWRo7QMvfdY4x0gyVFB4xmEkg_zMoA77A"},"/notifications/thread":{"post":"OTlTwhVWHX1bWs-qCzOuc3QE-ujOk0SdHFhTctzCw8T-SoH15BoQWTta6Ea9X01jaOLzv5bFuJdoWkxjkOgANw"}}},"title":"Get rid of SET LOGGED indexes persistence kludge · postgres/postgres@85b506b","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 85b506b

Browse files
committed
Get rid of SET LOGGED indexes persistence kludge
This removes ATChangeIndexesPersistence() introduced by f41872d which was too ugly to live for long. Instead, the correct persistence marking is passed all the way down to reindex_index, so that the transient relation built to contain the index relfilenode can get marked correctly right from the start. Author: Fabrízio de Royes Mello Review and editorialization by Michael Paquier and Álvaro Herrera
1 parent e4d1e26 commit 85b506b

File tree

8 files changed

+56
-69
lines changed
Expand file tree

8 files changed

+56
-69
lines changed

src/backend/catalog/index.c

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1980,7 +1980,7 @@ index_build(Relation heapRelation,
19801980
* created it, or truncated twice in a subsequent transaction, the
19811981
* relfilenode won't change, and nothing needs to be done here.
19821982
*/
1983-
if (heapRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
1983+
if (indexRelation->rd_rel->relpersistence == RELPERSISTENCE_UNLOGGED &&
19841984
!smgrexists(indexRelation->rd_smgr, INIT_FORKNUM))
19851985
{
19861986
RegProcedure ambuildempty = indexRelation->rd_am->ambuildempty;
@@ -3130,7 +3130,7 @@ IndexGetRelation(Oid indexId, bool missing_ok)
31303130
* reindex_index - This routine is used to recreate a single index
31313131
*/
31323132
void
3133-
reindex_index(Oid indexId, bool skip_constraint_checks)
3133+
reindex_index(Oid indexId, bool skip_constraint_checks, char persistence)
31343134
{
31353135
Relation iRel,
31363136
heapRelation;
@@ -3191,6 +3191,9 @@ reindex_index(Oid indexId, bool skip_constraint_checks)
31913191
indexInfo->ii_ExclusionStrats = NULL;
31923192
}
31933193

3194+
/* Set the relpersistence of the new index */
3195+
iRel->rd_rel->relpersistence = persistence;
3196+
31943197
/* We'll build a new physical relation for the index */
31953198
RelationSetNewRelfilenode(iRel, InvalidTransactionId,
31963199
InvalidMultiXactId);
@@ -3310,6 +3313,12 @@ reindex_index(Oid indexId, bool skip_constraint_checks)
33103313
* performance, other callers should include the flag only after transforming
33113314
* the data in a manner that risks a change in constraint validity.
33123315
*
3316+
* REINDEX_REL_FORCE_INDEXES_UNLOGGED: if true, set the persistence of the
3317+
* rebuilt indexes to unlogged.
3318+
*
3319+
* REINDEX_REL_FORCE_INDEXES_LOGGED: if true, set the persistence of the
3320+
* rebuilt indexes to permanent.
3321+
*
33133322
* Returns true if any indexes were rebuilt (including toast table's index
33143323
* when relevant). Note that a CommandCounterIncrement will occur after each
33153324
* index rebuild.
@@ -3371,6 +3380,7 @@ reindex_relation(Oid relid, int flags)
33713380
{
33723381
List *doneIndexes;
33733382
ListCell *indexId;
3383+
char persistence;
33743384

33753385
if (flags & REINDEX_REL_SUPPRESS_INDEX_USE)
33763386
{
@@ -3384,6 +3394,17 @@ reindex_relation(Oid relid, int flags)
33843394
CommandCounterIncrement();
33853395
}
33863396

3397+
/*
3398+
* Compute persistence of indexes: same as that of owning rel, unless
3399+
* caller specified otherwise.
3400+
*/
3401+
if (flags & REINDEX_REL_FORCE_INDEXES_UNLOGGED)
3402+
persistence = RELPERSISTENCE_UNLOGGED;
3403+
else if (flags & REINDEX_REL_FORCE_INDEXES_PERMANENT)
3404+
persistence = RELPERSISTENCE_PERMANENT;
3405+
else
3406+
persistence = rel->rd_rel->relpersistence;
3407+
33873408
/* Reindex all the indexes. */
33883409
doneIndexes = NIL;
33893410
foreach(indexId, indexIds)
@@ -3393,7 +3414,8 @@ reindex_relation(Oid relid, int flags)
33933414
if (is_pg_class)
33943415
RelationSetIndexList(rel, doneIndexes, InvalidOid);
33953416

3396-
reindex_index(indexOid, !(flags & REINDEX_REL_CHECK_CONSTRAINTS));
3417+
reindex_index(indexOid, !(flags & REINDEX_REL_CHECK_CONSTRAINTS),
3418+
persistence);
33973419

33983420
CommandCounterIncrement();
33993421

src/backend/commands/cluster.c

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -589,7 +589,8 @@ rebuild_relation(Relation OldHeap, Oid indexOid, bool verbose)
589589
*/
590590
finish_heap_swap(tableOid, OIDNewHeap, is_system_catalog,
591591
swap_toast_by_content, false, true,
592-
frozenXid, cutoffMulti);
592+
frozenXid, cutoffMulti,
593+
OldHeap->rd_rel->relpersistence);
593594
}
594595

595596

@@ -1475,7 +1476,8 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
14751476
bool check_constraints,
14761477
bool is_internal,
14771478
TransactionId frozenXid,
1478-
MultiXactId cutoffMulti)
1479+
MultiXactId cutoffMulti,
1480+
char newrelpersistence)
14791481
{
14801482
ObjectAddress object;
14811483
Oid mapped_tables[4];
@@ -1519,6 +1521,16 @@ finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
15191521
reindex_flags = REINDEX_REL_SUPPRESS_INDEX_USE;
15201522
if (check_constraints)
15211523
reindex_flags |= REINDEX_REL_CHECK_CONSTRAINTS;
1524+
1525+
/*
1526+
* Ensure that the indexes have the same persistence as the parent
1527+
* relation.
1528+
*/
1529+
if (newrelpersistence == RELPERSISTENCE_UNLOGGED)
1530+
reindex_flags |= REINDEX_REL_FORCE_INDEXES_UNLOGGED;
1531+
else if (newrelpersistence == RELPERSISTENCE_PERMANENT)
1532+
reindex_flags |= REINDEX_REL_FORCE_INDEXES_PERMANENT;
1533+
15221534
reindex_relation(OIDOldHeap, reindex_flags);
15231535

15241536
/*

src/backend/commands/indexcmds.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1689,7 +1689,7 @@ ReindexIndex(RangeVar *indexRelation)
16891689
RangeVarCallbackForReindexIndex,
16901690
(void *) &heapOid);
16911691

1692-
reindex_index(indOid, false);
1692+
reindex_index(indOid, false, indexRelation->relpersistence);
16931693

16941694
return indOid;
16951695
}

src/backend/commands/matview.c

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ static void mv_GenerateOper(StringInfo buf, Oid opoid);
6767

6868
static void refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
6969
int save_sec_context);
70-
static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap);
70+
static void refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence);
7171

7272
static void OpenMatViewIncrementalMaintenance(void);
7373
static void CloseMatViewIncrementalMaintenance(void);
@@ -303,7 +303,7 @@ ExecRefreshMatView(RefreshMatViewStmt *stmt, const char *queryString,
303303
Assert(matview_maintenance_depth == old_depth);
304304
}
305305
else
306-
refresh_by_heap_swap(matviewOid, OIDNewHeap);
306+
refresh_by_heap_swap(matviewOid, OIDNewHeap, relpersistence);
307307

308308
/* Roll back any GUC changes */
309309
AtEOXact_GUC(false, save_nestlevel);
@@ -759,10 +759,10 @@ refresh_by_match_merge(Oid matviewOid, Oid tempOid, Oid relowner,
759759
* swapping is handled by the called function, so it is not needed here.
760760
*/
761761
static void
762-
refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap)
762+
refresh_by_heap_swap(Oid matviewOid, Oid OIDNewHeap, char relpersistence)
763763
{
764764
finish_heap_swap(matviewOid, OIDNewHeap, false, false, true, true,
765-
RecentXmin, ReadNextMultiXactId());
765+
RecentXmin, ReadNextMultiXactId(), relpersistence);
766766
}
767767

768768

src/backend/commands/tablecmds.c

Lines changed: 2 additions & 54 deletions
Original file line numberDiff line numberDiff line change
@@ -393,7 +393,6 @@ static void ATExecClusterOn(Relation rel, const char *indexName,
393393
LOCKMODE lockmode);
394394
static void ATExecDropCluster(Relation rel, LOCKMODE lockmode);
395395
static bool ATPrepChangePersistence(Relation rel, bool toLogged);
396-
static void ATChangeIndexesPersistence(Oid relid, char relpersistence);
397396
static void ATPrepSetTableSpace(AlteredTableInfo *tab, Relation rel,
398397
char *tablespacename, LOCKMODE lockmode);
399398
static void ATExecSetTableSpace(Oid tableOid, Oid newTableSpace, LOCKMODE lockmode);
@@ -3734,16 +3733,6 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)
37343733
*/
37353734
ATRewriteTable(tab, OIDNewHeap, lockmode);
37363735

3737-
/*
3738-
* Change the persistence marking of indexes, if necessary. This
3739-
* is so that the new copies are built with the right persistence
3740-
* in the reindex step below. Note we cannot do this earlier,
3741-
* because the rewrite step might read the indexes, and that would
3742-
* cause buffers for them to have the wrong setting.
3743-
*/
3744-
if (tab->chgPersistence)
3745-
ATChangeIndexesPersistence(tab->relid, tab->newrelpersistence);
3746-
37473736
/*
37483737
* Swap the physical files of the old and new heaps, then rebuild
37493738
* indexes and discard the old heap. We can use RecentXmin for
@@ -3756,7 +3745,8 @@ ATRewriteTables(List **wqueue, LOCKMODE lockmode)
37563745
false, false, true,
37573746
!OidIsValid(tab->newTableSpace),
37583747
RecentXmin,
3759-
ReadNextMultiXactId());
3748+
ReadNextMultiXactId(),
3749+
persistence);
37603750
}
37613751
else
37623752
{
@@ -10879,48 +10869,6 @@ ATPrepChangePersistence(Relation rel, bool toLogged)
1087910869
return true;
1088010870
}
1088110871

10882-
/*
10883-
* Update the pg_class entry of each index for the given relation to the
10884-
* given persistence.
10885-
*/
10886-
static void
10887-
ATChangeIndexesPersistence(Oid relid, char relpersistence)
10888-
{
10889-
Relation rel;
10890-
Relation pg_class;
10891-
List *indexes;
10892-
ListCell *cell;
10893-
10894-
pg_class = heap_open(RelationRelationId, RowExclusiveLock);
10895-
10896-
/* We already have a lock on the table */
10897-
rel = relation_open(relid, NoLock);
10898-
indexes = RelationGetIndexList(rel);
10899-
foreach(cell, indexes)
10900-
{
10901-
Oid indexid = lfirst_oid(cell);
10902-
HeapTuple tuple;
10903-
Form_pg_class pg_class_form;
10904-
10905-
tuple = SearchSysCacheCopy1(RELOID, ObjectIdGetDatum(indexid));
10906-
if (!HeapTupleIsValid(tuple))
10907-
elog(ERROR, "cache lookup failed for relation %u",
10908-
indexid);
10909-
10910-
pg_class_form = (Form_pg_class) GETSTRUCT(tuple);
10911-
pg_class_form->relpersistence = relpersistence;
10912-
simple_heap_update(pg_class, &tuple->t_self, tuple);
10913-
10914-
/* keep catalog indexes current */
10915-
CatalogUpdateIndexes(pg_class, tuple);
10916-
10917-
heap_freetuple(tuple);
10918-
}
10919-
10920-
heap_close(pg_class, RowExclusiveLock);
10921-
heap_close(rel, NoLock);
10922-
}
10923-
1092410872
/*
1092510873
* Execute ALTER TABLE SET SCHEMA
1092610874
*/

src/backend/utils/cache/relcache.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3078,6 +3078,7 @@ RelationSetNewRelfilenode(Relation relation, TransactionId freezeXid,
30783078
}
30793079
classform->relfrozenxid = freezeXid;
30803080
classform->relminmxid = minmulti;
3081+
classform->relpersistence = relation->rd_rel->relpersistence;
30813082

30823083
simple_heap_update(pg_class, &tuple->t_self, tuple);
30833084
CatalogUpdateIndexes(pg_class, tuple);

src/include/catalog/index.h

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -111,12 +111,15 @@ extern void validate_index(Oid heapId, Oid indexId, Snapshot snapshot);
111111

112112
extern void index_set_state_flags(Oid indexId, IndexStateFlagsAction action);
113113

114-
extern void reindex_index(Oid indexId, bool skip_constraint_checks);
114+
extern void reindex_index(Oid indexId, bool skip_constraint_checks,
115+
char relpersistence);
115116

116117
/* Flag bits for reindex_relation(): */
117-
#define REINDEX_REL_PROCESS_TOAST 0x01
118-
#define REINDEX_REL_SUPPRESS_INDEX_USE 0x02
119-
#define REINDEX_REL_CHECK_CONSTRAINTS 0x04
118+
#define REINDEX_REL_PROCESS_TOAST 0x01
119+
#define REINDEX_REL_SUPPRESS_INDEX_USE 0x02
120+
#define REINDEX_REL_CHECK_CONSTRAINTS 0x04
121+
#define REINDEX_REL_FORCE_INDEXES_UNLOGGED 0x08
122+
#define REINDEX_REL_FORCE_INDEXES_PERMANENT 0x10
120123

121124
extern bool reindex_relation(Oid relid, int flags);
122125

src/include/commands/cluster.h

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,7 @@ extern void finish_heap_swap(Oid OIDOldHeap, Oid OIDNewHeap,
3333
bool check_constraints,
3434
bool is_internal,
3535
TransactionId frozenXid,
36-
MultiXactId minMulti);
36+
MultiXactId minMulti,
37+
char newrelpersistence);
3738

3839
#endif /* CLUSTER_H */

0 commit comments

Comments
 (0)
0