public inbox for [email protected]
help / color / mirror / Atom feedVOPS-2.0
25+ messages / 5 participants
[nested] [flat]
* VOPS-2.0
@ 2018-11-28 10:01 Konstantin Knizhnik <[email protected]>
2018-11-28 13:18 ` Re: VOPS-2.0 Bruce Momjian <[email protected]>
0 siblings, 1 reply; 25+ messages in thread
From: Konstantin Knizhnik @ 2018-11-28 10:01 UTC (permalink / raw)
To: [email protected]
Hi,
I want to introduce new version of VOPS extension for Postgres
(vectorized operations) providing new, more convenient way of usage:
auto-substitution of projections.
The idea of VOPS was to use special vector (tile) types instead of
standard scalar types, i.e. vops_float8 instead of float8.
Such vector types implement all standard arithmetic operators and make
it possible to use them in queries almost in the same way as scalar types.
But each such operator or aggregate function proceed hundred of values,
minimizing interpretation overhead of Postgres executor.
This is why VOPS provides more than ten times performance improvement
for analytic queries performing filtering and aggregation (like Q1/Q6
TPC-H queries).
It was possible to create VOPS tables explicitly but now VOPS provides
much more convenient way: VOPS projections.
It is assumed that data is stored in normal Postgres table and user can
define one or more projections of this table (as in Vertica).
Each projection consists of some subset of attributes of original table
and some of this attributes preserve the attribute type of original table
(them are referred as "scalar attributes"), while other use instead
correspondent VOPS types ("vector attributes").
Scalar attributes of projection can be used for sorting, grouping or
joining. Vector attributes can be used in where clause and in target
list (including aggregate functions).
The main main advantage of new version of VOPS is that it allows to
automatically substitute queries to original table with queries to one
of its projections.
So client should not know about presence of VOPS projection and somehow
change used queries.
VOPS projections are created using create_projection() function which
specifies list of vector and scalar attributes:
select
create_projection('vops_lineitem','lineitem',array['l_shipdate','l_quantity','l_extendedprice','l_discount','l_tax'],array['l_returnflag','l_linestatus']);
In future may be "CREATE PROJECTION..." clause will be supported, but it
requires changes in PostgreSQL core and can't be implemented at
extension level.
If "vops.auto_substitute_projections" option is set to true, then parse
hook installed by VOPS tries all projections defined for the table
and if original table can be substituted by one of this projections,
then alternative query is executed.
By default "vops.auto_substitute_projections" is switched off, because
VOPS doesn't enforce consistency of projections with original table.
As with materialized view, refresh of projections should by done
manually by user. Certainly it is possible to do it using triggers, but
it will be very inefficient:
only bulk updates can provide good update and select performance.
create_projection(XXX) generates XXX_refresh() function which can be
used to periodically update the projection.
VOPS supports all version of Postgres starting from 10.0 and can be
downloaded from github repository:
https://github.com/postgrespro/vops.git
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: VOPS-2.0
2018-11-28 10:01 VOPS-2.0 Konstantin Knizhnik <[email protected]>
@ 2018-11-28 13:18 ` Bruce Momjian <[email protected]>
2018-11-28 13:45 ` Re: VOPS-2.0 Alvaro Herrera <[email protected]>
2018-11-28 13:56 ` Re: VOPS-2.0 Konstantin Knizhnik <[email protected]>
0 siblings, 2 replies; 25+ messages in thread
From: Bruce Momjian @ 2018-11-28 13:18 UTC (permalink / raw)
To: Konstantin Knizhnik <[email protected]>; +Cc: pgsql-hackers
On Wed, Nov 28, 2018 at 01:01:03PM +0300, Konstantin Knizhnik wrote:
> Hi,
>
> I want to introduce new version of VOPS extension for Postgres (vectorized
> operations) providing new, more convenient way of usage:
> auto-substitution of projections.
[Announce post moved to hackers.]
I remember the good performance numbers from this feature. How does
this interact with the JIT executor feature, which is also designed to
speed up the executor? Is it something that can be combined with JIT?
--
Bruce Momjian <[email protected]> http://momjian.us
EnterpriseDB http://enterprisedb.com
+ As you are, so once was I. As I am, so you will be. +
+ Ancient Roman grave inscription +
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: VOPS-2.0
2018-11-28 10:01 VOPS-2.0 Konstantin Knizhnik <[email protected]>
2018-11-28 13:18 ` Re: VOPS-2.0 Bruce Momjian <[email protected]>
@ 2018-11-28 13:45 ` Alvaro Herrera <[email protected]>
2018-11-28 14:08 ` Re: VOPS-2.0 Konstantin Knizhnik <[email protected]>
1 sibling, 1 reply; 25+ messages in thread
From: Alvaro Herrera @ 2018-11-28 13:45 UTC (permalink / raw)
To: Bruce Momjian <[email protected]>; +Cc: Konstantin Knizhnik <[email protected]>; pgsql-hackers
On 2018-Nov-28, Bruce Momjian wrote:
> On Wed, Nov 28, 2018 at 01:01:03PM +0300, Konstantin Knizhnik wrote:
> > Hi,
> >
> > I want to introduce new version of VOPS extension for Postgres (vectorized
> > operations) providing new, more convenient way of usage:
> > auto-substitution of projections.
>
> [Announce post moved to hackers.]
>
> I remember the good performance numbers from this feature. How does
> this interact with the JIT executor feature, which is also designed to
> speed up the executor? Is it something that can be combined with JIT?
ISTM that VOPS is a temporary hack that we'll need to include in some
form eventually, but that basing it on top of pluggable storage would be
a better way forward than the current proposal.
--
Álvaro Herrera https://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: VOPS-2.0
2018-11-28 10:01 VOPS-2.0 Konstantin Knizhnik <[email protected]>
2018-11-28 13:18 ` Re: VOPS-2.0 Bruce Momjian <[email protected]>
2018-11-28 13:45 ` Re: VOPS-2.0 Alvaro Herrera <[email protected]>
@ 2018-11-28 14:08 ` Konstantin Knizhnik <[email protected]>
0 siblings, 0 replies; 25+ messages in thread
From: Konstantin Knizhnik @ 2018-11-28 14:08 UTC (permalink / raw)
To: Alvaro Herrera <[email protected]>; Bruce Momjian <[email protected]>; +Cc: pgsql-hackers
On 28.11.2018 16:45, Alvaro Herrera wrote:
> On 2018-Nov-28, Bruce Momjian wrote:
>
>> On Wed, Nov 28, 2018 at 01:01:03PM +0300, Konstantin Knizhnik wrote:
>>> Hi,
>>>
>>> I want to introduce new version of VOPS extension for Postgres (vectorized
>>> operations) providing new, more convenient way of usage:
>>> auto-substitution of projections.
>> [Announce post moved to hackers.]
>>
>> I remember the good performance numbers from this feature. How does
>> this interact with the JIT executor feature, which is also designed to
>> speed up the executor? Is it something that can be combined with JIT?
> ISTM that VOPS is a temporary hack that we'll need to include in some
> form eventually, but that basing it on top of pluggable storage would be
> a better way forward than the current proposal.
>
I am not sure that pluggable storage API will solve all problems.
Right now there are the following challenges with VOPS:
1. Provide convenient way of defining projections for user: not doable
now at extension level.
2. Vector executor: in principle it is possible to reimplement all (or
most) nodes to use vector operations and somehow make optimizer to
generate them. But it requires huge amount of work. And I am not sure
that all can be done et extension level just by defining new custom nodes.
3. Update projections. It can be efficiently done only using bulk
inserts, but it means that projections are not up-to-date with original
table. Hiding internals inside pluggable storage doesn't automatically
solve this problem.
Actually VOPS approach has least of all problems with storage layer,
because VOPS projections are stored as normal Postgres tables.
The main challenge is incorporating vector operations in executor.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 25+ messages in thread
* Re: VOPS-2.0
2018-11-28 10:01 VOPS-2.0 Konstantin Knizhnik <[email protected]>
2018-11-28 13:18 ` Re: VOPS-2.0 Bruce Momjian <[email protected]>
@ 2018-11-28 13:56 ` Konstantin Knizhnik <[email protected]>
1 sibling, 0 replies; 25+ messages in thread
From: Konstantin Knizhnik @ 2018-11-28 13:56 UTC (permalink / raw)
To: Bruce Momjian <[email protected]>; +Cc: pgsql-hackers
On 28.11.2018 16:18, Bruce Momjian wrote:
> On Wed, Nov 28, 2018 at 01:01:03PM +0300, Konstantin Knizhnik wrote:
>> Hi,
>>
>> I want to introduce new version of VOPS extension for Postgres (vectorized
>> operations) providing new, more convenient way of usage:
>> auto-substitution of projections.
> [Announce post moved to hackers.]
>
> I remember the good performance numbers from this feature. How does
> this interact with the JIT executor feature, which is also designed to
> speed up the executor? Is it something that can be combined with JIT?
>
JIT and vector execution are more or less alternative solutions of the
same problem: eliminate interpretation overhead.
In JIT it was done be replacing interpretation with native code execution.
In VOPS - by processing more elements by each operation.
This is the implementation of binary operations in VOPS:
PG_FUNCTION_INFO_V1(vops_##TYPE##_##OP); \
Datum vops_##TYPE##_##OP(PG_FUNCTION_ARGS) \
{ \
vops_##TYPE* left = (vops_##TYPE*)PG_GETARG_POINTER(0); \
vops_##TYPE* right = (vops_##TYPE*)PG_GETARG_POINTER(1); \
vops_##TYPE* result = (vops_##TYPE*)palloc(sizeof(vops_##TYPE));\
int i; \
for (i = 0; i < TILE_SIZE; i++) result->payload[i] =
left->payload[i] COP right->payload[i]; \
So it is just loop through TILE_SIZE elements (128 by default) for which
compiler generates optimal code.
Interpretation overhead is not eliminate but is divided by 128.
In principle this two approaches can be combined (as it was done for
example in HyPer).
But practically, at least for expressions evaluation is has not so much
sense.
Because code generated by compiler for vector function mentioned above
at better (or at least not worser) than one generated by LLVM.
And 100 times reduced interpretation overhead is not noticeable.
Concerning results: now Postgres with JIT is executing Q1 about 30%
faster than without JIT.
VOPS is executing Q1 about 10 times faster.
--
Konstantin Knizhnik
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
^ permalink raw reply [nested|flat] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ 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; 25+ 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] 25+ messages in thread
* Fix documentation for max_wal_size and min_wal_size
@ 2023-04-13 19:01 sirisha chamarthi <[email protected]>
0 siblings, 0 replies; 25+ messages in thread
From: sirisha chamarthi @ 2023-04-13 19:01 UTC (permalink / raw)
To: PostgreSQL Developers <[email protected]>
Hi,
The documentation [1] says max_wal_size and min_wal_size defaults are 1GB
and 80 MB respectively. However, these are configured based on the
wal_segment_size and documentation is not clear about it. Attached a patch
to fix the documentation.
[1] https://www.postgresql.org/docs/devel/runtime-config-wal.html
Thanks,
Sirisha
Attachments:
[application/octet-stream] 0001-Fix-documentation-for-max_wal_size-and-min_wal_size-.patch (1.6K, ../../CAKrAKeVT5AQr=kQYrU_ULkC9RjbAa3s5uPVsZypqCO7ZxJQ0cg@mail.gmail.com/3-0001-Fix-documentation-for-max_wal_size-and-min_wal_size-.patch)
download | inline diff:
From 8d740a34a626842ec9e89a0289c5a35f3847ad48 Mon Sep 17 00:00:00 2001
From: root <[email protected]>
Date: Thu, 13 Apr 2023 18:46:55 +0000
Subject: [PATCH] Fix documentation for max_wal_size and min_wal_size default
size
---
doc/src/sgml/config.sgml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml
index f81c2045ec..9f2b9b5580 100644
--- a/doc/src/sgml/config.sgml
+++ b/doc/src/sgml/config.sgml
@@ -3589,7 +3589,7 @@ include_dir 'conf.d'
heavy load, a failing <varname>archive_command</varname> or <varname>archive_library</varname>, or a high
<varname>wal_keep_size</varname> setting.
If this value is specified without units, it is taken as megabytes.
- The default is 1 GB.
+ The default value is configured to maximum of 64 times the <varname>wal_segment_size</varname> or 1 GB.
Increasing this parameter can increase the amount of time needed for
crash recovery.
This parameter can only be set in the <filename>postgresql.conf</filename>
@@ -3612,7 +3612,7 @@ include_dir 'conf.d'
handle spikes in WAL usage, for example when running large batch
jobs.
If this value is specified without units, it is taken as megabytes.
- The default is 80 MB.
+ The default value is configured to maximum of 5 times the <varname>wal_segment_size</varname> or 80 MB.
This parameter can only be set in the <filename>postgresql.conf</filename>
file or on the server command line.
</para>
--
2.25.1
^ permalink raw reply [nested|flat] 25+ messages in thread
end of thread, other threads:[~2023-04-13 19:01 UTC | newest]
Thread overview: 25+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-11-28 10:01 VOPS-2.0 Konstantin Knizhnik <[email protected]>
2018-11-28 13:18 ` Bruce Momjian <[email protected]>
2018-11-28 13:45 ` Alvaro Herrera <[email protected]>
2018-11-28 14:08 ` Konstantin Knizhnik <[email protected]>
2018-11-28 13:56 ` Konstantin Knizhnik <[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]>
2020-08-12 20:07 [PATCH 1/2] Make xact.h usable in frontend. Heikki Linnakangas <[email protected]>
2023-04-13 19:01 Fix documentation for max_wal_size and min_wal_size sirisha chamarthi <[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