Re: [PATCH] psql : Improve code for help option

2021-03-02 Thread Fujii Masao
On 2021/03/03 12:27, miyake_kouta wrote: 2021-03-03 00:09, Fujii Masao wrote: We can simplify the code more and remove "env = user" by just using "user" instead of "env" in the above? Thank you for your comment. I updated my patch and replaced "env" with "user". Please check. Thanks for u

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-02 Thread Fujii Masao
On 2021/03/03 14:33, Masahiro Ikeda wrote: On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked dur

Re: Parallel INSERT (INTO ... SELECT ...)

2021-03-02 Thread Greg Nancarrow
On Tue, Mar 2, 2021 at 11:19 PM Amit Kapila wrote: > > On Mon, Mar 1, 2021 at 9:08 AM Greg Nancarrow wrote: > > > > Posting an updated set of patches that includes Amit Langote's patch > > to the partition tracking scheme... > > > > Few comments: > == > 1. > "Prior to entering paralle

RE: PATCH: Batch/pipelining support for libpq

2021-03-02 Thread k.jami...@fujitsu.com
On Wed, Feb 17, 2021 8:14 AM (JST), Alvaro Herrera wrote: Hi Alvaro, > Here's a new version, where I've renamed everything to "pipeline". I think > the > docs could use some additional tweaks now in order to make a coherent > story on pipeline mode, how it can be used in a batched fashion, etc.

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Michael Paquier
On Tue, Mar 02, 2021 at 09:47:18PM -0800, Andres Freund wrote: > I can't reproduce that here - could either (or both) of you send > > src/test/recovery/tmp_check/log/regress_log_021_row_visibility > src/test/recovery/tmp_check/log/021_row_visibility_standby.log > src/test/recovery/tmp_check/log/02

Re: PITR promote bug: Checkpointer writes to older timeline

2021-03-02 Thread Kyotaro Horiguchi
At Tue, 2 Mar 2021 17:56:03 -0800, Soumyadeep Chakraborty wrote in > Hello hackers, > > We came across an issue where the checkpointer writes to the older > timeline while a promotion is ongoing after reaching the recovery point > in a PITR, when there are prepared transactions before the recov

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-02 Thread Dilip Kumar
On Tue, Mar 2, 2021 at 9:01 PM Dilip Kumar wrote: > > > > We don't want that to happen in cases where previous > > recovery-end-checkpoint is > > skipped in startup. We want Checkpointer first to convey the barrier to all > > backends but, the backend shouldn't write wal until the Checkpointer w

Re: cryptohash: missing locking functions for OpenSSL <= 1.0.2?

2021-03-02 Thread Michael Paquier
On Fri, Feb 19, 2021 at 02:37:06PM +0900, Michael Paquier wrote: > The attached patch implements things this way, and initializes the > crypto callbacks before sending the startup packet, before deciding if > SSL needs to be requested or not. I have played with several > threading scenarios with t

Re: Buildfarm failure in crake

2021-03-02 Thread Michael Paquier
On Wed, Mar 03, 2021 at 08:46:41AM +0530, vignesh C wrote: > I noticed there is buildfarm failure in crake, it fails with the > following error: > Mar 02 21:22:56 ./src/test/recovery/t/001_stream_rep.pl: Variable > declared in conditional statement at line 88, column 2. Declare > variables outside

Re: REINDEX backend filtering

2021-03-02 Thread Julien Rouhaud
On Tue, Mar 02, 2021 at 12:01:55PM +0800, Julien Rouhaud wrote: > > So, long running reindex due to some gigantic and/or numerous indexes on a > single (or few) table is not something that we can solve, but inefficient > reindex due to wrong table size / to-be-reindexed-indexes-size correlation ca

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andres Freund
Hi, On 2021-03-02 21:20:11 -0800, Andres Freund wrote: > On 2021-03-02 12:57:57 -0800, Andres Freund wrote: > > t/003_recovery_targets.pl 7/9 > > # Failed test 'multiple conflicting settings' > > # at t/003_recovery_targets.pl line 151. > > > > # Failed test 'recovery end befor

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andres Freund
Hi, On 2021-03-02 21:20:52 -0500, Andrew Dunstan wrote: > On 3/2/21 8:27 PM, Michael Paquier wrote: > > On Tue, Mar 02, 2021 at 04:54:57PM -0800, Andres Freund wrote: > >> It still does, even after > >> > >> commit 1e6e40447115ca7b4749d7d117b81b016ee5e2c2 (upstream/master, master) > >> Author: And

