sinvalmsg-v1.patch
application/octet-stream
Filename: sinvalmsg-v1.patch
Type: application/octet-stream
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: unified
Series: patch v1
| File | + | − |
|---|---|---|
| src/backend/utils/cache/inval.c | 2 | 1 |
| src/include/access/xlog_internal.h | 1 | 1 |
| src/include/storage/sinval.h | 7 | 7 |
diff --git a/src/backend/utils/cache/inval.c b/src/backend/utils/cache/inval.c
index 3b15d85..55a3b71 100644
--- a/src/backend/utils/cache/inval.c
+++ b/src/backend/utils/cache/inval.c
@@ -319,7 +319,8 @@ AddCatcacheInvalidationMessage(InvalidationListHeader *hdr,
{
SharedInvalidationMessage msg;
- msg.cc.id = (int16) id;
+ Assert(id < CHAR_MAX);
+ msg.cc.id = (int8) id;
msg.cc.tuplePtr = *tuplePtr;
msg.cc.dbId = dbId;
msg.cc.hashValue = hashValue;
diff --git a/src/include/access/xlog_internal.h b/src/include/access/xlog_internal.h
index 49df96c..e11cce2 100644
--- a/src/include/access/xlog_internal.h
+++ b/src/include/access/xlog_internal.h
@@ -71,7 +71,7 @@ typedef struct XLogContRecord
/*
* Each page of XLOG file has a header like this:
*/
-#define XLOG_PAGE_MAGIC 0xD064 /* can be used as WAL version indicator */
+#define XLOG_PAGE_MAGIC 0xD065 /* can be used as WAL version indicator */
typedef struct XLogPageHeaderData
{
diff --git a/src/include/storage/sinval.h b/src/include/storage/sinval.h
index bbdde81..44e7e6c 100644
--- a/src/include/storage/sinval.h
+++ b/src/include/storage/sinval.h
@@ -26,7 +26,7 @@
* * invalidate an smgr cache entry for a specific physical relation
* * invalidate the mapped-relation mapping for a given database
* More types could be added if needed. The message type is identified by
- * the first "int16" field of the message struct. Zero or positive means a
+ * the first "int8" field of the message struct. Zero or positive means a
* specific-catcache inval message (and also serves as the catcache ID field).
* Negative values identify the other message types, as per codes below.
*
@@ -63,7 +63,7 @@
typedef struct
{
/* note: field layout chosen with an eye to alignment concerns */
- int16 id; /* cache ID --- must be first */
+ int8 id; /* cache ID --- must be first */
ItemPointerData tuplePtr; /* tuple identifier in cached relation */
Oid dbId; /* database ID, or 0 if a shared relation */
uint32 hashValue; /* hash value of key for this catcache */
@@ -73,7 +73,7 @@ typedef struct
typedef struct
{
- int16 id; /* type field --- must be first */
+ int8 id; /* type field --- must be first */
Oid dbId; /* database ID, or 0 if a shared catalog */
Oid catId; /* ID of catalog whose contents are invalid */
} SharedInvalCatalogMsg;
@@ -82,7 +82,7 @@ typedef struct
typedef struct
{
- int16 id; /* type field --- must be first */
+ int8 id; /* type field --- must be first */
Oid dbId; /* database ID, or 0 if a shared relation */
Oid relId; /* relation ID */
} SharedInvalRelcacheMsg;
@@ -91,7 +91,7 @@ typedef struct
typedef struct
{
- int16 id; /* type field --- must be first */
+ int8 id; /* type field --- must be first */
RelFileNode rnode; /* physical file ID */
} SharedInvalSmgrMsg;
@@ -99,13 +99,13 @@ typedef struct
typedef struct
{
- int16 id; /* type field --- must be first */
+ int8 id; /* type field --- must be first */
Oid dbId; /* database ID, or 0 for shared catalogs */
} SharedInvalRelmapMsg;
typedef union
{
- int16 id; /* type field --- must be first */
+ int8 id; /* type field --- must be first */
SharedInvalCatcacheMsg cc;
SharedInvalCatalogMsg cat;
SharedInvalRelcacheMsg rc;