agora inbox for [email protected]
help / color / mirror / Atom feedpgjdbc logical replication client throwing exception
41+ messages / 13 participants
[nested] [flat]
* pgjdbc logical replication client throwing exception
@ 2017-06-23 10:11 sanyam jain <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: sanyam jain @ 2017-06-23 10:11 UTC (permalink / raw)
To: pgsql-hackers
Hi,
I'm trying to create something like pg_recvlogical.c in java using pgjdbc.Its working for small transactions but when i do a big transaction client throws below exception:
org.postgresql.util.PSQLException: Database connection failed when reading from copy
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1028)
at org.postgresql.core.v3.CopyDualImpl.readFromCopy(CopyDualImpl.java:41)
at org.postgresql.core.v3.replication.V3PGReplicationStream.receiveNextData(V3PGReplicationStream.java:150)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readInternal(V3PGReplicationStream.java:119)
at org.postgresql.core.v3.replication.V3PGReplicationStream.readPending(V3PGReplicationStream.java:73)
at XLogApplier.main(XLogApplier.java:63)
Caused by: java.net.SocketException: Socket closed
at java.net.SocketInputStream.socketRead0(Native Method)
at java.net.SocketInputStream.read(SocketInputStream.java:152)
at java.net.SocketInputStream.read(SocketInputStream.java:122)
at org.postgresql.core.VisibleBufferedInputStream.readMore(VisibleBufferedInputStream.java:140)
at org.postgresql.core.VisibleBufferedInputStream.ensureBytes(VisibleBufferedInputStream.java:109)
at org.postgresql.core.VisibleBufferedInputStream.read(VisibleBufferedInputStream.java:191)
at org.postgresql.core.PGStream.receive(PGStream.java:495)
at org.postgresql.core.PGStream.receive(PGStream.java:479)
at org.postgresql.core.v3.QueryExecutorImpl.processCopyResults(QueryExecutorImpl.java:1161)
at org.postgresql.core.v3.QueryExecutorImpl.readFromCopy(QueryExecutorImpl.java:1026)
... 5 more
PG Server reports a broken pipe.
Can someone please tell what can be wrong?Its happening only when i add millions of rows.
Thanks,
Sanyam Jain
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: pgjdbc logical replication client throwing exception
@ 2017-06-23 18:37 Peter Eisentraut <[email protected]>
parent: sanyam jain <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: Peter Eisentraut @ 2017-06-23 18:37 UTC (permalink / raw)
To: sanyam jain <[email protected]>; pgsql-hackers
On 6/23/17 06:11, sanyam jain wrote:
> I'm trying to create something like pg_recvlogical.c in java using
> pgjdbc.Its working for small transactions but when i do a big
> transaction client throws below exception:
What does the server log say? If nothing interesting, turn up debugging.
--
Peter Eisentraut http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: pgjdbc logical replication client throwing exception
@ 2017-06-27 06:47 sanyam jain <[email protected]>
parent: Peter Eisentraut <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: sanyam jain @ 2017-06-27 06:47 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; pgsql-hackers
Hi,
>What does the server log say? If nothing interesting, turn up debugging.
I receive the following Log on server
LOG: could not send data to client: Broken pipe
Thanks,
Sanyam Jain
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: pgjdbc logical replication client throwing exception
@ 2017-06-27 13:51 sanyam jain <[email protected]>
parent: sanyam jain <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: sanyam jain @ 2017-06-27 13:51 UTC (permalink / raw)
To: Peter Eisentraut <[email protected]>; pgsql-hackers
Hi,
I suspect its happening because of delay in status update by client but even after trying forceUpdateStatus its quitting prematurely.
Thanks,
Sanyam Jain
________________________________
From: sanyam jain <[email protected]>
Sent: Tuesday, June 27, 2017 6:47:55 AM
To: Peter Eisentraut; Pg Hackers
Subject: Re: [HACKERS] pgjdbc logical replication client throwing exception
Hi,
>What does the server log say? If nothing interesting, turn up debugging.
I receive the following Log on server
LOG: could not send data to client: Broken pipe
Thanks,
Sanyam Jain
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: pgjdbc logical replication client throwing exception
@ 2017-09-01 08:42 dipesh <[email protected]>
parent: sanyam jain <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: dipesh @ 2017-09-01 08:42 UTC (permalink / raw)
To: pgsql-hackers
Hi,
I am also facing the same issue. Have you solved the problem?
Could you please guide me how to deal with it.
Thanks,
Dipesh
--
Sent from: http://www.postgresql-archive.org/PostgreSQL-hackers-f1928748.html
--
Sent via pgsql-hackers mailing list ([email protected])
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/21] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--jI8keyz6grp/JLjh
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* [PATCH 15/18] doc review for multiranges
@ 2021-01-24 03:02 Justin Pryzby <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Justin Pryzby @ 2021-01-24 03:02 UTC (permalink / raw)
6df7a9698bb036610c1e8c6d375e1be38cb26d5f
---
doc/src/sgml/extend.sgml | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/doc/src/sgml/extend.sgml b/doc/src/sgml/extend.sgml
index 6e3d82b85b..ec95b4eb01 100644
--- a/doc/src/sgml/extend.sgml
+++ b/doc/src/sgml/extend.sgml
@@ -448,7 +448,7 @@
of <type>anycompatible</type> and <type>anycompatiblenonarray</type>
inputs, the array element types of <type>anycompatiblearray</type>
inputs, the range subtypes of <type>anycompatiblerange</type> inputs,
- and the multirange subtypes of <type>anycompatiablemultirange</type>
+ and the multirange subtypes of <type>anycompatiblemultirange</type>
inputs. If <type>anycompatiblenonarray</type> is present then the
common type is required to be a non-array type. Once a common type is
identified, arguments in <type>anycompatible</type>
--
2.17.0
--lc9FT7cWel8HagAv
Content-Type: text/x-diff; charset=us-ascii
Content-Disposition: attachment;
filename="0016-doc-review-for-logical-decoding-of-prepared-xacts.patch"
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 17:55 Tom Lane <[email protected]>
0 siblings, 3 replies; 41+ messages in thread
From: Tom Lane @ 2023-02-22 17:55 UTC (permalink / raw)
To: Kirk Wolak <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
Kirk Wolak <[email protected]> writes:
> Proposal: Simply add the %T (PROMPT variable) to output the current time
> (HH24:MI:SS) into the prompt.
I'm not really convinced that %`date` isn't a usable solution for this,
especially since it seems like a very niche requirement. The next
person who wants it might well have a different desire than you
for exactly what gets shown. The output of date can be customized,
but a hard-wired prompt.c feature not so much.
On the whole I'd rather not eat more of the limited namespace for
psql prompt codes for this.
regards, tom lane
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 17:59 Nikolay Samokhvalov <[email protected]>
parent: Tom Lane <[email protected]>
2 siblings, 1 reply; 41+ messages in thread
From: Nikolay Samokhvalov @ 2023-02-22 17:59 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
On Wed, Feb 22, 2023 at 9:55 AM Tom Lane <[email protected]> wrote:
> On the whole I'd rather not eat more of the limited namespace for
> psql prompt codes for this.
>
It depends on personal preferences. When I work on a large screen, I can
afford to spend some characters in prompts, if it gives convenience – and
many do (looking, for example, at modern tmux/zsh prompts showing git
branch context, etc).
Default behavior might remain short – it wouldn't make sense to extend it
for everyone.
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:14 Heikki Linnakangas <[email protected]>
parent: Nikolay Samokhvalov <[email protected]>
0 siblings, 4 replies; 41+ messages in thread
From: Heikki Linnakangas @ 2023-02-22 18:14 UTC (permalink / raw)
To: Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; Kirk Wolak <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
On 22/02/2023 19:59, Nikolay Samokhvalov wrote:
> On Wed, Feb 22, 2023 at 9:55 AM Tom Lane <[email protected]
> <mailto:[email protected]>> wrote:
>
> On the whole I'd rather not eat more of the limited namespace for
> psql prompt codes for this.
>
>
> It depends on personal preferences. When I work on a large screen, I can
> afford to spend some characters in prompts, if it gives convenience –
> and many do (looking, for example, at modern tmux/zsh prompts showing
> git branch context, etc).
>
> Default behavior might remain short – it wouldn't make sense to extend
> it for everyone.
I have no objections to adding a %T option, although deciding what
format to use is a hassle. -1 for changing the default.
But let's look at the original request:
> This has been in sqlplus since I can remember, and I find it really
> useful when I forgot to time something, or to review for Time spent
> on a problem, or for how old my session is...
I've felt that pain too. You run a query, and it takes longer than I
expected. How long did it actually take? Too bad I didn't enable \timing
beforehand..
How about a new backslash command or psql variable to show how long the
previous statement took? Something like:
postgres=# select <unexpectedly slow query>
?column?
----------
123
(1 row)
postgres=# \time
Time: 14011.975 ms (00:14.012)
This would solve the "I forgot to time something" problem.
- Heikki
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:17 Daniel Gustafsson <[email protected]>
parent: Heikki Linnakangas <[email protected]>
3 siblings, 1 reply; 41+ messages in thread
From: Daniel Gustafsson @ 2023-02-22 18:17 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; +Cc: Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
> On 22 Feb 2023, at 19:14, Heikki Linnakangas <[email protected]> wrote:
> How about a new backslash command or psql variable to show how long the previous statement took? Something like:
>
> postgres=# select <unexpectedly slow query>
> ?column?
> ----------
> 123
> (1 row)
>
> postgres=# \time
>
> Time: 14011.975 ms (00:14.012)
>
> This would solve the "I forgot to time something" problem.
I don't have an opinion on adding a prompt option, but I've wanted this
(without realizing this was the format of it) many times.
--
Daniel Gustafsson
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:19 Pavel Stehule <[email protected]>
parent: Tom Lane <[email protected]>
2 siblings, 0 replies; 41+ messages in thread
From: Pavel Stehule @ 2023-02-22 18:19 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
Hi
st 22. 2. 2023 v 18:55 odesílatel Tom Lane <[email protected]> napsal:
> Kirk Wolak <[email protected]> writes:
> > Proposal: Simply add the %T (PROMPT variable) to output the current time
> > (HH24:MI:SS) into the prompt.
>
> I'm not really convinced that %`date` isn't a usable solution for this,
> especially since it seems like a very niche requirement. The next
> person who wants it might well have a different desire than you
> for exactly what gets shown. The output of date can be customized,
> but a hard-wired prompt.c feature not so much.
>
> On the whole I'd rather not eat more of the limited namespace for
> psql prompt codes for this.
>
Can we introduce some special syntax that allows using words (and maybe
some params)?
Regards
Pavel
>
> regards, tom lane
>
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:24 Pavel Stehule <[email protected]>
parent: Heikki Linnakangas <[email protected]>
3 siblings, 0 replies; 41+ messages in thread
From: Pavel Stehule @ 2023-02-22 18:24 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; +Cc: Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
st 22. 2. 2023 v 19:14 odesílatel Heikki Linnakangas <[email protected]>
napsal:
> On 22/02/2023 19:59, Nikolay Samokhvalov wrote:
> > On Wed, Feb 22, 2023 at 9:55 AM Tom Lane <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > On the whole I'd rather not eat more of the limited namespace for
> > psql prompt codes for this.
> >
> >
> > It depends on personal preferences. When I work on a large screen, I can
> > afford to spend some characters in prompts, if it gives convenience –
> > and many do (looking, for example, at modern tmux/zsh prompts showing
> > git branch context, etc).
> >
> > Default behavior might remain short – it wouldn't make sense to extend
> > it for everyone.
>
> I have no objections to adding a %T option, although deciding what
> format to use is a hassle. -1 for changing the default.
>
> But let's look at the original request:
>
> > This has been in sqlplus since I can remember, and I find it really
> > useful when I forgot to time something, or to review for Time spent
> > on a problem, or for how old my session is...
> I've felt that pain too. You run a query, and it takes longer than I
> expected. How long did it actually take? Too bad I didn't enable \timing
> beforehand..
>
> How about a new backslash command or psql variable to show how long the
> previous statement took? Something like:
>
> postgres=# select <unexpectedly slow query>
> ?column?
> ----------
> 123
> (1 row)
>
> postgres=# \time
>
> Time: 14011.975 ms (00:14.012)
>
> This would solve the "I forgot to time something" problem.
>
It is a good idea, unfortunately, it doesn't help with more commands. But
it is a nice idea, and can be implemented.
I am not sure if \time is best way - maybe we can display another runtime
data (when it will be possible, like io profile or queryid)
Regards
Pavel
>
> - Heikki
>
>
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:37 Kirk Wolak <[email protected]>
parent: Tom Lane <[email protected]>
2 siblings, 1 reply; 41+ messages in thread
From: Kirk Wolak @ 2023-02-22 18:37 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
On Wed, Feb 22, 2023 at 12:55 PM Tom Lane <[email protected]> wrote:
> Kirk Wolak <[email protected]> writes:
> > Proposal: Simply add the %T (PROMPT variable) to output the current time
> > (HH24:MI:SS) into the prompt.
>
> I'm not really convinced that %`date` isn't a usable solution for this,
> especially since it seems like a very niche requirement. The next
> person who wants it might well have a different desire than you
> for exactly what gets shown. The output of date can be customized,
> but a hard-wired prompt.c feature not so much.
>
> On the whole I'd rather not eat more of the limited namespace for
> psql prompt codes for this.
>
> regards, tom lane
>
Tom,
I totally respect where you are coming from, and you are rightfully the
big dog!
In reverse order. That limited namespace. I assume you mean the 52 alpha
characters, of which, we are using 7,
and this change would make it 8. Can we agree that at the current pace of
consumption it will be decades before
we get to 26, and they appear to be pretty well defended?
I already requested ONLY the HH24 format. 8 characters of output. no
options. It's a waste of time.
After all these years, sqlplus still has only one setting (show it, or
not). I am asking the same here.
And I will gladly defend not changing it! Ever!
I believe that leaves the real question:
Can't we just shell out? (which is what I do no, with issues as stated, and
a lot harder to do from memory if someplace new)
It's far easier in linux than windows to get what you want.
It's much more complicated if you try to use the same pgsqlrc file for
multiple environments and users.
We are talking about adding this much code, and consuming 1 of the
remaining 45 namespace items.
case 'T':
time_t current_time = time(NULL);
struct tm *tm_info = localtime(¤t_time);
sprintf(buf, "%02d:%02d:%02d", tm_info->tm_hour,
tm_info->tm_min, tm_info->tm_sec);
break;
Does this help my case at all?
If I crossed any lines, it's not my intention. I was tired of dealing with
this, and helping others to set it up.
With Respect,
Kirk
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 18:42 Kirk Wolak <[email protected]>
parent: Heikki Linnakangas <[email protected]>
3 siblings, 0 replies; 41+ messages in thread
From: Kirk Wolak @ 2023-02-22 18:42 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; +Cc: Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
On Wed, Feb 22, 2023 at 1:14 PM Heikki Linnakangas <[email protected]> wrote:
> On 22/02/2023 19:59, Nikolay Samokhvalov wrote:
> > On Wed, Feb 22, 2023 at 9:55 AM Tom Lane <[email protected]
> > <mailto:[email protected]>> wrote:
> >
> > On the whole I'd rather not eat more of the limited namespace for
> > psql prompt codes for this.
> >
> >
> > It depends on personal preferences. When I work on a large screen, I can
> > afford to spend some characters in prompts, if it gives convenience –
> > and many do (looking, for example, at modern tmux/zsh prompts showing
> > git branch context, etc).
> >
> > Default behavior might remain short – it wouldn't make sense to extend
> > it for everyone.
>
> I have no objections to adding a %T option, although deciding what
> format to use is a hassle. -1 for changing the default.
>
> But let's look at the original request:
>
> > This has been in sqlplus since I can remember, and I find it really
> > useful when I forgot to time something, or to review for Time spent
> > on a problem, or for how old my session is...
> I've felt that pain too. You run a query, and it takes longer than I
> expected. How long did it actually take? Too bad I didn't enable \timing
> beforehand..
>
> How about a new backslash command or psql variable to show how long the
> previous statement took? Something like:
>
> postgres=# select <unexpectedly slow query>
> ?column?
> ----------
> 123
> (1 row)
>
> postgres=# \time
>
> Time: 14011.975 ms (00:14.012)
>
> This would solve the "I forgot to time something" problem.
>
> - Heikki
>
> TBH, I have that turned on by default. Load a script. Have 300 of those
lines, and tell me how long it took?
In my case, it's much easier. The other uses cases, including noticing I
changed some configuration and I
should reconnect (because I use multiple sessions, and I am in the early
stages with lots of changes).
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-22 19:42 Nathan Bossart <[email protected]>
parent: Daniel Gustafsson <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Nathan Bossart @ 2023-02-22 19:42 UTC (permalink / raw)
To: Daniel Gustafsson <[email protected]>; +Cc: Heikki Linnakangas <[email protected]>; Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
On Wed, Feb 22, 2023 at 07:17:37PM +0100, Daniel Gustafsson wrote:
>> On 22 Feb 2023, at 19:14, Heikki Linnakangas <[email protected]> wrote:
>
>> How about a new backslash command or psql variable to show how long the previous statement took? Something like:
>>
>> postgres=# select <unexpectedly slow query>
>> ?column?
>> ----------
>> 123
>> (1 row)
>>
>> postgres=# \time
>>
>> Time: 14011.975 ms (00:14.012)
>>
>> This would solve the "I forgot to time something" problem.
>
> I don't have an opinion on adding a prompt option, but I've wanted this
> (without realizing this was the format of it) many times.
+1
--
Nathan Bossart
Amazon Web Services: https://aws.amazon.com
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-02-23 11:20 Peter Eisentraut <[email protected]>
parent: Heikki Linnakangas <[email protected]>
3 siblings, 0 replies; 41+ messages in thread
From: Peter Eisentraut @ 2023-02-23 11:20 UTC (permalink / raw)
To: Heikki Linnakangas <[email protected]>; Nikolay Samokhvalov <[email protected]>; Tom Lane <[email protected]>; Kirk Wolak <[email protected]>; +Cc: PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>
On 22.02.23 19:14, Heikki Linnakangas wrote:
> How about a new backslash command or psql variable to show how long the
> previous statement took? Something like:
If you don't have \timing turned on before the query starts, psql won't
record what the time was before the query, so you can't compute the run
time afterwards. This kind of feature would only work if you always
take the start time, even if \timing is turned off.
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-04-09 01:24 Greg Stark <[email protected]>
parent: Kirk Wolak <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: Greg Stark @ 2023-04-09 01:24 UTC (permalink / raw)
To: Kirk Wolak <[email protected]>; +Cc: Tom Lane <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
On Wed, 22 Feb 2023 at 13:38, Kirk Wolak <[email protected]> wrote:
>
> I already requested ONLY the HH24 format. 8 characters of output. no options. It's a waste of time.
> After all these years, sqlplus still has only one setting (show it, or not). I am asking the same here.
> And I will gladly defend not changing it! Ever!
Yeah, well, it's kind of beside the point that you're satisfied with
this one format. We tend to think about what all users would expect
and what a complete feature would look like.
I actually tend to think this would be a nice feature. It's telling
that log files and other tracing tools tend to produce exactly this
type of output with every line prefixed with either a relative or
absolute timestamp.
I'm not sure if the *prompt* is a sensible place for it though. The
place it seems like it would be most useful is reading the output of
script executions where there would be no prompts. Perhaps it's the
command tags and \echo statements that should be timestamped.
And I think experience shows that there are three reasonable formats
for dates, the default LC_TIME format, ISO8601, and a relative
"seconds (with milliseconds) since starting". I think having a feature
that doesn't support those three would feel incomplete and eventually
need to be finished.
--
greg
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-04-09 01:54 Tom Lane <[email protected]>
parent: Greg Stark <[email protected]>
0 siblings, 1 reply; 41+ messages in thread
From: Tom Lane @ 2023-04-09 01:54 UTC (permalink / raw)
To: Greg Stark <[email protected]>; +Cc: Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; Pavel Stehule <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
Greg Stark <[email protected]> writes:
> I'm not sure if the *prompt* is a sensible place for it though. The
> place it seems like it would be most useful is reading the output of
> script executions where there would be no prompts. Perhaps it's the
> command tags and \echo statements that should be timestamped.
Hmm, that is an interesting idea. I kind of like it, not least because
it eliminates most of the tension between wanting a complete timestamp
and wanting a short prompt. Command tags are short enough that there's
plenty of room.
> And I think experience shows that there are three reasonable formats
> for dates, the default LC_TIME format, ISO8601, and a relative
> "seconds (with milliseconds) since starting". I think having a feature
> that doesn't support those three would feel incomplete and eventually
> need to be finished.
Yeah, I don't believe that one timestamp format is going to satisfy
everyone. But that was especially true when trying to wedge it
into the prompt, where the need for brevity adds more constraints.
regards, tom lane
^ permalink raw reply [nested|flat] 41+ messages in thread
* Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has)
@ 2023-04-09 04:16 Pavel Stehule <[email protected]>
parent: Tom Lane <[email protected]>
0 siblings, 0 replies; 41+ messages in thread
From: Pavel Stehule @ 2023-04-09 04:16 UTC (permalink / raw)
To: Tom Lane <[email protected]>; +Cc: Greg Stark <[email protected]>; Kirk Wolak <[email protected]>; PostgreSQL Hackers <[email protected]>; [email protected]; Laurenz Albe <[email protected]>; [email protected]
ne 9. 4. 2023 v 3:54 odesílatel Tom Lane <[email protected]> napsal:
> Greg Stark <[email protected]> writes:
> > I'm not sure if the *prompt* is a sensible place for it though. The
> > place it seems like it would be most useful is reading the output of
> > script executions where there would be no prompts. Perhaps it's the
> > command tags and \echo statements that should be timestamped.
>
> Hmm, that is an interesting idea. I kind of like it, not least because
> it eliminates most of the tension between wanting a complete timestamp
> and wanting a short prompt. Command tags are short enough that there's
> plenty of room.
>
I don't agree so there is a common request for a short prompt. Usually I
use four terminals on screen, and still my terminal has a width of 124
characters (and I use relatively small display of my Lenovo T520). Last
years I use prompt like:
(2023-04-09 06:08:30) postgres=# select 1;
┌──────────┐
│ ?column? │
╞══════════╡
│ 1 │
└──────────┘
(1 row)
and it is working. Nice thing when I paste the timestamp in examples. I
have not any problems with prompt width
Regards
Pavel
^ permalink raw reply [nested|flat] 41+ messages in thread
end of thread, other threads:[~2023-04-09 04:16 UTC | newest]
Thread overview: 41+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2017-06-23 10:11 pgjdbc logical replication client throwing exception sanyam jain <[email protected]>
2017-06-23 18:37 ` Peter Eisentraut <[email protected]>
2017-06-27 06:47 ` sanyam jain <[email protected]>
2017-06-27 13:51 ` sanyam jain <[email protected]>
2017-09-01 08:42 ` dipesh <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/21] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2021-01-24 03:02 [PATCH 15/18] doc review for multiranges Justin Pryzby <[email protected]>
2023-02-22 17:55 Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Tom Lane <[email protected]>
2023-02-22 17:59 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Nikolay Samokhvalov <[email protected]>
2023-02-22 18:14 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Heikki Linnakangas <[email protected]>
2023-02-22 18:17 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Daniel Gustafsson <[email protected]>
2023-02-22 19:42 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Nathan Bossart <[email protected]>
2023-02-22 18:24 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Pavel Stehule <[email protected]>
2023-02-22 18:42 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Kirk Wolak <[email protected]>
2023-02-23 11:20 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Peter Eisentraut <[email protected]>
2023-02-22 18:19 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Pavel Stehule <[email protected]>
2023-02-22 18:37 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Kirk Wolak <[email protected]>
2023-04-09 01:24 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Greg Stark <[email protected]>
2023-04-09 01:54 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Tom Lane <[email protected]>
2023-04-09 04:16 ` Re: Proposal: %T Prompt parameter for psql for current time (like Oracle has) Pavel Stehule <[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