Re: psql - add SHOW_ALL_RESULTS option

2022-01-03 Thread Fabien COELHO
Hello Peter, With this "voluntary crash", the regression test output is now psql ... ok (test process exited with exit code 2) 281 ms Normally, I'd expect this during development if there was a crash somewhere, but showing this during a normal run now,

Re: Per-table storage parameters for TableAM/IndexAM extensions

2022-01-03 Thread Rushabh Lathia
On Wed, Dec 29, 2021 at 10:38 PM Sadhuprasad Patro wrote: > Hi, > > Currently all the storage options for a table are very much specific > to the heap but a different AM might need some user defined AM > specific parameters to help tune the AM. So here is a patch which > provides an AM level rout

Re: row filtering for logical replication

2022-01-03 Thread Peter Smith
On Fri, Dec 31, 2021 at 12:39 AM houzj.f...@fujitsu.com wrote: > > On Wed, Dec 29, 2021 11:16 AM Tang, Haiying wrote: > > On Mon, Dec 27, 2021 9:16 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Thur, Dec 23, 2021 4:28 PM Peter Smith wrote: > > > > Here is the v54* patch set: > > > > > > A

Re: psql: \dl+ to list large objects privileges

2022-01-03 Thread Justin Pryzby
On Tue, Aug 31, 2021 at 05:14:12PM +0300, Pavel Luzanov wrote: > I decided to move the do_lo_list function to describe.c in order to use the > printACLColumn helper function. And at the same time I renamed do_lo_list to > listLargeObjects to unify with the names of other similar functions. The tab

Re: Inconsistent ellipsis in regression test error message?

2022-01-03 Thread Peter Smith
On Tue, Dec 28, 2021 at 4:34 AM Tom Lane wrote: > > Peter Smith writes: > > The most recent cfbot run for a patch I am interested in has failed a > > newly added regression test. > > Please see http://cfbot.cputube.org/ for 36/2906 > > The failure logs [2] are very curious because the error messa

Re: Allow escape in application_name

2022-01-03 Thread Kyotaro Horiguchi
At Tue, 4 Jan 2022 12:36:32 +0900, Masahiko Sawada wrote in > On Tue, Jan 4, 2022 at 12:05 PM Kyotaro Horiguchi > wrote: > > pg_terminate_backend returns just after kill() returns. So I'm afraid > > that there's a case where the next access to ft6 happens before the > > old connection actually

Re: row filtering for logical replication

2022-01-03 Thread Peter Smith
On Mon, Dec 27, 2021 at 9:57 AM Euler Taveira wrote: > > On Sun, Dec 26, 2021, at 1:09 PM, Alvaro Herrera wrote: > > On 2021-Dec-26, Euler Taveira wrote: > > > On Sat, Dec 25, 2021, at 1:20 AM, Amit Kapila wrote: > > > On Fri, Dec 24, 2021 at 11:04 AM Peter Smith > > > wrote: > > > > > > > > So,

Re: row filtering for logical replication

2022-01-03 Thread Peter Smith
On Thu, Dec 30, 2021 at 7:57 PM wangw.f...@fujitsu.com wrote: > > On Mon, Dec 28, 2021 9:03 PM houzj.f...@fujitsu.com > wrote: > > Attach a top up patch 0004 which did the above changes. > > A few comments about v55-0001 and v55-0002. ... > v55-0002 > In function pgoutput_row_filter_init, I foun

Re: why does reindex invalidate relcache without modifying system tables

2022-01-03 Thread wenjing zeng
> 2021年12月27日 23:54,Tom Lane 写道: > > wenjing zeng writes: >> I found that in the index_update_stats function, i.e. the CREATE >> INDEX/REINDEX/Truncate INDEX process, >> relchche is invalidated whether the index information is updated. I want to >> know why you're did this > > Did you read

Re: Allow escape in application_name

2022-01-03 Thread Masahiko Sawada
On Tue, Jan 4, 2022 at 12:05 PM Kyotaro Horiguchi wrote: > > At Wed, 29 Dec 2021 10:34:31 +0900, Masahiko Sawada > wrote in > > On Tue, Dec 28, 2021 at 3:29 PM Fujii Masao > > wrote: > > > > > > > > > > > > On 2021/12/28 9:32, Masahiko Sawada wrote: > > > > Doesn't this query return 64? So the

Re: [HACKERS] logical decoding of two-phase transactions

2022-01-03 Thread Masahiko Sawada
Hi, On Mon, Aug 9, 2021 at 12:00 PM Amit Kapila wrote: > > On Wed, Aug 4, 2021 at 4:14 PM Amit Kapila wrote: > > > > I have pushed this last patch in the series. > > > > I have closed this CF entry. Thanks to everyone involved in this work! > I have a questoin about two_phase column of pg_repli

Re: Allow escape in application_name

2022-01-03 Thread Kyotaro Horiguchi
At Wed, 29 Dec 2021 10:34:31 +0900, Masahiko Sawada wrote in > On Tue, Dec 28, 2021 at 3:29 PM Fujii Masao > wrote: > > > > > > > > On 2021/12/28 9:32, Masahiko Sawada wrote: > > > Doesn't this query return 64? So the expression "substring(str for > > > (SELECT max_identifier_length FROM pg_co

Re: ICU for global collation

2022-01-03 Thread Julien Rouhaud
Hi, On Thu, Dec 30, 2021 at 01:07:21PM +0100, Peter Eisentraut wrote: > > So this is a different approach: If you choose ICU as the default locale for > a database, you still need to specify lc_ctype and lc_collate settings, as > before. Unlike in the previous patch, where the ICU collation name

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-01-03 Thread Kyotaro Horiguchi
At Tue, 28 Dec 2021 08:26:28 +0530, Bharath Rupireddy wrote in > On Fri, Dec 24, 2021 at 5:54 PM Bharath Rupireddy > wrote: > > > > On Fri, Dec 24, 2021 at 5:42 PM Michael Paquier wrote: > > > > > > On Fri, Dec 24, 2021 at 02:51:34PM +0900, Kyotaro Horiguchi wrote: > > > > I thougt about somet

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-01-03 Thread Melanie Plageman
On Thu, Dec 30, 2021 at 3:30 PM Melanie Plageman wrote: > > On Tue, Dec 21, 2021 at 8:32 PM Melanie Plageman > wrote: > > On Thu, Dec 16, 2021 at 3:18 PM Andres Freund wrote: > > > > > > From 9f22da9041e1e1fbc0ef003f5f78f4e72274d438 Mon Sep 17 00:00:00 > > > > > > 2001 > > > > > > From: Melanie

Re: more descriptive message for process termination due to max_slot_wal_keep_size

2022-01-03 Thread Kyotaro Horiguchi
At Fri, 24 Dec 2021 20:23:29 +0900, Masahiko Sawada wrote in > On Fri, Dec 24, 2021 at 5:30 PM Kyotaro Horiguchi > wrote: > > Right. But I believe the two are not assumed to be used at once. One > > can set wal_keep_size larger than max_slot_wal_keep_size but it is > > actually a kind of ill se

Re: An obsolete comment of pg_stat_statements

2022-01-03 Thread Kyotaro Horiguchi
At Mon, 3 Jan 2022 17:36:25 +0900, Michael Paquier wrote in > On Fri, Dec 24, 2021 at 09:02:10PM +0900, Michael Paquier wrote: > > Do we really need to have this comment in the function header? The > > same is explained a couple of lines down so this feels like a > > duplicate, and it is hard t

Re: [PoC] Delegating pg_ident to a third party

2022-01-03 Thread Stephen Frost
Greetings, * Jacob Champion (pchamp...@vmware.com) wrote: > On Mon, 2022-01-03 at 12:36 -0500, Stephen Frost wrote: > > * Jacob Champion (pchamp...@vmware.com) wrote: > > > On Fri, 2021-12-17 at 10:06 +0100, Peter Eisentraut wrote: > > > > On 17.12.21 00:48, Jacob Champion wrote: > > > > > WDYT? (

Re: What does RIR as in fireRIRrules stand for?

2022-01-03 Thread Tom Lane
fred yin writes: > I found this thread when trying to understand what RIR means in the source > code. The explanation by Andres (which I find informative) is not in the > code. Should we add it into the comment? I think it will be useful for > readability. There's this at the top of rewriteHandle

Re: What does RIR as in fireRIRrules stand for?

2022-01-03 Thread fred yin
I found this thread when trying to understand what RIR means in the source code. The explanation by Andres (which I find informative) is not in the code. Should we add it into the comment? I think it will be useful for readability. Best, Yue On Mon, Jan 3, 2022 at 5:26 PM Andres Freund wrote: >

Re: Bug fix for tab completion of ALTER TABLE ... VALIDATE CONSTRAINT ...

2022-01-03 Thread Tom Lane
Aleksander Alekseev writes: > The cfbot seems to be happy with the updated patch. > The new status of this patch is: Ready for Committer Pushed. regards, tom lane

Re: Accessing fields past CATALOG_VARLEN

2022-01-03 Thread Tom Lane
Ed Behn writes: > I can get fields like procStruct->prokind and procStruct->proretset. > However, I get a compiler error when I try to access procStruct->proargmodes. > I know that this is because this field is in the CATALOG_VARLEN block which > makes it invisible to the compiler. > What is the p

Re: Accessing fields past CATALOG_VARLEN

2022-01-03 Thread Chapman Flack
On 01/03/22 17:23, Ed Behn wrote: > However, I get a compiler error when I try to access procStruct->proargmodes. > I know that this is because this field is in the CATALOG_VARLEN block which > makes it invisible to the compiler. > > What is the proper way to get this field? You can use SysCacheG

Re: SKIP LOCKED assert triggered

2022-01-03 Thread Alvaro Herrera
On 2021-Dec-01, Simon Riggs wrote: > On Wed, 1 Dec 2021 at 14:33, Bossart, Nathan wrote: > > > > On 11/12/21, 8:56 AM, "Simon Riggs" wrote: > > > The combination of these two statements in a transaction hits an > > > Assert in heapam.c at line 4770 on REL_14_STABLE > > > > I've been unable to re

Accessing fields past CATALOG_VARLEN

2022-01-03 Thread Ed Behn
I'm trying to write a C-language function to be compiled into a shared module to be loaded by Postgres. In it, I have the OID of a function and I need to get information from the pg_proc table. So far, I have: HeapTuple procTuple; > Form_pg_proc procStruct; > procTuple = SearchSysCache1(PROCOID

Re: CREATEROLE and role ownership hierarchies

2022-01-03 Thread Andrew Dunstan
On 12/23/21 16:06, Joshua Brindle wrote: > On Tue, Dec 21, 2021 at 8:26 PM Mark Dilger > wrote: >> >> >>> On Dec 21, 2021, at 5:11 PM, Shinya Kato >>> wrote: >>> >>> I fixed the patches because they cannot be applied to HEAD. >> Thank you. > I reviewed and tested these and they LGTM. FYI the r

Re: PostgreSQL stops when adding a breakpoint in CLion

2022-01-03 Thread Tom Lane
Stanislav Bashkyrtsev writes: >> Why do you think postgres quits? > The process was running and then it stopped. And in the console I see: > 2022-01-03 23:23:29.495 MSK [76717] LOG: checkpoint starting: shutdown > immediate In a standalone backend, I think there are only 3 ways to get to normal

Proposal: remove obsolete hot-standby testing infrastructure

2022-01-03 Thread Tom Lane
The attached proposed patch removes some ancient infrastructure for manually testing hot standby. I doubt anyone has used this in years, because AFAICS there is nothing here that's not done better by the src/test/recovery TAP tests. (Or if there is, we ought to migrate it into the TAP tests.) Th

Re: pg_dump/restore --no-tableam

2022-01-03 Thread Justin Pryzby
@cfbot: rebased >From 69ae2ed5d00a97d351e1f6c45a9e406f33032898 Mon Sep 17 00:00:00 2001 From: Justin Pryzby Date: Sun, 7 Mar 2021 19:35:37 -0600 Subject: [PATCH] Add pg_dump/restore --no-table-am.. This was for some reason omitted from 3b925e905. --- doc/src/sgml/ref/pg_dump.sgml| 18 +++

Re: PostgreSQL stops when adding a breakpoint in CLion

2022-01-03 Thread Stanislav Bashkyrtsev
> Why do you think postgres quits? The process was running and then it stopped. And in the console I see: 2022-01-03 23:23:29.495 MSK [76717] LOG: checkpoint starting: shutdown immediate 2022-01-03 23:23:29.498 MSK [76717] LOG: checkpoint complete: wrote 3 buffers (0.0%); 0 WAL file(s) added, 0 r

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Alvaro Herrera
Overall I think this is a good feature to have; assessing the need for compression is important for tuning, so +1 for the goal of the patch. I didn't look into the patch carefully, but here are some minor comments: On 2022-Jan-03, Gunnar "Nick" Bluth wrote: > @@ -229,7 +230,9 @@ toast_tuple_try_

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Justin Pryzby
> +pgstat_report_toast_activity(Oid relid, int attr, > + bool externalized, > + bool compressed, > + int32 old_size, > +

Re: pg_receivewal fail to streams when the partial file to write is not fully initialized present in the wal receiver directory

2022-01-03 Thread SATYANARAYANA NARLAPURAM
Thanks Michael! On Sun, Jan 2, 2022 at 11:56 PM Michael Paquier wrote: > On Sun, Jan 02, 2022 at 09:27:43PM -0800, SATYANARAYANA NARLAPURAM wrote: > > I noticed that pg_receivewal fails to stream when the partial file to > write > > is not fully initialized and fails with the error message somet

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 08:40:50PM +0100, Gunnar "Nick" Bluth wrote: > I wonder why "track_toast.sql" test fails on Windows (with "ERROR: > compression method lz4 not supported"), but "compression.sql" doesn't. > Any hints? The windows CI doesn't have LZ4, so the SQL command fails, but there's an

Re: TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]

2022-01-03 Thread Chapman Flack
On 01/03/22 13:55, Tom Lane wrote: > I do see an argument against reclassifying macaddr[8] into > TYPCATEGORY_NETWORK now: we generally expect that if a > category has a preferred type, any member type of the category > can be cast to that preferred type. I was wondering about the details of how t

Re: [PATCH] pg_stat_toast v6

2022-01-03 Thread Gunnar "Nick" Bluth
Am 03.01.22 um 20:11 schrieb Alvaro Herrera: On 2022-Jan-03, Gunnar "Nick" Bluth wrote: 9:38 $ git format-patch PGDG/master -v5 -o .. ../v5-0001-ping-pong-of-thougths.patch ../v5-0002-ping-pong-of-thougths.patch ../v5-0003-adds-some-debugging-messages-in-toast_helper.c.patch ... Hmm, in suc

Re: daitch_mokotoff module

2022-01-03 Thread Andres Freund
Hi, On 2022-01-02 21:41:53 -0500, Tom Lane wrote: > ... so, that test case is guaranteed to fail in non-UTF8 encodings, > I suppose? I wonder what the LANG environment is in that cfbot > instance. LANG="en_US.UTF-8" But it looks to me like the problem is in the commit cfbot creates, rather than

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Alvaro Herrera
On 2022-Jan-03, Gunnar "Nick" Bluth wrote: > 9:38 $ git format-patch PGDG/master -v5 -o .. > ../v5-0001-ping-pong-of-thougths.patch > ../v5-0002-ping-pong-of-thougths.patch > ../v5-0003-adds-some-debugging-messages-in-toast_helper.c.patch > ... Hmm, in such cases I would suggest to create a sepa

Re: PostgreSQL stops when adding a breakpoint in CLion

2022-01-03 Thread Tom Lane
Tomas Vondra writes: > On 1/3/22 16:54, Stanislav Bashkyrtsev wrote: >> - If I put a breakpoint before I start the process then everything works >> fine >> - But if I put/remove a breakpoint after it's fully initialized - the >> process just stops > Why do you think postgres quits? AFAIK CLion

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Tom Lane
Nikhil Benesch writes: > On Mon, Jan 3, 2022 at 1:14 PM Tom Lane wrote: >> Attached v3 restores that distinction, and makes some other small >> tweaks. (I found that there were actually a couple of spots in >> date.c that got it backwards, so admittedly this is a fine point >> that not everybody

Re: TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]

2022-01-03 Thread Tom Lane
Chapman Flack writes: > On the same general topic, was there a deliberate choice to put > inet and cidr in TYPCATEGORY_NETWORK but macaddr and macaddr8 > in TYPCATEGORY_USER? Hard to say how "deliberate" it was, at this remove of time. I do see an argument against reclassifying macaddr[8] into T

Re: Throttling WAL inserts when the standby falls behind more than the configured replica_lag_in_bytes

2022-01-03 Thread Ashwin Agrawal
On Wed, Dec 22, 2021 at 4:23 PM SATYANARAYANA NARLAPURAM < satyanarlapu...@gmail.com> wrote: > Hi Hackers, > > I am considering implementing RPO (recovery point objective) enforcement > feature for Postgres where the WAL writes on the primary are stalled when > the WAL distance between the primary

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Nikhil Benesch
On Mon, Jan 3, 2022 at 1:14 PM Tom Lane wrote: > Hmm, I think you went a bit too far here. The existing code intends > to draw a distinction between "not recognized" (i.e., "we don't know > what that word was you used") and "not supported" (i.e., "we know > that word, but it doesn't seem to make

Re: PostgreSQL stops when adding a breakpoint in CLion

2022-01-03 Thread Tomas Vondra
On 1/3/22 16:54, Stanislav Bashkyrtsev wrote: I tried debugging PostgreSQL to better understand how it works. It worked fine a day ago, but for some reason I have issues with debugging now: - If I put a breakpoint before I start the process then everything works fine - But if I put/remove a br

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Gunnar "Nick" Bluth
Am 03.01.22 um 19:30 schrieb Alvaro Herrera: On 2022-Jan-03, Gunnar "Nick" Bluth wrote: Am 03.01.22 um 17:50 schrieb Justin Pryzby: Soon you will think this is fun :) As long as you're happy with plain patches like the attached one, I may ;-) Well, with a zero-byte patch, not very much .

TYPCATEGORY_{NETWORK,USER} [was Dubious usage of TYPCATEGORY_STRING]

2022-01-03 Thread Chapman Flack
On 12/02/21 16:22, Tom Lane wrote: > taking the special types out of the string category, so 0002 > attached invents a separate TYPCATEGORY_INTERNAL category to > put them in. On the same general topic, was there a deliberate choice to put inet and cidr in TYPCATEGORY_NETWORK but macaddr and macad

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Alvaro Herrera
On 2022-Jan-03, Tom Lane wrote: > Attached v3 restores that distinction, and makes some other small > tweaks. (I found that there were actually a couple of spots in > date.c that got it backwards, so admittedly this is a fine point > that not everybody is on board with. But let's make it consist

Re: Introducing PgVA aka PostgresVectorAcceleration using SIMD vector instructions starting with hex_encode

2022-01-03 Thread John Naylor
On Fri, Dec 31, 2021 at 9:32 AM Hans Buschmann wrote: > Inspired by the effort to integrate JIT for executor acceleration I thought > selected simple algorithms working with array-oriented data should be > drastically accelerated by using SIMD instructions on modern hardware. Hi Hans, I have

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Alvaro Herrera
On 2022-Jan-03, Gunnar "Nick" Bluth wrote: > Am 03.01.22 um 17:50 schrieb Justin Pryzby: > > Soon you will think this is fun :) > > As long as you're happy with plain patches like the attached one, I may ;-) Well, with a zero-byte patch, not very much ... BTW why do you number with a "0." pref

Re: [PoC] Delegating pg_ident to a third party

2022-01-03 Thread Jacob Champion
On Mon, 2022-01-03 at 12:36 -0500, Stephen Frost wrote: > * Jacob Champion (pchamp...@vmware.com) wrote: > > On Fri, 2021-12-17 at 10:06 +0100, Peter Eisentraut wrote: > > > On 17.12.21 00:48, Jacob Champion wrote: > > > > WDYT? (My responses here will be slower than usual. Hope you all have a > >

PostgreSQL stops when adding a breakpoint in CLion

2022-01-03 Thread Stanislav Bashkyrtsev
I tried debugging PostgreSQL to better understand how it works. It worked fine a day ago, but for some reason I have issues with debugging now: - If I put a breakpoint before I start the process then everything works fine - But if I put/remove a breakpoint after it's fully initialized - the proces

Re: Add spin_delay() implementation for Arm in s_lock.h

2022-01-03 Thread Blake, Geoff
Tom, Hope everything is well going into the new year. I'd like to pick this discussion back up and your thoughts on the patch with the data I posted 2 weeks prior. Is there more data that would be helpful? Different setup? Data on older versions of Postgresql to ascertain if it makes more s

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Tom Lane
Nikhil Benesch writes: > Updated patch attached. Hmm, I think you went a bit too far here. The existing code intends to draw a distinction between "not recognized" (i.e., "we don't know what that word was you used") and "not supported" (i.e., "we know that word, but it doesn't seem to make sense

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Gunnar "Nick" Bluth
Am 03.01.22 um 17:50 schrieb Justin Pryzby: On Mon, Jan 03, 2022 at 05:00:45PM +0100, Gunnar "Nick" Bluth wrote: Am 03.01.22 um 16:52 schrieb Gunnar "Nick" Bluth: pg_stat_toast_v0.4.patch attached. Note that the cfbot says this fails under windows Thanks for the heads up! http://cfbot.

Re: [PoC] Delegating pg_ident to a third party

2022-01-03 Thread Stephen Frost
Greetings, * Jacob Champion (pchamp...@vmware.com) wrote: > On Fri, 2021-12-17 at 10:06 +0100, Peter Eisentraut wrote: > > On 17.12.21 00:48, Jacob Champion wrote: > > > WDYT? (My responses here will be slower than usual. Hope you all have a > > > great end to the year!) > > > > Looks interesting

Re: Use MaxLockMode in lock methods initialization

2022-01-03 Thread Tom Lane
Michael Paquier writes: > On Mon, Jan 03, 2022 at 02:47:22PM +0800, Julien Rouhaud wrote: >> While reading some code around I noticed that b04aeb0a053e7 added a >> MaxLockMode >> but didn't update the lock methods initialization. It shouldn't make much >> difference in the long run but some cons

Re: Proposal: sslmode=tls-only

2022-01-03 Thread Jacob Champion
On Fri, 2021-12-24 at 14:08 +, Keith Burdis wrote: > Has consideration been given to having something like ssl-mode=tls- > only where the SSLRequest message is skipped and the TLS handshake > starts immediately with the protocol continuing after that? From an implementation standpoint, I think

Re: refactoring basebackup.c

2022-01-03 Thread tushar
On 11/22/21 11:05 PM, Jeevan Ladhe wrote: Please find the lz4 compression patch here that basically has: Please refer to this  scenario , where --server-compression is only compressing base backup into lz4 format but not pg_wal directory [edb@centos7tushar bin]$ ./pg_basebackup -Ft --server-co

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 05:00:45PM +0100, Gunnar "Nick" Bluth wrote: > Am 03.01.22 um 16:52 schrieb Gunnar "Nick" Bluth: > > > pg_stat_toast_v0.4.patch attached. Note that the cfbot says this fails under windows http://cfbot.cputube.org/gunnar-quotnickquot-bluth.html ... [16:47:05.347] Could not

Re: [PoC] Delegating pg_ident to a third party

2022-01-03 Thread Jacob Champion
On Fri, 2021-12-17 at 10:06 +0100, Peter Eisentraut wrote: > On 17.12.21 00:48, Jacob Champion wrote: > > WDYT? (My responses here will be slower than usual. Hope you all have a > > great end to the year!) > > Looks interesting. I wonder whether putting this into pg_ident.conf is > sensible. I

Re: Index-only scans vs. partially-retrievable indexes

2022-01-03 Thread Andrey Borodin
> Andrey Borodin writes: > >> I've tried to toy with the patch and remembered one related caveat. >> If we have index for both returnable and nonreturnable attributes, IOS will >> not be choosen: > >> postgres=# create index on t using gist(a gist_trgm_ops) include (a); >> postgres=# explain

Re: psql - add SHOW_ALL_RESULTS option

2022-01-03 Thread Peter Eisentraut
On 23.12.21 12:40, Fabien COELHO wrote: This is also a feature/bug of libpq which happens to be hidden by PQexec: when one command crashes PQgetResult actually returns *2* results. First one with the FATAL message, second one when libpq figures out that the connection was lost with the second m

Re: daitch_mokotoff module

2022-01-03 Thread Tom Lane
Dag Lem writes: > Tom Lane writes: >> (We do have methods for dealing with non-ASCII test cases, but >> I can't see that this patch is using any of them.) > I naively assumed that tests would be run in an UTF8 environment. Nope, not necessarily. Our current best practice for this is to separat

Re: Remove extra spaces

2022-01-03 Thread Tom Lane
Suraj Kharage writes: > While browsing the code, noticed the extra spaces after the function name. > Removed the same in the attached patch. I'm afraid that's a waste of time because the next pgindent run will just put them back. "numeric" is also a typedef name and this usage of it seems to con

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-01-03 Thread Jacob Champion
On Sun, 2022-01-02 at 13:29 -0800, Andres Freund wrote: > Hi, > > On 2021-12-16 01:13:57 +, Jacob Champion wrote: > > Attached is a patch for libpq to support IP addresses in the server's > > Subject Alternative Names, which would allow admins to issue certs for > > multiple IP addresses, both

Re: [PATCH] Accept IP addresses in server certificate SANs

2022-01-03 Thread Jacob Champion
On Fri, 2021-12-17 at 16:54 +0900, Kyotaro Horiguchi wrote: > Sorry for the silly mistake. > > At Fri, 17 Dec 2021 15:40:10 +0900 (JST), Kyotaro Horiguchi > wrote in > > > NSS departs slightly from the spec and will additionally try to match > > > an IP address against the CN, but only if there

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Gunnar "Nick" Bluth
Am 03.01.22 um 16:52 schrieb Gunnar "Nick" Bluth: pg_stat_toast_v0.4.patch attached. Aaaand I attached a former version of the patch file... sorry, I'm kind of struggling with all the squashing/rebasing... -- Gunnar "Nick" Bluth Eimermacherweg 106 D-48159 Münster Mobil +49 172 8853339 Emai

Re: Clarify planner_hook calling convention

2022-01-03 Thread Tom Lane
"Andrey V. Lepikhov" writes: > planner hook is frequently used in monitoring and advising extensions. Yeah. > The call to this hook is implemented in the way, that the > standard_planner routine must be called at least once in the hook's call > chain. > But, as I see in [1], it should allow u

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Nikhil Benesch
Updated patch attached. On Mon, Jan 3, 2022 at 10:26 AM Nikhil Benesch wrote: > > On Mon, Jan 3, 2022 at 10:20 AM Tom Lane wrote: > > BTW, if you want to get rid of the quotes, I think that something > > else has to be done to set off the type name from the rest. In > > this instance someone mi

Re: [PATCH] pg_stat_toast v0.4

2022-01-03 Thread Gunnar "Nick" Bluth
Am 21.12.21 um 13:51 schrieb kuroda.hay...@fujitsu.com: Dear Gunnar, Hayato-san, all, thanks for the feedback! * gathering timing information Here is a minor comment: I'm not sure when we should start to measure time. If you want to record time spent for compressing, toast_compress_datum()

Re: Refactoring of compression options in pg_basebackup

2022-01-03 Thread gkokolatos
Hi, ‐‐‐ Original Message ‐‐‐ On Saturday, December 18th, 2021 at 12:29 PM, Michael Paquier wrote: >Hi all, >(Added Georgios in CC.) thank you for the shout out. >When working on the support of LZ4 for pg_receivewal, walmethods.c has >gained an extra parameter for the compression metho

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Nikhil Benesch
On Mon, Jan 3, 2022 at 10:20 AM Tom Lane wrote: > BTW, if you want to get rid of the quotes, I think that something > else has to be done to set off the type name from the rest. In > this instance someone might think that we're complaining about a > "time zone unit", whatever that is. I suggest

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Tom Lane
Nikhil Benesch writes: > - errmsg("\"time with time zone\" units \"%s\" not > recognized", > + errmsg("time with time zone units \"%s\" not > recognized", > [ etc ] BTW, if you want to get rid of the quotes, I think that something else has to be d

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Nikhil Benesch
On Mon, Jan 3, 2022 at 10:11 AM Tom Lane wrote: > Yeah, but we've been slowly converting to that method to reduce the number > of distinct translatable strings for error messages. If doing so here > would cut the labor for translators, I'm for it. Great! I'll update the patch. Thanks for confirm

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Tom Lane
Nikhil Benesch writes: > I could find only a tiny smattering of examples where format_type_be() > is invoked with a constant OID. In almost all error messages where the > type is statically known, it seems the type name is hardcoded into the > error message rather than generated via format_type_be

Re: Column Filtering in Logical Replication

2022-01-03 Thread Alvaro Herrera
On 2022-Jan-03, Justin Pryzby wrote: > Yes, I know both paths are hit now that it uses GetBool. > > What I'm wondering is why tests didn't fail when one path wasn't hit - when it > said am_partition=DatumGetChar(); if (!am_partition){} Ah! > I suppose it's because the am_partition=true case cor

Re: Index-only scans vs. partially-retrievable indexes

2022-01-03 Thread Tom Lane
Andrey Borodin writes: > I've tried to toy with the patch and remembered one related caveat. > If we have index for both returnable and nonreturnable attributes, IOS will > not be choosen: > postgres=# create index on t using gist(a gist_trgm_ops) include (a); > postgres=# explain select * from

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Nikhil Benesch
On Mon, Jan 3, 2022 at 3:17 AM Michael Paquier wrote: > However, there is a specific routine called format_type_be() aimed at > formatting type names for error strings. If you switch to that, my > guess is that this makes the error messages of time/timetz and > timestamp/timestamptz/interval more

Re: Column Filtering in Logical Replication

2022-01-03 Thread Justin Pryzby
On Mon, Jan 03, 2022 at 11:31:39AM -0300, Alvaro Herrera wrote: > > Did the DatumGetBool issue expose a deficiency in testing ? > > I think the !am_partition path was never being hit. > > Hmm, the TAP test creates a subscription that contains both types of > tables. I tried adding an assert for e

Re: Foreign key joins revisited

2022-01-03 Thread Joel Jacobson
On Wed, Dec 29, 2021, at 10:46, Peter Eisentraut wrote: >In the 1990s, there were some SQL drafts that included syntax like Do you remember if it was in the beginning/middle/end of the 1990s? I will start the work of going through all drafts tomorrow. /Joel

Re: Column Filtering in Logical Replication

2022-01-03 Thread Alvaro Herrera
On 2021-Dec-31, Justin Pryzby wrote: > > @@ -5963,8 +5967,20 @@ describePublications(const char *pattern) > > { > > +" > > CASE WHEN pr.prattrs IS NOT NULL THEN\n" > > +

Re: refactoring basebackup.c

2022-01-03 Thread tushar
On 11/22/21 11:05 PM, Jeevan Ladhe wrote: Please find the lz4 compression patch here that basically has: One small issue, in the "pg_basebackup --help", we are not displaying lz4 value under --server-compression option [edb@tusharcentos7-v14 bin]$ ./pg_basebackup --help | grep server-compress

Re: Synchronizing slots from primary to standby

2022-01-03 Thread Peter Eisentraut
Here is an updated patch to fix some build failures. No feature changes. On 14.12.21 23:12, Peter Eisentraut wrote: On 31.10.21 11:08, Peter Eisentraut wrote: I want to reactivate $subject.  I took Petr Jelinek's patch from [0], rebased it, added a bit of testing.  It basically works, but as

Re: Add Boolean node

2022-01-03 Thread Peter Eisentraut
On 03.01.22 12:04, Peter Eisentraut wrote: On 27.12.21 10:02, Peter Eisentraut wrote: This patch adds a new node type Boolean, to go alongside the "value" nodes Integer, Float, String, etc.  This seems appropriate given that Boolean values are a fundamental part of the system and are used a lo

Re: daitch_mokotoff module

2022-01-03 Thread Dag Lem
Tom Lane writes: > Thomas Munro writes: >> Erm, it looks like something weird is happening somewhere in cfbot's >> pipeline, because Dag's patch says: > >> +SELECT daitch_mokotoff('Straßburg'); >> + daitch_mokotoff >> +- >> + 294795 >> +(1 row) > > ... so, that test case is guara

Remove extra spaces

2022-01-03 Thread Suraj Kharage
Hi, While browsing the code, noticed the extra spaces after the function name. Removed the same in the attached patch. -- -- Thanks & Regards, Suraj kharage, edbpostgres.com remove_space_from_numeric_function.patch Description: Binary data

Re: libpq compression (part 2)

2022-01-03 Thread Andrey Borodin
> Maybe you should reset the streams between each compression message (even if > it's using the same compression algorithm). This might allow better > compression. AFAIK on the contrary - longer data sequence usually compresses better. The codec can use knowledge about prior data to better comp

Re: Index-only scans vs. partially-retrievable indexes

2022-01-03 Thread Andrey Borodin
> regression=# explain select * from t where lower(a) like 'z'; > QUERY PLAN > -- > Index Only Scan using t_lower_a_idx on t (cost=0.14..28.27 rows=7 width=32) > Index Cond: ((lower(a)) ~~ 'z'::text) > (2 rows) > I've

Re: Add Boolean node

2022-01-03 Thread Peter Eisentraut
On 27.12.21 10:02, Peter Eisentraut wrote: This patch adds a new node type Boolean, to go alongside the "value" nodes Integer, Float, String, etc.  This seems appropriate given that Boolean values are a fundamental part of the system and are used a lot. Before, SQL-level Boolean constants wer

Re: An obsolete comment of pg_stat_statements

2022-01-03 Thread Michael Paquier
On Fri, Dec 24, 2021 at 09:02:10PM +0900, Michael Paquier wrote: > Do we really need to have this comment in the function header? The > same is explained a couple of lines down so this feels like a > duplicate, and it is hard to miss it with the code shaped as-is (aka > the relationship between co

Re: Remove inconsistent quotes from date_part error

2022-01-03 Thread Michael Paquier
On Sun, Jan 02, 2022 at 11:47:32PM -0500, Nikhil Benesch wrote: > The attached patch corrects a very minor typographical inconsistency > when date_part is invoked with invalid units on time/timetz data vs > timestamp/timestamptz/interval data. Hmm, you are right that this is inconsistent, but I do

Re: Use MaxLockMode in lock methods initialization

2022-01-03 Thread Michael Paquier
On Mon, Jan 03, 2022 at 02:47:22PM +0800, Julien Rouhaud wrote: > While reading some code around I noticed that b04aeb0a053e7 added a > MaxLockMode > but didn't update the lock methods initialization. It shouldn't make much > difference in the long run but some consistency seems better to me. Ma