Re: [HACKERS] Custom compression methods

2021-03-02 Thread Dilip Kumar
On Mon, Mar 1, 2021 at 8:53 PM Dilip Kumar wrote: > > Now, I think the only pending thing is related to the expandedrecord, > basically, currently, we have detoasted the compressed filed only in > expanded_record_set_field_internal function. I am still not > completely sure that for the built-in

Re: archive_command / pg_stat_archiver & documentation

2021-03-02 Thread Benoit Lobréau
Thanks ! Le mar. 2 mars 2021 à 04:10, Julien Rouhaud a écrit : > On Tue, Mar 2, 2021 at 9:29 AM Michael Paquier > wrote: > > > > On Mon, Mar 01, 2021 at 05:17:06PM +0800, Julien Rouhaud wrote: > > > Maybe this can be better addressed than with a link in the > > > documentation. The final outco

Re: [PATCH] Bug fix in initdb output

2021-03-02 Thread Nitin Jadhav
> > 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 relative path depends on the way the user is calli

Re: A reloption for partitioned tables - parallel_workers

2021-03-02 Thread Laurenz Albe
On Tue, 2021-03-02 at 11:23 +0900, Amit Langote wrote: > +ALTER TABLE pagg_tab_ml SET (parallel_workers = 0); > +EXPLAIN (COSTS OFF) > +SELECT a FROM pagg_tab_ml WHERE b = 42; > +QUERY PLAN > +--- > + Append > + -> Seq Scan on p

psql crash while executing core regression tests

2021-03-02 Thread walker
hi During installation from source code, there are many crashes for psql while executing core regression tests, all the crashes are similar, the backtrace info as follows: Core was generated by 'psql'. Program terminated with signal 11, Segmentation fault. # 0 0x0043f140 in slash_yyle

Re: Add --tablespace option to reindexdb

2021-03-02 Thread Daniel Gustafsson
> On 2 Mar 2021, at 07:04, Michael Paquier wrote: > I have also removed the assertions based on the version number of the > backend, based on Daniel's input sent upthread. > > What do you think? +1, no objections from me after a readthrough of this version. -- Daniel Gustafsson h

Re: Race condition in recovery?

2021-03-02 Thread Dilip Kumar
On Sat, Jan 23, 2021 at 10:06 AM Dilip Kumar wrote: > > But I am afraid that whether this adjustment (setting based on > receiveTLI) is done based on some analysis or part of some bug fix. I > will try to find the history of this and maybe based on that we can > make a better decision. I have do

Re: Parallel Full Hash Join

2021-03-02 Thread Thomas Munro
On Fri, Feb 12, 2021 at 11:02 AM Melanie Plageman wrote: > I just attached the diff. Squashed into one patch for the cfbot to chew on, with a few minor adjustments to a few comments. From 87c74af25940b0fc85186b0defe6e21ea2324c28 Mon Sep 17 00:00:00 2001 From: Melanie Plageman Date: Wed, 4 Nov 20

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

2021-03-02 Thread Ashutosh Bapat
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 declared types against the remote table, > but declaring e.g. a remote

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

2021-03-02 Thread Magnus Hagander
On Tue, Mar 2, 2021 at 7:52 AM David Rowley wrote: > > On Tue, 2 Mar 2021 at 04:32, Hannu Krosing wrote: > > > > It looks like we are unnecessarily instructing our usiers to vacuum their > > databases in single-user mode when just vacuuming would be enough. > > > > We should fix the error message

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

2021-03-02 Thread Amit Kapila
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 parallel-mode for execution of INSERT with parallel SELECT, a TransactionId is a

Re: [Patch] ALTER SYSTEM READ ONLY

2021-03-02 Thread Dilip Kumar
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 control file to > XLogAcceptWrites() which will also get skipped when

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

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 06:31, Tom Lane wrote: >"Joel Jacobson" writes: >> Unless fixed, then the way I see it, I don't think we can use int4range[] >> for regexp_positions(), > >Yeah. It's a cute idea, but the semantics aren't quite right. I think there is a case to allow creating empty ranges

Re: buildfarm windows checks / tap tests on windows

2021-03-02 Thread Andrew Dunstan
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 figured out that that's > not a fault of the aio br

Re: 2019-03 CF now in progress

2021-03-02 Thread David Steele
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 hopefully Michael or Magnus can do it. Regards, -- -David da...@pgmas

Re: pg_upgrade version checking questions

2021-03-02 Thread Peter Eisentraut
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 of validate_exec is easy to do if it's deemed not worth it to export

[PATCH] Support empty ranges with bounds information

2021-03-02 Thread Joel Jacobson
Hi, 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 bounds information, and allo

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

2021-03-02 Thread Isaac Morland
On Tue, 2 Mar 2021 at 00:52, Joel Jacobson wrote: > Ranges are treated as sets. As such equality is defined by membership. > > That being said, I agree that there may be situations in which it would be > convenient to have empty ranges at specific locations. Doing this would > introduce numerous

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

2021-03-02 Thread Joel Jacobson
Hi Isaac, Many thanks for the comments. On Tue, Mar 2, 2021, at 14:34, Isaac Morland wrote: > One question I would have is whether empty ranges are all equal to each > other. If they are, you have an equality that isn’t really equality; if they > aren’t then you would have ranges that are unequ

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

2021-03-02 Thread Isaac Morland
On Tue, 2 Mar 2021 at 08:58, Joel Jacobson wrote: > If we stipulate that the result array will be in order, then you still > don’t have the exact location of empty matches but you do at least have > where they are relative to non-empty matches. > > > This part I didn't fully understand. Can you p

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

2021-03-02 Thread Pavel Borisov
> > I completely agree that checking uniqueness requires looking at the heap, > but I don't agree that every caller of bt_index_check on an index wants > that particular check to be performed. There are multiple ways in which an > index might be corrupt, and Peter wrote the code to only check some

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

2021-03-02 Thread Joel Jacobson
On Tue, Mar 2, 2021, at 15:05, Isaac Morland wrote: > Suppose the match results are: > > [4,8) > [10,10) > [13,16) > [20,20) > [24,24) > > Then this gets turned into: > > [4,8) > empty > [13,16) > empty > empty > > So you know that there are non-empty matches from 4-8 and 13-16, plus an > empt

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

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: 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] 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: 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] 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: [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] 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: 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] 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: [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

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] 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

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 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: 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: 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: [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: 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

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: 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

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: [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: [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 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 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: 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 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: [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: 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 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: 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: 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: [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: 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 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: [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: 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: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: [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 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 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 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 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: 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] 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: [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: 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 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: [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: 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 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: 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: 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: 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: 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: 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: 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: 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: 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 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: 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: 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: 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 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: 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

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: 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

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: 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: 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: [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: [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

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] 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

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: 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: 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

  1   2   >