From: | Andres Freund <andres(at)2ndquadrant(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | [PATCH 02/16] Add zeroRecPtr as a shortcut for initializing a local variable to {0, 0} |
Date: | 2012-06-13 11:28:33 |
Message-ID: | 1339586927-13156-2-git-send-email-andres@2ndquadrant.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
From: Andres Freund <andres(at)anarazel(dot)de>
This is locally defined in lots of places and would get introduced frequently
in the next commits. It is expected that this can be defined in a header-only
manner as soon as the XLogInsert scalability groundwork from Heikki gets in.
---
src/backend/access/transam/xlogutils.c | 1 +
src/include/access/xlogdefs.h | 1 +
2 files changed, 2 insertions(+)
diff --git a/src/backend/access/transam/xlogutils.c b/src/backend/access/transam/xlogutils.c
index 6ddcc59..3a2462b 100644
--- a/src/backend/access/transam/xlogutils.c
+++ b/src/backend/access/transam/xlogutils.c
@@ -51,6 +51,7 @@ typedef struct xl_invalid_page
static HTAB *invalid_page_tab = NULL;
+XLogRecPtr zeroRecPtr = {0, 0};
/* Report a reference to an invalid page */
static void
diff --git a/src/include/access/xlogdefs.h b/src/include/access/xlogdefs.h
index 5e6d7e6..2768427 100644
--- a/src/include/access/xlogdefs.h
+++ b/src/include/access/xlogdefs.h
@@ -35,6 +35,7 @@ typedef struct XLogRecPtr
uint32 xrecoff; /* byte offset of location in log file */
} XLogRecPtr;
+extern XLogRecPtr zeroRecPtr;
#define XLogRecPtrIsInvalid(r) ((r).xrecoff == 0)
--
1.7.10.rc3.3.g19a6c.dirty
From | Date | Subject | |
---|---|---|---|
Next Message | Andres Freund | 2012-06-13 11:28:34 | [PATCH 03/16] Add a new syscache to fetch a pg_class entry via its relfilenode |
Previous Message | Andres Freund | 2012-06-13 11:28:32 | [PATCH 01/16] Overhaul walsender wakeup handling |