($INBOX_DIR/description missing)
help / color / mirror / Atom feed[PATCH 1/2] Make xact.h usable in frontend.
22+ messages / 4 participants
[nested] [flat]
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* [PATCH 1/2] Make xact.h usable in frontend.
@ 2020-08-12 20:07 Heikki Linnakangas <[email protected]>
0 siblings, 0 replies; 22+ messages in thread
From: Heikki Linnakangas @ 2020-08-12 20:07 UTC (permalink / raw)
xact.h included utils/datetime.h, which cannot be used in the frontend
(it includes fmgr.h, which needs Datum). But xact.h only needs the
definition of TimestampTz from it, which is available directly in
datatypes/timestamp.h. Change xact.h to include that instead of
utils/datetime.h, so that it can be used in client programs.
---
src/backend/nodes/params.c | 1 +
src/backend/utils/time/snapmgr.c | 2 ++
src/include/access/xact.h | 2 +-
3 files changed, 4 insertions(+), 1 deletion(-)
diff --git a/src/backend/nodes/params.c b/src/backend/nodes/params.c
index 1719119fc28..bce0c7e72b2 100644
--- a/src/backend/nodes/params.c
+++ b/src/backend/nodes/params.c
@@ -16,6 +16,7 @@
#include "postgres.h"
#include "access/xact.h"
+#include "fmgr.h"
#include "mb/stringinfo_mb.h"
#include "nodes/params.h"
#include "parser/parse_node.h"
diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c
index 6b6c8571e23..02b51bc4fe0 100644
--- a/src/backend/utils/time/snapmgr.c
+++ b/src/backend/utils/time/snapmgr.c
@@ -53,6 +53,7 @@
#include "access/xact.h"
#include "access/xlog.h"
#include "catalog/catalog.h"
+#include "datatype/timestamp.h"
#include "lib/pairingheap.h"
#include "miscadmin.h"
#include "storage/predicate.h"
@@ -67,6 +68,7 @@
#include "utils/resowner_private.h"
#include "utils/snapmgr.h"
#include "utils/syscache.h"
+#include "utils/timestamp.h"
/*
diff --git a/src/include/access/xact.h b/src/include/access/xact.h
index c18554bae2c..9f9dc7d3354 100644
--- a/src/include/access/xact.h
+++ b/src/include/access/xact.h
@@ -16,11 +16,11 @@
#include "access/transam.h"
#include "access/xlogreader.h"
+#include "datatype/timestamp.h"
#include "lib/stringinfo.h"
#include "nodes/pg_list.h"
#include "storage/relfilenode.h"
#include "storage/sinval.h"
-#include "utils/datetime.h"
/*
* Maximum size of Global Transaction ID (including '\0').
--
2.20.1
--------------2C164649926A2BC8A5FD8CB8
Content-Type: text/x-patch; charset=UTF-8;
name="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.patch"
Content-Transfer-Encoding: 7bit
Content-Disposition: attachment;
filename*0="0002-Mark-commit-and-abort-WAL-records-with-XLR_SPECIAL_R.pa";
filename*1="tch"
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Compile warnings in dbcommands.c building with meson
@ 2024-01-10 12:15 Aleksander Alekseev <[email protected]>
2024-01-11 17:00 ` Re: Compile warnings in dbcommands.c building with meson Magnus Hagander <[email protected]>
2024-01-15 05:00 ` Re: Compile warnings in dbcommands.c building with meson jian he <[email protected]>
0 siblings, 2 replies; 22+ messages in thread
From: Aleksander Alekseev @ 2024-01-10 12:15 UTC (permalink / raw)
To: Magnus Hagander <[email protected]>; +Cc: pgsql-hackers
Hi,
> When building current head on debian bullseye I get this compile warning:
>
> In file included from ../src/backend/commands/dbcommands.c:20:
> ../src/backend/commands/dbcommands.c: In function ‘createdb’:
> ../src/include/postgres.h:104:9: warning: ‘src_hasloginevt’ may be
> used uninitialized in this function [-Wmaybe-uninitialized]
> 104 | return (Datum) (X ? 1 : 0);
> | ^~~~~~~~~~~~~~~~~~~
> ../src/backend/commands/dbcommands.c:683:8: note: ‘src_hasloginevt’
> was declared here
> 683 | bool src_hasloginevt;
> | ^~~~~~~~~~~~~~~
>
>
> I only get this when building with meson, not when building with
> autotools. AFAICT, I have the same config:
>
> ./configure --enable-debug --enable-depend --with-python
> --enable-cassert --with-openssl --enable-tap-tests --with-icu
>
> vs
>
> meson setup build -Ddebug=true -Dpython=true -Dcassert=true
> -Dssl=openssl -Dtap-test=true -Dicu=enabled -Dnls=disabled
>
>
> in both cases the compiler is:
> gcc (Debian 10.2.1-6) 10.2.1 20210110
Seems to me that the compiler is not smart enough to process:
```
if (!get_db_info(dbtemplate, ShareLock,
&src_dboid, &src_owner, &src_encoding,
&src_istemplate, &src_allowconn, &src_hasloginevt,
&src_frozenxid, &src_minmxid, &src_deftablespace,
&src_collate, &src_ctype, &src_iculocale,
&src_icurules, &src_locprovider,
&src_collversion))
ereport(ERROR, ...
```
Should we just silence the warning like this - see attachment? I don't
think createdb() is called that often to worry about slight
performance change, if there is any.
--
Best regards,
Aleksander Alekseev
Attachments:
[application/octet-stream] v1-0001-Silence-compiler-warnings.patch (1.1K, ../../CAJ7c6TNz-qTd-_4YayUC4A-X4993aiobNZ=r7o2oh2n0PJvCnA@mail.gmail.com/2-v1-0001-Silence-compiler-warnings.patch)
download | inline diff:
From 098a99d1b9bc67a8ef4c4004bb8c081e87b94f38 Mon Sep 17 00:00:00 2001
From: Aleksander Alekseev <[email protected]>
Date: Wed, 10 Jan 2024 15:14:11 +0300
Subject: [PATCH v1] Silence compiler warnings
---
src/backend/commands/dbcommands.c | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/src/backend/commands/dbcommands.c b/src/backend/commands/dbcommands.c
index 0a97a11314..6cbdd5b360 100644
--- a/src/backend/commands/dbcommands.c
+++ b/src/backend/commands/dbcommands.c
@@ -679,12 +679,12 @@ createdb(ParseState *pstate, const CreatedbStmt *stmt)
char *src_icurules = NULL;
char src_locprovider = '\0';
char *src_collversion = NULL;
- bool src_istemplate;
- bool src_hasloginevt;
- bool src_allowconn;
+ bool src_istemplate = false;
+ bool src_hasloginevt = false;
+ bool src_allowconn = false;
TransactionId src_frozenxid = InvalidTransactionId;
MultiXactId src_minmxid = InvalidMultiXactId;
- Oid src_deftablespace;
+ Oid src_deftablespace = InvalidOid;
volatile Oid dst_deftablespace;
Relation pg_database_rel;
HeapTuple tuple;
--
2.43.0
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Compile warnings in dbcommands.c building with meson
2024-01-10 12:15 Re: Compile warnings in dbcommands.c building with meson Aleksander Alekseev <[email protected]>
@ 2024-01-11 17:00 ` Magnus Hagander <[email protected]>
1 sibling, 0 replies; 22+ messages in thread
From: Magnus Hagander @ 2024-01-11 17:00 UTC (permalink / raw)
To: Aleksander Alekseev <[email protected]>; +Cc: pgsql-hackers
On Wed, Jan 10, 2024 at 1:16 PM Aleksander Alekseev
<[email protected]> wrote:
>
> Hi,
>
> > When building current head on debian bullseye I get this compile warning:
> >
> > In file included from ../src/backend/commands/dbcommands.c:20:
> > ../src/backend/commands/dbcommands.c: In function ‘createdb’:
> > ../src/include/postgres.h:104:9: warning: ‘src_hasloginevt’ may be
> > used uninitialized in this function [-Wmaybe-uninitialized]
> > 104 | return (Datum) (X ? 1 : 0);
> > | ^~~~~~~~~~~~~~~~~~~
> > ../src/backend/commands/dbcommands.c:683:8: note: ‘src_hasloginevt’
> > was declared here
> > 683 | bool src_hasloginevt;
> > | ^~~~~~~~~~~~~~~
> >
> >
> > I only get this when building with meson, not when building with
> > autotools. AFAICT, I have the same config:
> >
> > ./configure --enable-debug --enable-depend --with-python
> > --enable-cassert --with-openssl --enable-tap-tests --with-icu
> >
> > vs
> >
> > meson setup build -Ddebug=true -Dpython=true -Dcassert=true
> > -Dssl=openssl -Dtap-test=true -Dicu=enabled -Dnls=disabled
> >
> >
> > in both cases the compiler is:
> > gcc (Debian 10.2.1-6) 10.2.1 20210110
>
> Seems to me that the compiler is not smart enough to process:
>
> ```
> if (!get_db_info(dbtemplate, ShareLock,
> &src_dboid, &src_owner, &src_encoding,
> &src_istemplate, &src_allowconn, &src_hasloginevt,
> &src_frozenxid, &src_minmxid, &src_deftablespace,
> &src_collate, &src_ctype, &src_iculocale,
> &src_icurules, &src_locprovider,
> &src_collversion))
> ereport(ERROR, ...
> ```
>
> Should we just silence the warning like this - see attachment? I don't
> think createdb() is called that often to worry about slight
> performance change, if there is any.
Certainly looks that way, but I'm curious as to why nobody else has seen this..
That said, it appears to be gone in current master. Even though
nothing changed in that file. Must've been some transient effect,
that somehow didn't get blown away by doing a clean....
--
Magnus Hagander
Me: https://www.hagander.net/
Work: https://www.redpill-linpro.com/
^ permalink raw reply [nested|flat] 22+ messages in thread
* Re: Compile warnings in dbcommands.c building with meson
2024-01-10 12:15 Re: Compile warnings in dbcommands.c building with meson Aleksander Alekseev <[email protected]>
@ 2024-01-15 05:00 ` jian he <[email protected]>
1 sibling, 0 replies; 22+ messages in thread
From: jian he @ 2024-01-15 05:00 UTC (permalink / raw)
To: Aleksander Alekseev <[email protected]>; +Cc: Magnus Hagander <[email protected]>; pgsql-hackers
Hi. one more feedback.
I tested the original repo setup, but it does not generate a warning
on my local setup.
meson setup --reconfigure ${BUILD} \
-Dprefix=${PG_PREFIX} \
-Dpgport=5463 \
-Dplpython=enabled \
-Dcassert=true \
-Dtap_tests=enabled \
-Dicu=enabled \
-Ddebug=true \
-Dnls=disabled
it generate warning, when I add -Dbuildtype=release :
meson setup --reconfigure ${BUILD} \
-Dprefix=${PG_PREFIX} \
-Dpgport=5463 \
-Dplpython=enabled \
-Dcassert=true \
-Dtap_tests=enabled \
-Dicu=enabled \
-Dbuildtype=release \
-Ddebug=true \
-Dnls=disabled
After applying the patch, the warning disappeared.
so it fixed the problem.
^ permalink raw reply [nested|flat] 22+ messages in thread
end of thread, other threads:[~2024-01-15 05:00 UTC | newest]
Thread overview: 22+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2024-01-10 12:15 Re: Compile warnings in dbcommands.c building with meson Aleksander Alekseev <[email protected]>
2024-01-11 17:00 ` Re: Compile warnings in dbcommands.c building with meson Magnus Hagander <[email protected]>
2024-01-15 05:00 ` Re: Compile warnings in dbcommands.c building with meson jian he <[email protected]>
This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox