v1-0001-Disable-updating-pg_class-for-CREATE-INDEX-during.patch
text/x-patch
Filename: v1-0001-Disable-updating-pg_class-for-CREATE-INDEX-during.patch
Type: text/x-patch
Part: 0
Message:
Re: Statistics Import and Export
Patch
Same data as JSON:
GET /api/v1/attachments/:id/patch
the parsed metadata as JSON — format, series position, per-file stats; never the diff bytes.
API reference →
Format: format-patch
Series: patch v1-0001
Subject: Disable updating pg_class for CREATE INDEX during binary upgrade.
| File | + | − |
|---|---|---|
| src/backend/catalog/index.c | 1 | 1 |
From 322db8c9e8796ce673f7d7b63bd64e4c9403a144 Mon Sep 17 00:00:00 2001
From: Corey Huinker <corey.huinker@gmail.com>
Date: Mon, 1 Apr 2024 18:25:18 -0400
Subject: [PATCH v1] Disable updating pg_class for CREATE INDEX during binary
upgrade.
There is no point in setting these values because the table will always
be empty.
---
src/backend/catalog/index.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/src/backend/catalog/index.c b/src/backend/catalog/index.c
index b6a7c60e23..f83b35add5 100644
--- a/src/backend/catalog/index.c
+++ b/src/backend/catalog/index.c
@@ -2874,7 +2874,7 @@ index_update_stats(Relation rel,
dirty = true;
}
- if (reltuples >= 0)
+ if ((reltuples >= 0) && (!IsBinaryUpgrade))
{
BlockNumber relpages = RelationGetNumberOfBlocks(rel);
BlockNumber relallvisible;
--
2.44.0