0001-Remove-some-syscache-includes.patch
text/plain
Filename: 0001-Remove-some-syscache-includes.patch
Type: text/plain
Part: 0
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 0001
Subject: Remove some syscache includes
| File | + | − |
|---|---|---|
| src/backend/catalog/genbki.pl | 5 | 1 |
| src/include/catalog/objectaddress.h | 1 | 1 |
| src/include/utils/inval.h | 1 | 1 |
From d5eef6cc0b96ba4bdbab1b388ca24f7a35b1e7a2 Mon Sep 17 00:00:00 2001
From: Michael Paquier <michael@paquier.xyz>
Date: Mon, 6 Apr 2026 08:13:46 +0900
Subject: [PATCH] Remove some syscache includes
---
src/include/catalog/objectaddress.h | 2 +-
src/include/utils/inval.h | 2 +-
src/backend/catalog/genbki.pl | 6 +++++-
3 files changed, 7 insertions(+), 3 deletions(-)
diff --git a/src/include/catalog/objectaddress.h b/src/include/catalog/objectaddress.h
index b549be2d523e..1f965e1faef4 100644
--- a/src/include/catalog/objectaddress.h
+++ b/src/include/catalog/objectaddress.h
@@ -14,10 +14,10 @@
#define OBJECTADDRESS_H
#include "access/htup.h"
+#include "catalog/syscache_ids.h"
#include "nodes/parsenodes.h"
#include "storage/lockdefs.h"
#include "utils/relcache.h"
-#include "utils/syscache.h"
/*
* An ObjectAddress represents a database object of any type.
diff --git a/src/include/utils/inval.h b/src/include/utils/inval.h
index 5f64fb204776..735e42f73108 100644
--- a/src/include/utils/inval.h
+++ b/src/include/utils/inval.h
@@ -15,9 +15,9 @@
#define INVAL_H
#include "access/htup.h"
+#include "catalog/syscache_ids.h"
#include "storage/relfilelocator.h"
#include "utils/relcache.h"
-#include "utils/syscache.h"
extern PGDLLIMPORT int debug_discard_caches;
diff --git a/src/backend/catalog/genbki.pl b/src/backend/catalog/genbki.pl
index 48c6805f7527..80ef3bcd1685 100644
--- a/src/backend/catalog/genbki.pl
+++ b/src/backend/catalog/genbki.pl
@@ -795,7 +795,10 @@ print $fk_info "};\n\n#endif\t\t\t\t\t\t\t/* SYSTEM_FK_INFO_H */\n";
# Now generate syscache info
print_boilerplate($syscache_ids_fh, "syscache_ids.h", "SysCache identifiers");
-print $syscache_ids_fh "typedef enum SysCacheIdentifier
+print $syscache_ids_fh "#ifndef SYSCACHE_IDS_H
+#define SYSCACHE_IDS_H
+
+typedef enum SysCacheIdentifier
{
\tSYSCACHEID_INVALID = -1,\n";
@@ -834,6 +837,7 @@ foreach my $syscache (sort keys %syscaches)
print $syscache_ids_fh "} SysCacheIdentifier;\n";
print $syscache_ids_fh "#define SysCacheSize ($last_syscache + 1)\n";
+print $syscache_ids_fh "#endif\t\t/* SYSCACHE_IDS_H */";
print $syscache_info_fh "};\n";
--
2.53.0