Side effect of remove_useless_groupby_columns

2021-02-27 Thread Richard Guo
Hi, When looking at [1], I realized we may have a side effect when removing redundant columns in the GROUP BY clause. Suppose we have a query with ORDER BY 'b', and meanwhile column 'b' is also a group key. If we decide that 'b' is redundant due to being functionally dependent on other GROUP BY co

Re: NOT VALID for Unique Indexes

2021-02-27 Thread japin
On Fri, 26 Feb 2021 at 17:36, Simon Riggs wrote: > On Mon, Jan 18, 2021 at 11:19 PM japin wrote: >> >> >> On Fri, 15 Jan 2021 at 00:22, Simon Riggs >> wrote: >> > As you may be aware the NOT VALID qualifier currently only applies to >> > CHECK and FK constraints, but not yet to unique indexes

Re: [HACKERS] Custom compression methods

2021-02-27 Thread Justin Pryzby
On my PC, this new change is causing a test failure: SELECT SUBSTR(f1, 2000, 50) FROM cmdata1; - substr - - 01234567890123456789012345678901234567890123456789 -(1 row) - +ERROR: compressed lz4 data i

Re: regexp_positions()

2021-02-27 Thread Joel Jacobson
Hi, On Sun, Feb 28, 2021, at 03:13, David Fetter wrote: > Maybe an int4multirange, which would fit unless I'm misunderstanding > g's meaning with respect to non-overlapping patterns, but that might > be a little too cute and not easy ever to extend. > > Come to that, would a row structure that lo

Re: regexp_positions()