Re: Freeze the inserted tuples during CTAS?

2021-03-02 Thread Masahiko Sawada
On Sun, Feb 21, 2021 at 4:46 PM Paul Guo wrote: > > Attached is the v2 version that fixes a test failure due to plan change > (bitmap index scan -> index only scan). I think this is a good idea. BTW, how much does this patch affect the CTAS performance? I expect it's negligible but If there is

Re: About to add WAL write/fsync statistics to pg_stat_wal view

2021-03-02 Thread Masahiro Ikeda
On 2021-02-24 16:14, Fujii Masao wrote: On 2021/02/15 11:59, Masahiro Ikeda wrote: On 2021-02-10 00:51, David G. Johnston wrote: On Thu, Feb 4, 2021 at 4:45 PM Masahiro Ikeda wrote: I pgindented the patches. ... XLogWrite, which is invoked during an XLogFlush request (see ...).  This is al

Re: pgbench: option delaying queries till connections establishment?

2021-03-02 Thread Thomas Munro
On Sun, Jan 31, 2021 at 1:18 AM Fabien COELHO wrote: > I think it would be much more consistent to move all the thread complement > stuff there directly: Currently (v8) the windows implementation is in > pgbench and the MacOS implementation in port, which is quite messy. Hmm. Well this is totall

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andres Freund
Hi, On 2021-03-02 12:57:57 -0800, Andres Freund wrote: > t/003_recovery_targets.pl 7/9 > # Failed test 'multiple conflicting settings' > # at t/003_recovery_targets.pl line 151. > > # Failed test 'recovery end before target reached is a fatal error' > # at t/003_recovery_targ

Re: New IndexAM API controlling index vacuum strategies

2021-03-02 Thread Masahiko Sawada
On Tue, Mar 2, 2021 at 2:34 PM Peter Geoghegan wrote: > > On Mon, Mar 1, 2021 at 7:00 PM Peter Geoghegan wrote: > > I think that you're right. However, in practice it isn't harmful > > because has_dead_tuples is only used when "all_visible = true", and > > only to detect corruption (which should

Re: Libpq support to connect to standby server as priority

2021-03-02 Thread Tom Lane
vignesh C writes: > Conchuela is failing because of: > ok 17 - connect to node standby_1 if mode "standby" and standby_1,primary > listed > ack Broken pipe: write( 13, 'SHOW port;' ) at > /usr/local/lib/perl5/site_perl/IPC/Run/IO.pm line 549. It didn't fail on the next run, so this might just be

Re: A qsort template

2021-03-02 Thread Thomas Munro
On Wed, Mar 3, 2021 at 10:25 AM Daniel Gustafsson wrote: > > On 18 Feb 2021, at 04:09, Thomas Munro wrote: > > In another thread[1], I proposed $SUBJECT, but then we found a better > > solution to that thread's specific problem. The general idea is still > > good though: it's possible to (1) rep

Re: Libpq support to connect to standby server as priority

2021-03-02 Thread Greg Nancarrow
On Wed, Mar 3, 2021 at 2:49 PM vignesh C wrote: > > > > On Wed, Mar 3, 2021 at 7:37 AM Tom Lane wrote: > > > > Greg Nancarrow writes: > > > I've marked this as "Ready for Committer". > > > > I've pushed this after whacking it around a fair amount. A lot of > > that was cosmetic, but one thing t

Re: Libpq support to connect to standby server as priority

2021-03-02 Thread vignesh C
On Wed, Mar 3, 2021 at 7:37 AM Tom Lane wrote: > > Greg Nancarrow writes: > > I've marked this as "Ready for Committer". > > I've pushed this after whacking it around a fair amount. A lot of > that was cosmetic, but one thing that wasn't is that I got rid of the > proposed "which_primary_host" v

Re: repeated decoding of prepared transactions

2021-03-02 Thread Amit Kapila
On Tue, Mar 2, 2021 at 12:43 PM vignesh C wrote: > > On Tue, Mar 2, 2021 at 9:33 AM Amit Kapila wrote: > > > > On Tue, Mar 2, 2021 at 8:20 AM vignesh C wrote: > > > > > > > > > I have a minor comment regarding the below: > > > + > > > + > > > + two_phase bool > > > + > > >

Re: New IndexAM API controlling index vacuum strategies

2021-03-02 Thread Peter Geoghegan
On Tue, Mar 2, 2021 at 6:44 PM Masahiko Sawada wrote: > A scale type parameter seems good to me but I wonder if how users can > tune that parameter. We already have tuple-based parameters such as > autovacuum_vacuum_scale_factor/threshold and I think that users > basically don't pay attention to t

Re: Track replica origin progress for Rollback Prepared

2021-03-02 Thread Amit Kapila
On Wed, Jan 13, 2021 at 2:03 PM Ajin Cherian wrote: > > On Wed, Jan 13, 2021 at 6:28 PM Ajin Cherian wrote: > > > I added the below log: > Small correction, I sent the wrong code change for logging, this was > the correct one: > Okay, thanks. I have rebased the patch and updated comments as sugg

Re: Identify missing publications from publisher while create/alter subscription.

2021-03-02 Thread Euler Taveira
On Wed, Feb 3, 2021, at 2:13 AM, Bharath Rupireddy wrote: > On Mon, Jan 25, 2021 at 10:32 PM vignesh C wrote: > > > If a publication which does not exist is specified during create > > subscription, then we should throw an error similar to step 2 behavior. > > Similarly if a publication which d

Re: [PATCH] psql : Improve code for help option

2021-03-02 Thread miyake_kouta
2021-03-03 00:09, Fujii Masao wrote: We can simplify the code more and remove "env = user" by just using "user" instead of "env" in the above? Thank you for your comment. I updated my patch and replaced "env" with "user". Please check. Regards. -- Kota Miyake diff --git a/src/bin/psql/help.c b

Buildfarm failure in crake

2021-03-02 Thread vignesh C
Hi, I noticed there is buildfarm failure in crake, it fails with the following error: Mar 02 21:22:56 ./src/test/recovery/t/001_stream_rep.pl: Variable declared in conditional statement at line 88, column 2. Declare variables outside of the condition. ([Variables::ProhibitConditionalDeclarations]

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-03-02 Thread Peter Geoghegan
On Mon, Feb 8, 2021 at 2:46 AM Pavel Borisov wrote: > Caveat: if the first entry on the next index page has a key equal to the key > on a previous page AND all heap tid's corresponding to this entry are > invisible, currently cross-page check can not detect unique constraint > violation between

Re: [PATCH] Improve amcheck to also check UNIQUE constraint in btree index.

2021-03-02 Thread Peter Geoghegan
On Mon, Mar 1, 2021 at 11:22 AM Mark Dilger wrote: > If bt_index_check() and bt_index_parent_check() are to have this > functionality, shouldn't there be an option controlling it much as the option > (heapallindexed boolean) controls checking whether all entries in the heap > are indexed in the

Re: New IndexAM API controlling index vacuum strategies

2021-03-02 Thread Masahiko Sawada
On Tue, Mar 2, 2021 at 12:00 PM Peter Geoghegan wrote: > > On Sun, Feb 21, 2021 at 10:28 PM Masahiko Sawada > wrote: > > Sorry for the late response. > > Me too! No problem, thank you for your comment! > > > 1. Whereas skipping index vacuum and heap vacuum is a very attractive > > improvement,

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andrew Dunstan
On 3/2/21 8:27 PM, Michael Paquier wrote: > On Tue, Mar 02, 2021 at 04:54:57PM -0800, Andres Freund wrote: >> It still does, even after >> >> commit 1e6e40447115ca7b4749d7d117b81b016ee5e2c2 (upstream/master, master) >> Author: Andres Freund >> Date: 2021-03-01 09:52:15 -0800 >> >> Fix reco

Re: Libpq support to connect to standby server as priority

2021-03-02 Thread Tom Lane
Greg Nancarrow writes: > I've marked this as "Ready for Committer". I've pushed this after whacking it around a fair amount. A lot of that was cosmetic, but one thing that wasn't is that I got rid of the proposed "which_primary_host" variable. I thought the logic around that was way too messy a

Re: Removing vacuum_cleanup_index_scale_factor

2021-03-02 Thread Peter Geoghegan
On Mon, Mar 1, 2021 at 10:33 PM Masahiko Sawada wrote: > The original design that made VACUUM set > pg_class.reltuples/pg_class.relpages in indexes (from 15+ years ago) > assumed that it was cheap to handle statistics in passing. Even if we > have btvacuumcleanup() not do an index scan at all, thi

PITR promote bug: Checkpointer writes to older timeline

2021-03-02 Thread Soumyadeep Chakraborty
Hello hackers, We came across an issue where the checkpointer writes to the older timeline while a promotion is ongoing after reaching the recovery point in a PITR, when there are prepared transactions before the recovery point. We came across this issue first in REL_12_STABLE and saw that it also

Re: Add --tablespace option to reindexdb

2021-03-02 Thread Michael Paquier
On Tue, Mar 02, 2021 at 10:01:43AM +0100, Daniel Gustafsson wrote: > +1, no objections from me after a readthrough of this version. Thanks, Daniel and Mark. I have applied v2 from upthread, then. -- Michael signature.asc Description: PGP signature

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Michael Paquier
On Tue, Mar 02, 2021 at 04:54:57PM -0800, Andres Freund wrote: > It still does, even after > > commit 1e6e40447115ca7b4749d7d117b81b016ee5e2c2 (upstream/master, master) > Author: Andres Freund > Date: 2021-03-01 09:52:15 -0800 > > Fix recovery test hang in 021_row_visibility.pl on windows.

Re: WIP: BRIN multi-range indexes

2021-03-02 Thread Tomas Vondra
On 3/3/21 1:17 AM, Alvaro Herrera wrote: > On 2021-Mar-03, Tomas Vondra wrote: > >> That's kinda my point - I agree the size of the patch is not the >> primary concern, but it makes the minmax/inclusion code a bit more >> complicated (because they now have to loop over the keys), with >> very l

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andres Freund
Hi, On 2021-03-02 17:04:16 -0500, Andrew Dunstan wrote: > Well, I though it was, but it wasn't. Fixed now, see > > > > I've deployed this on drongo, which will now run almost all the TAP > tests. Thanks

Re: PROXY protocol support

2021-03-02 Thread Jacob Champion
On Tue, 2021-03-02 at 18:43 +0100, Magnus Hagander wrote: > PFA a simple patch that implements support for the PROXY protocol. I'm not all the way through the patch yet, but this part jumped out at me: > + if (memcmp(proxyheader.sig, > "\x0d\x0a\x0d\x0a\x00\x0d\x0a\x51\x55\x49\x54\x0a", size

Re: WIP: BRIN multi-range indexes

2021-03-02 Thread Alvaro Herrera
On 2021-Mar-03, Tomas Vondra wrote: > That's kinda my point - I agree the size of the patch is not the primary > concern, but it makes the minmax/inclusion code a bit more complicated > (because they now have to loop over the keys), with very little benefit > (there might be some speedup, but IMO

Re: Confusing behavior of psql's \e

2021-03-02 Thread Jacob Champion
On Wed, 2020-12-16 at 10:45 +0100, Laurenz Albe wrote: > I consider this a bug fix, but one that shouldn't be backpatched. > Re-executing the previous query if the editor is quit is > annoying at least and dangerous at worst. I like that this patch also clears the query buffer in the error case. (

Re: WIP: BRIN multi-range indexes

2021-03-02 Thread Tomas Vondra
On 3/3/21 12:44 AM, Alvaro Herrera wrote: > On 2021-Mar-03, Tomas Vondra wrote: > >> 1) The 0001 patch allows passing of all scan keys to BRIN opclasses, >> which is needed for the minmax-multi to work. But it also modifies the >> existing opclasses (minmax and inclusion) to do this - but for thos

Re: WIP: BRIN multi-range indexes

2021-03-02 Thread Alvaro Herrera
On 2021-Mar-03, Tomas Vondra wrote: > 1) The 0001 patch allows passing of all scan keys to BRIN opclasses, > which is needed for the minmax-multi to work. But it also modifies the > existing opclasses (minmax and inclusion) to do this - but for those > opclasses it does not make much difference, I

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andrew Dunstan
On 3/2/21 7:48 AM, Andrew Dunstan wrote: > On 3/1/21 3:07 PM, Andres Freund wrote: >> Hi, >> >> As part of trying to make the aio branch tests on cirrus CI pass with >> some tap tests I noticed that "src/tools/msvc/vcregress.pl recoverycheck" >> hangs. A long phase of remote debugging later I fig