2021-02-27 Thread David Fetter
On Sat, Feb 27, 2021 at 08:51:27PM +0100, Joel Jacobson wrote: > Hi, > > Finding all matches in a string is convenient using regexp_matches() with the > 'g' flag. > > But if instead wanting to know the start and end positions of the occurrences, > one would have to first call regexp_matches(...,

Re: [PATCH] pgbench: Remove ecnt, a member variable of CState

2021-02-27 Thread Michael Paquier
On Fri, Feb 26, 2021 at 04:36:41PM -0300, Alvaro Herrera wrote: > +1 Thanks, done. -- Michael signature.asc Description: PGP signature

DETAIL for wrong scram password

2021-02-27 Thread Jeff Janes
When md5 password authentication fails, the server log file has a helpful detail to say why, usually one of: DETAIL: Role "none" does not exist. DETAIL: User "jjanes" has no password assigned. DETAIL: User "jjanes" has an expired password. DETAIL: Password does not match for user "jjanes". Bu

Re: Bug in error reporting for multi-line JSON

2021-02-27 Thread Hamid Akhtar
Updated the patch based on feedback. The new status of this patch is: Needs review

Re: [BUG] segfault during delete

2021-02-27 Thread Álvaro Herrera
Thanks Amit for working on this fix! It seems correct to me, so I pushed it with trivial changes. Thanks Bertrand for reporting the problem. In addition to backpatching the code fix to pg12, I backpatched the test case to pg11. It worked fine for me (with no code changes), but it seems good to

Re: Extending range type operators to cope with elements

2021-02-27 Thread Justin Pryzby
On Fri, Oct 30, 2020 at 11:08:19PM +0100, Tomas Vondra wrote: > Hi, > > + > + > +anyelement >> > anyrange > +boolean > + > + > +Is the element strictly right of the element? > + should say "of the range" ? > +++ b/src/backend/utils/adt/r

regexp_positions()

2021-02-27 Thread Joel Jacobson
Hi, Finding all matches in a string is convenient using regexp_matches() with the 'g' flag. But if instead wanting to know the start and end positions of the occurrences, one would have to first call regexp_matches(...,'g') to get all matches, and then iterate through the results and search usin

Re: Allow matching whole DN from a client certificate

2021-02-27 Thread Justin Pryzby
On Sat, Jan 30, 2021 at 04:18:12PM -0500, Andrew Dunstan wrote: > @@ -610,6 +610,19 @@ hostnogssenc database > user the verification of client certificates with any authentication > method that supports hostssl entries. > > + > + On any record using client cer

Re: [HACKERS] Custom compression methods

2021-02-27 Thread Justin Pryzby
> Subject: [PATCH v28 3/4] Add default_toast_compression GUC This part isn't working. My first patch worked somewhat better: due to doing strcmp() with the default GUC, it avoided using the cached AM OID. (But it would've failed with more than 2 AMs, since the cache wasn't invalidated, since I c

Re: psql - add SHOW_ALL_RESULTS option

2021-02-27 Thread Peter Eisentraut
On 30.09.20 08:21, Michael Paquier wrote: On Mon, Jul 20, 2020 at 07:48:42AM +0200, Fabien COELHO wrote: Yes, indeed. I'm planning to investigate, hopefully this week. This reply was two months ago, and nothing has happened, so I have marked the patch as RwF. Given the ongoing work on return

Re: repeated decoding of prepared transactions

2021-02-27 Thread vignesh C
On Sat, Feb 27, 2021 at 5:36 PM Amit Kapila wrote: > > On Sat, Feb 27, 2021 at 11:38 AM Amit Kapila wrote: > > > > On Fri, Feb 26, 2021 at 4:13 PM Ajin Cherian wrote: > > > > > > On Fri, Feb 26, 2021 at 7:47 PM Ajin Cherian wrote: > > > > > > > I've updated snapshot_was_exported_at_ member to

Re: repeated decoding of prepared transactions

2021-02-27 Thread vignesh C
On Sat, Feb 27, 2021 at 8:29 AM Amit Kapila wrote: > > On Fri, Feb 26, 2021 at 7:26 PM vignesh C wrote: > > > > On Fri, Feb 26, 2021 at 4:13 PM Ajin Cherian wrote: > > > > > > On Fri, Feb 26, 2021 at 7:47 PM Ajin Cherian wrote: > > > > > > > I've updated snapshot_was_exported_at_ member to pg_

Re: repeated decoding of prepared transactions

2021-02-27 Thread Amit Kapila
On Sat, Feb 27, 2021 at 11:38 AM Amit Kapila wrote: > > On Fri, Feb 26, 2021 at 4:13 PM Ajin Cherian wrote: > > > > On Fri, Feb 26, 2021 at 7:47 PM Ajin Cherian wrote: > > > > > I've updated snapshot_was_exported_at_ member to pg_replication_slots as > > > well. > > > Do have a look and let me

Re: Tid scan improvements

2021-02-27 Thread David Rowley
On Fri, 19 Feb 2021 at 20:37, David Rowley wrote: > > On Thu, 18 Feb 2021 at 09:45, David Rowley wrote: > > > > On Wed, 17 Feb 2021 at 11:05, Andres Freund wrote: > > > How does this interact with rescans? > > > > We must call table_rescan() before calling table_set_tidrange() again. > > That pe

Re: [PATCH] Note effect of max_replication_slots on subscriber side in documentation.

2021-02-27 Thread Amit Kapila
On Sat, Feb 27, 2021 at 2:47 AM Paul Martinez wrote: > > On Fri, Feb 26, 2021 at 5:22 AM Amit Kapila wrote: > > > > https://www.postgresql.org/docs/devel/logical-replication-config.html > > > > Ah, yep. I added a clause to the end of the sentence to clarify why we're > using max_replication_slots

Re: Remove latch.c workaround for Linux < 2.6.27

2021-02-27 Thread Thomas Munro
On Sat, Feb 27, 2021 at 9:01 PM Heikki Linnakangas wrote: > On 27 February 2021 01:10:23 EET, Thomas Munro wrote: > >Commit 82ebbeb0 added a workaround for (already in 2017) ancient Linux > >kernels with no EPOLL_CLOEXEC. I don't see any such systems in the > >build farm today (and if there is o

Shared memory size computation oversight?

2021-02-27 Thread Julien Rouhaud
Hi, While investigating on some strange "out of shared memory" error reported on the french BBS [1], I noticed that 09adc9a8c09 (adding Robert in Cc) changed ShmemAlloc alignment to CACHELINEALIGN but didn't update any related code that depended on it. Most of the core code isn't impacted as it d

Re: Remove latch.c workaround for Linux < 2.6.27

2021-02-27 Thread Heikki Linnakangas
On 27 February 2021 01:10:23 EET, Thomas Munro wrote: >Hello, > >Commit 82ebbeb0 added a workaround for (already in 2017) ancient Linux >kernels with no EPOLL_CLOEXEC. I don't see any such systems in the >build farm today (and if there is one hiding in there somewhere, it's >well past time to upg