Re: Allow matching whole DN from a client certificate

2021-03-02 Thread Jacob Champion
On Fri, 2021-02-26 at 15:40 -0500, Andrew Dunstan wrote: > I think the thing that's principally outstanding w.r.t. this patch is > what format we should use to extract the DN. That and the warning label for sharp edges. > Should we use RFC2253, > which reverses the field order, as has been sugges

Re: pg_upgrade version checking questions

2021-03-02 Thread Daniel Gustafsson
> On 2 Mar 2021, at 14:20, Peter Eisentraut > wrote: > > On 23.02.21 17:14, Daniel Gustafsson wrote: >> This exports validate_exec to reduce duplication, and implements a custom >> find_other_exec-like function in pg_upgrade to check each binary for the >> version number. Keeping a local copy o

Re: A qsort template

2021-03-02 Thread Daniel Gustafsson
> On 18 Feb 2021, at 04:09, Thomas Munro wrote: > In another thread[1], I proposed $SUBJECT, but then we found a better > solution to that thread's specific problem. The general idea is still > good though: it's possible to (1) replace several existing copies of > our qsort algorithm with one, a

Re: We should stop telling users to "vacuum that database in single-user mode"

2021-03-02 Thread David Rowley
On Wed, 3 Mar 2021 at 01:12, Magnus Hagander wrote: > > On Tue, Mar 2, 2021 at 7:52 AM David Rowley wrote: > > I have seen it happen that an instance has a vacuum_cost_limit set and > > someone did start the database in single-user mode, per the advice of > > the error message only to find that t

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 12:51 PM, Joel Jacobson wrote: > > Yikes. Here be dragons. I think I want my wart free foot back please. > > Many thanks for explaining. I think I’ll abandon this patch. I guess > implementing an entirely new range type could be an acceptable solution, but > that’s too

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andres Freund
Hi, On 2021-03-02 07:48:28 -0500, Andrew Dunstan wrote: > I don't think speed is the issue. I probably disabled misc-tests on > drongo and bowerbird (my two animals in question) because I got  either > instability or errors I was unable to diagnose. I'll go back and take > another look to narrow t

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 21:40, Mark Dilger wrote: > > > > On Mar 2, 2021, at 12:04 PM, Joel Jacobson wrote: > > > > On Tue, Mar 2, 2021, at 20:57, Mark Dilger wrote: > >> I didn't phrase that clearly enough. I'm thinking about whether you > >> include the bounds information in the hash func

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 12:04 PM, Joel Jacobson wrote: > > On Tue, Mar 2, 2021, at 20:57, Mark Dilger wrote: >> I didn't phrase that clearly enough. I'm thinking about whether you include >> the bounds information in the hash function. The current implementation of >> hash_range(PG_FUNCTION_A

Re: new heapcheck contrib module

2021-03-02 Thread Robert Haas
On Tue, Mar 2, 2021 at 1:24 PM Robert Haas wrote: > Other than that 0001 looks to me to be in pretty good shape now. Incidentally, we might want to move this to a new thread with a better subject line, since the current subject line really doesn't describe the uncommitted portion of the work. And

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 19:28, Tom Lane wrote: > More generally, values that are visibly different yet compare equal > are user-unfriendly in the extreme. We do have cases like that > (IEEE-float minus zero, area-based compare of some geometric types > come to mind) but they are all warts, not thi

Re: [PATCH] Automatic HASH and LIST partition creation

2021-03-02 Thread Justin Pryzby
https://commitfest.postgresql.org/32/2694/ I don't know what committers will say, but I think that "ALTER TABLE" might be the essential thing for this patch to support, not "CREATE". (This is similar to ALTER..SET STATISTICS, which is not allowed in CREATE.) The reason is that ALTER is what's im

Re: Optimising latch signals

2021-03-02 Thread Thomas Munro
On Mon, Mar 1, 2021 at 2:29 PM Thomas Munro wrote: > Time to watch the buildfarm to find out if my speculation about > illumos is correct... I just heard that damselfly's host has been decommissioned with no immediate plan for a replacement. That was the last of the Solaris-family animals testin

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Chapman Flack
On 03/02/21 14:20, Joel Jacobson wrote: > This would effectively mean there would be absolutely no semantic changes at > all. > > I will work on a new patch to try out this idea. I may have been assuming a degree of orthogonality in SQL that isn't really there ... only in a few situations (like

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 20:57, Mark Dilger wrote: > I didn't phrase that clearly enough. I'm thinking about whether you include > the bounds information in the hash function. The current implementation of > hash_range(PG_FUNCTION_ARGS) is going to hash the lower and upper bounds, > since you d

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 20:20, Joel Jacobson wrote: > On Tue, Mar 2, 2021, at 19:16, Chapman Flack wrote: >> Secretly, in the sense that upper(), lower(), and the default sort >> operator would keep their established behavior, but new functions like >> upper_or_pos(), lower_or_pos() would return th

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 11:42 AM, Mark Dilger wrote: > > > >> On Mar 2, 2021, at 11:34 AM, Joel Jacobson wrote: >> >> Yes. It's random, since equality isn't changed, the sort operation cannot >> tell the difference, and nor could a user who isn't aware of upper() / >> lower() could reveal d

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 11:34 AM, Joel Jacobson wrote: > > Yes. It's random, since equality isn't changed, the sort operation cannot > tell the difference, and nor could a user who isn't aware of upper() / > lower() could reveal differences. This sounds unworkable even just in light of the ori

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 19:17, Mark Dilger wrote: > > On Mar 2, 2021, at 10:08 AM, Joel Jacobson wrote: > > That's why the patch doesn't change equality. > > How does that work if I SELECT DISTINCT ON (nr) ... and then take upper(nr). > It's just random which values I get? Yes. It's random,

Re: GROUP BY DISTINCT

2021-03-02 Thread Georgios
‐‐‐ Original Message ‐‐‐ On Tuesday, March 2, 2021 5:51 PM, Vik Fearing wrote: > On 3/2/21 4:06 PM, Georgios Kokolatos wrote: > > > As a minor gripe, I would note the addition of list_int_cmp. > > The block > > > > - /* Sort each groupset individually */ > > > > > > -

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 19:16, Chapman Flack wrote: > On 03/02/21 13:01, Mark Dilger wrote: > > The problem is not just with lower() and upper(), but with equality testing > > (mentioned upthread), since code may rely on two different "positions" > > (your word) both being equal, and both sorting t

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 17:51, Pantelis Theodosiou wrote: > Marc, perhaps you were referring to this discussion? > https://www.postgresql.org/message-id/4d5534d002250003a...@gw.wicourts.gov I've read through the "Re: Range Types: empty ranges" thread from 2011. My comments: Jeff Davis wrote

Re: GROUP BY DISTINCT

2021-03-02 Thread Georgios Kokolatos
The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: not tested Spec compliant: not tested Documentation:not tested Hi, this is a useful feature, thank you for implementing. I gather that it f

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 10:16 AM, Chapman Flack wrote: > > On 03/02/21 13:01, Mark Dilger wrote: >> The problem is not just with lower() and upper(), but with equality testing >> (mentioned upthread), since code may rely on two different "positions" >> (your word) both being equal, and both sorti

Re: PROXY protocol support

2021-03-02 Thread Arthur Nascimento
Hi, On Tue, 2 Mar 2021 at 14:43, Magnus Hagander wrote: > PFA a simple patch that implements support for the PROXY protocol. Nice. I didn't know I needed this. But in hindsight, I would've used it quite a few times in the past if I could have. > The implementation adds a parameter named proxy_s

Re: Table AM modifications to accept column projection lists

2021-03-02 Thread Zhihong Yu
Hi, + /* Make sure the the new slot is not dependent on the original tuple */ There is duplicate 'the'. For neededColumnContextWalker(), + else if(var->varattno == 0) { I think the if following the else is not needed - I assume var->varattno wouldn't be negative. Similar comment for ex

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Tom Lane
Mark Dilger writes: > On Mar 2, 2021, at 10:08 AM, Joel Jacobson wrote: >> On Tue, Mar 2, 2021, at 19:01, Mark Dilger wrote: >>> The problem is not just with lower() and upper(), but with equality testing >>> (mentioned upthread), since code may rely on two different "positions" >>> (your word)

Re: new heapcheck contrib module

2021-03-02 Thread Robert Haas
On Tue, Mar 2, 2021 at 12:10 PM Mark Dilger wrote: > On further reflection, I decided to implement these changes and not worry > about the behavioral change. Thanks. > I skipped this part. The initcmd argument is only handed to > ParallelSlotsGetIdle(). Doing as you suggest would not really

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 10:08 AM, Joel Jacobson wrote: > > On Tue, Mar 2, 2021, at 19:01, Mark Dilger wrote: >> The problem is not just with lower() and upper(), but with equality testing >> (mentioned upthread), since code may rely on two different "positions" (your >> word) both being equal,

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Chapman Flack
On 03/02/21 13:01, Mark Dilger wrote: > The problem is not just with lower() and upper(), but with equality testing > (mentioned upthread), since code may rely on two different "positions" > (your word) both being equal, and both sorting the same. Could those concerns be addressed perhaps, not by

Re: GiST comment improvement

2021-03-02 Thread Bruce Momjian
On Tue, Mar 2, 2021 at 10:25:23PM +0500, Andrey Borodin wrote: > > > > 2 марта 2021 г., в 21:40, Bruce Momjian написал(а): > > > > In talking to Teodor this week, I have written the attached C comment > > patch which improves our description of GiST's NSN and GistBuildLSN > > values. > > I'd

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 19:01, Mark Dilger wrote: > The problem is not just with lower() and upper(), but with equality testing > (mentioned upthread), since code may rely on two different "positions" (your > word) both being equal, and both sorting the same. That's why the patch doesn't change

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 17:51, Pantelis Theodosiou wrote: > > Marc, perhaps you were referring to this discussion? > https://www.postgresql.org/message-id/4d5534d002250003a...@gw.wicourts.gov Thanks for the link to the discussion. I will real with great interest and learn the arguments, so

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 9:52 AM, Joel Jacobson wrote: > > On Tue, Mar 2, 2021, at 15:42, Tom Lane wrote: >> "Joel Jacobson" writes: >> > As discussed in the separate thread "[PATCH] regexp_positions ( string >> > text, pattern text, flags text ) → setof int4range[]" [1] >> > it's currently not

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 15:42, Tom Lane wrote: > "Joel Jacobson" writes: > > As discussed in the separate thread "[PATCH] regexp_positions ( string > > text, pattern text, flags text ) → setof int4range[]" [1] > > it's currently not possible to create an empty range with bounds > > information.

Re: DETAIL for wrong scram password

2021-03-02 Thread Jacob Champion
On Sat, 2021-02-27 at 17:02 -0500, Jeff Janes wrote: > Note that in one case you do get the "does not match" line. That is > if the user has a scram password assigned and the hba specifies > plain-text 'password' as the method. So if the absence of the DETAIL > is intentional, it is not internall

Re: 2019-03 CF now in progress

2021-03-02 Thread Magnus Hagander
On Tue, Mar 2, 2021 at 1:53 PM David Steele wrote: > > Hi Justin, > > On 3/1/21 6:19 PM, Justin Pryzby wrote: > > Could I suggest to update the CF APP to allow: > > | Target version: 15 > > I don't have permission to add target versions (or at least I can't find > it in the admin interface) so hop

PROXY protocol support

2021-03-02 Thread Magnus Hagander
PFA a simple patch that implements support for the PROXY protocol. This is a protocol common and very light weight in proxies and load balancers (haproxy is one common example, but also for example the AWS cloud load balancers). Basically this protocol prefixes the normal connection with a header

Re: GiST comment improvement

2021-03-02 Thread Andrey Borodin
> 2 марта 2021 г., в 21:40, Bruce Momjian написал(а): > > In talking to Teodor this week, I have written the attached C comment > patch which improves our description of GiST's NSN and GistBuildLSN > values. I'd suggest also add NSN acronym description to Concurrency section of src/backend/a

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Pantelis Theodosiou
On Tue, Mar 2, 2021 at 4:57 PM Mark Dilger wrote: > > > > On Mar 2, 2021, at 8:51 AM, Pantelis Theodosiou > wrote: > > > > > > > > On Tue, Mar 2, 2021 at 3:28 PM Mark Dilger > wrote: > > > > > > > On Mar 2, 2021, at 5:20 AM, Joel Jacobson wrote: > > > > > > it's currently not possible to creat

Re: SQL-standard function body

2021-03-02 Thread Peter Eisentraut
On 11.02.21 09:02, Peter Eisentraut wrote: Here is an updated patch to get it building again. Another updated patch to get things building again.  I've also fixed the last TODO I had in there in qualifying function arguments as necessary in ruleutils.c. Updated patch to resolve merge confli

Re: Table AM modifications to accept column projection lists

2021-03-02 Thread Jacob Champion
On Mon, 2021-03-01 at 23:13 +, Jacob Champion wrote: > On Mon, 2021-03-01 at 16:59 -0600, Justin Pryzby wrote: > > Why is this removed ? > > Mm, both of those analyze.c changes seem suspect. Possibly a mismerge > from the zedstore branch; let me double-check. > > > its (possessive) not it's (

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 8:51 AM, Pantelis Theodosiou wrote: > > > > On Tue, Mar 2, 2021 at 3:28 PM Mark Dilger > wrote: > > > > On Mar 2, 2021, at 5:20 AM, Joel Jacobson wrote: > > > > it's currently not possible to create an empty range with bounds > > information. > > > > This patch t

Re: GROUP BY DISTINCT

2021-03-02 Thread Vik Fearing
On 3/2/21 4:06 PM, Georgios Kokolatos wrote: > As a minor gripe, I would note the addition of list_int_cmp. > The block > > + /* Sort each groupset individually */ > + foreach(cell, result) > + list_sort(lfirst(cell), list_int_cmp); > > Can follow

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Pantelis Theodosiou
On Tue, Mar 2, 2021 at 3:28 PM Mark Dilger wrote: > > > > On Mar 2, 2021, at 5:20 AM, Joel Jacobson wrote: > > > > it's currently not possible to create an empty range with bounds > information. > > > > This patch tries to improve the situation by keeping the bounds > information, > > and allow

GiST comment improvement

2021-03-02 Thread Bruce Momjian
In talking to Teodor this week, I have written the attached C comment patch which improves our description of GiST's NSN and GistBuildLSN values. -- Bruce Momjian https://momjian.us EDB https://enterprisedb.com The usefulness of a cup is in its

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-02 Thread Dilip Kumar
On Tue, Mar 2, 2021 at 7:54 PM Amul Sul wrote: > XLogAcceptWrites() tried to club all the WAL write operations that happen at > the > end of StartupXLOG(). The only exception is that promotion checkpoint. Okay, I was expecting that XLogAcceptWrites should have all the WAL write-related operation

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 5:20 AM, Joel Jacobson wrote: > > it's currently not possible to create an empty range with bounds information. > > This patch tries to improve the situation by keeping the bounds information, > and allow accessing it via lower() and upper(). > > No other semantics have

Re: psql crash while executing core regression tests

2021-03-02 Thread Tom Lane
Hamid Akhtar writes: > I use CentOS 7 with flex 2.5.37 quite extensively have never come across a > psql crash. This seems more like an environment related issue on your > system. Yeah ... also, there are more than a dozen buildfarm animals using 2.5.37, and none of them have shown any sign of di

Re: [PATCH] psql : Improve code for help option

2021-03-02 Thread Fujii Masao
On 2021/03/02 11:57, miyake_kouta wrote: Hi. I found some redundant code in psql/help.c, so I propose a patch to fix it. In the current help.c, the variable "user" is set to the value of $PGUSER (or get_user_name). However, $PGUSER is referenced again in the code that follows. We can replace

Re: [PATCH] postgres-fdw: column option to override foreign types

2021-03-02 Thread Dian M Fay
On Tue Mar 2, 2021 at 6:50 AM EST, Ashutosh Bapat wrote: > On Mon, Mar 1, 2021 at 12:59 PM Dian M Fay wrote: > > > > Full use of a custom data type with postgres_fdw currently requires the > > type be maintained in both the local and remote databases. `CREATE > > FOREIGN TABLE` does not check decl

Re: [PATCH] regexp_positions ( string text, pattern text, flags text ) → setof int4range[]

2021-03-02 Thread Mark Dilger
> On Mar 2, 2021, at 5:34 AM, Isaac Morland wrote: > > Returning to the RE result issue, I wonder how much it actually matters where > any empty matches are. Certainly the actual contents of the match don’t > matter; you don’t need to be able to index into the string to extract the > substr

Re: Add --tablespace option to reindexdb

2021-03-02 Thread Mark Dilger
> On Mar 1, 2021, at 10:04 PM, Michael Paquier wrote: > > On Mon, Mar 01, 2021 at 10:12:54AM -0800, Mark Dilger wrote: >> Your check verifies that reindexing a system table on a new >> tablespace fails, but does not verify what the failure was. I >> wonder if you might want to make it more ro

Re: [PATCH] Support empty ranges with bounds information

2021-03-02 Thread Tom Lane
"Joel Jacobson" writes: > As discussed in the separate thread "[PATCH] regexp_positions ( string text, > pattern text, flags text ) → setof int4range[]" [1] > it's currently not possible to create an empty range with bounds information. > This patch tries to improve the situation by keeping the

Re: psql crash while executing core regression tests

2021-03-02 Thread Hamid Akhtar
I use CentOS 7 with flex 2.5.37 quite extensively have never come across a psql crash. This seems more like an environment related issue on your system. On Tue, Mar 2, 2021 at 1:53 PM walker wrote: > hi > > During installation from source code, there are many crashes for psql > while executing

Re: [PATCH] Bug fix in initdb output

2021-03-02 Thread Alvaro Herrera
On 2021-Mar-02, Nitin Jadhav wrote: > > FWIW, I don't think that it is a good idea to come back to this > > decision for *nix platforms, so I would let it as-is, and use > > relative paths if initdb is called using a relative path. > > The command to be displayed either in absolute path or relati

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-02 Thread Amul Sul
On Tue, Mar 2, 2021 at 5:52 PM Dilip Kumar wrote: > > On Fri, Feb 19, 2021 at 5:43 PM Amul Sul wrote: > > > > In the attached version I have made the changes accordingly what Robert has > > summarised in his previous mail[1]. > > > > In addition to that, I also move the code that updates the cont

  1   2   >