Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 10:39 PM Tom Lane wrote: > Hmm. Usually this sort of software gets more weird in newer > versions, not less so ;-). Still, it's a starting point. In case I was unclear: I meant to suggest that this may have something to do with Ubuntu having patched the Debian package for

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Peter Geoghegan writes: > On Fri, Jan 3, 2020 at 10:39 PM Tom Lane wrote: >> Attached is a blind attempt to fix this by allowing escape >> sequence(s) instead of spaces between the words. Does this >> work for you? > I'm afraid not; no apparent change. No change in the "Actual output > was" lin

Re: WIP/PoC for parallel backup

2020-01-03 Thread Asif Rehman
On Thu, Dec 19, 2019 at 10:47 PM Robert Haas wrote: > On Thu, Dec 12, 2019 at 10:20 AM Asif Rehman > wrote: > > I have updated the patches (v7 attached) and have taken care of all > issues pointed by Jeevan, additionally > > ran the pgindent on each patch. Furthermore, Command names have been >

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 10:39 PM Tom Lane wrote: > Attached is a blind attempt to fix this by allowing escape > sequence(s) instead of spaces between the words. Does this > work for you? I'm afraid not; no apparent change. No change in the "Actual output was" line, either. -- Peter Geoghegan

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Peter Geoghegan writes: > On Fri, Jan 3, 2020 at 9:30 PM Tom Lane wrote: >> BTW, it seems somewhat likely that this is less about libreadline >> than about its dependency libtinfo. On my machine that's from >> ii libtinfo6:amd64 6.1+20181013-2+deb10u2 >> amd

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-01-03 Thread Dilip Kumar
On Sat, Jan 4, 2020 at 10:00 AM Amit Kapila wrote: > > On Sun, Dec 29, 2019 at 1:34 PM Dilip Kumar wrote: > > On Sat, Dec 28, 2019 at 9:33 PM Tomas Vondra > > wrote: > > +static void > > +set_schema_sent_in_streamed_txn(RelationSyncEntry *entry, TransactionId > > xid) > > +{ > > + MemoryContext

Re: [Proposal] Table-level Transparent Data Encryption (TDE) and Key Management Service (KMS)

2020-01-03 Thread cary huang
Hello Sawada and all I would like to elaborate more on Sehrope and Sawada's discussion on passing NULL IV in "pg_cipher_encrypt/decrypt" functions during kmgr_wrap_key and kmgr_unwrap_key routines in kmgr_utils.c. Openssl implements key wrap according to RFC3394 as Sawada mentioned and passing

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 9:30 PM Tom Lane wrote: > BTW, it seems somewhat likely that this is less about libreadline > than about its dependency libtinfo. On my machine that's from > > ii libtinfo6:amd64 6.1+20181013-2+deb10u2 > amd64shared low-level te

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Peter Geoghegan writes: > On Fri, Jan 3, 2020 at 7:06 PM Peter Geoghegan wrote: >> No. Also tried setting PG_COLOR="off" and CLICOLOR=0 -- that also >> didn't help. (This was based on possibly-relevant vars that "env" >> showed were set). Yeah, that's not terribly surprising, because if I'm read

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-01-03 Thread Amit Kapila
On Sun, Dec 29, 2019 at 1:34 PM Dilip Kumar wrote: > On Sat, Dec 28, 2019 at 9:33 PM Tomas Vondra > wrote: > > > > > > Yeah, the "is_schema_sent" flag in ReorderBufferTXN does not work - it > > needs to be in the RelationSyncEntry. In fact, I already have code for > > that in my private repositor

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 7:06 PM Peter Geoghegan wrote: > No. Also tried setting PG_COLOR="off" and CLICOLOR=0 -- that also > didn't help. (This was based on possibly-relevant vars that "env" > showed were set). Removing the single check_completion() test from 010_tab_completion.pl that actually fa

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 6:51 PM Tom Lane wrote: > Hmm. If you set it to plain "xterm", does the test pass? No. Also tried setting PG_COLOR="off" and CLICOLOR=0 -- that also didn't help. (This was based on possibly-relevant vars that "env" showed were set). -- Peter Geoghegan

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Peter Geoghegan writes: >> I'm curious also what is your prevailing setting >> of TERM? > I use zsh, with a fairly customized setup. $TERM is "xterm-256color" > in the affected shell. (I have a feeling that this has something to do > with my amazing technicolor terminal.) Hmm. If you set it to

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 6:16 PM Tom Lane wrote: > Huh. What readline or libedit version are you using, on what > platform? Ubuntu 18.04. I used ldd to verify that psql links to the system libreadline, which is libreadline7:amd64 -- that's what Debian packages as "7.0-3". > I'm curious also what

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 03/01/2020 20:14, Fabien COELHO wrote: > > Bonsoir Vik, > >  +int4gcd_internal(int32 arg1, int32 arg2) >  +{ >  +   int32   swap; >  + >  +   /* >  +    * Put the greater value in arg1. >  +    * This would happen automatically in the loop below, but > avoids  an >  +    * ex

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Peter Geoghegan writes: > Not sure if the specifics matter, but FWIW "make check-world" ended > with the following failure just now: > # Failed test 'offer multiple table choices' > # at t/010_tab_completion.pl line 105. > # Actual output was "\r\n\e[01;35mmytab\e[0m\e[K123\e[0m\e[K > \e[01;3

Re: Assigning ROW variable having NULL value to RECORD type variable doesn't give any structure to the RECORD variable.

2020-01-03 Thread Ashutosh Sharma
On Sat, Jan 4, 2020 at 2:09 AM Tom Lane wrote: > > Robert Haas writes: > > On Wed, Jan 1, 2020 at 10:50 AM Ashutosh Sharma > > wrote: > >> I know this is expected to happen considering the changes done in > >> above commit because from this commit onwards, NULL value assigned to > >> any row va

Re: [HACKERS] Block level parallel vacuum

2020-01-03 Thread Amit Kapila
On Fri, Jan 3, 2020 at 10:15 PM Robert Haas wrote: > > On Sun, Dec 29, 2019 at 4:23 PM Tomas Vondra > wrote: > > IMO there's not much reason for the leader not to participate. For > > regular queries the leader may be doing useful stuff (essentially > > running the non-parallel part of the query)

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Peter Geoghegan
On Fri, Jan 3, 2020 at 9:59 AM Robert Haas wrote: > I take no position on whether Debian is correct in its assessment of > such things, but I reiterate my previous opposition to breaking it > just because we don't agree with it, or because Tom specifically > doesn't. It's too mainstream a platform

Re: sidewinder has one failure

2020-01-03 Thread Amit Kapila
On Sat, Jan 4, 2020 at 6:19 AM Tom Lane wrote: > > =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: > > I tried starting it from cron and then I got: > > max_safe_fds = 981, usable_fds = 1000, already_open = 9 > > Oh! There we have it then. > Right. > I wonder if that's a cron bug (neglecting > t

Re: sidewinder has one failure

2020-01-03 Thread Tom Lane
=?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: > I tried starting it from cron and then I got: > max_safe_fds = 981, usable_fds = 1000, already_open = 9 Oh! There we have it then. I wonder if that's a cron bug (neglecting to close its own FDs before forking children) or intentional (maybe it uses

Re: sidewinder has one failure

2020-01-03 Thread Tom Lane
=?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: > On 2020-01-04 01:15, Tom Lane wrote: >> Apparently, in the environment of that TAP test, the server has more >> open FDs at this point than it does when running "normally". I have >> no idea what the additional FDs might be. > Well it's running under

Re: sidewinder has one failure

2020-01-03 Thread Mikael Kjellström
On 2020-01-04 01:21, Mikael Kjellström wrote: Apparently, in the environment of that TAP test, the server has more open FDs at this point than it does when running "normally".  I have no idea what the additional FDs might be. Well it's running under cron if that makes a difference and what is

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 04/01/2020 01:26, Vik Fearing wrote: > On 04/01/2020 01:21, Tom Lane wrote: >> Vik Fearing writes: >>> On 03/01/2020 20:14, Fabien COELHO wrote: I'm unsure about gcd(INT_MIN, 0) should error. Possibly 0 would be nicer? >>> What justification for that do you have? >> Zero is the "correct" a

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Vik Fearing writes: > On 04/01/2020 01:21, Tom Lane wrote: >> Zero is the "correct" answer for that, isn't it, independently of overflow >> considerations? > I would say not. Oh, right, I was misremembering the identity gcd(a,0) as being 0 not a. Never mind that then. > The correct answer is

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 04/01/2020 01:21, Tom Lane wrote: > Vik Fearing writes: >> On 03/01/2020 20:14, Fabien COELHO wrote: >>> I'm unsure about gcd(INT_MIN, 0) should error. Possibly 0 would be nicer? >> What justification for that do you have? > Zero is the "correct" answer for that, isn't it, independently of over

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Vik Fearing writes: > On 03/01/2020 20:14, Fabien COELHO wrote: >> I'm unsure about gcd(INT_MIN, 0) should error. Possibly 0 would be nicer? > What justification for that do you have? Zero is the "correct" answer for that, isn't it, independently of overflow considerations? We should strive to

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 04/01/2020 00:49, Tom Lane wrote: > Vik Fearing writes: >> On 03/01/2020 20:14, Fabien COELHO wrote: >>> The point of swapping is to a void possibly expensive modulo, but this >>> should be done on absolute values, otherwise it may not achieve its >>> purpose as stated by the comment? >> Ah, tr

Re: sidewinder has one failure

2020-01-03 Thread Mikael Kjellström
On 2020-01-04 01:15, Tom Lane wrote: =?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: I think Tom Lane found the "problem". It has to do with the semaphores taking up FD's. Hm, no, because: Yes, saw that after I posted my answer. Sure. I compiled pgsql 12 and this is the complete logfile aft

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Andres Freund writes: > On 2020-01-03 18:49:18 -0500, Tom Lane wrote: >> On a machine with single-cycle divide, it's likely that the extra >> compare-and-branch is a net loss. > Which architecture has single cycle division? I think it's way above > that, based on profiles I've seen. And Agner see

Re: sidewinder has one failure

2020-01-03 Thread Tom Lane
=?UTF-8?Q?Mikael_Kjellstr=c3=b6m?= writes: > I think Tom Lane found the "problem". It has to do with the semaphores > taking up FD's. Hm, no, because: > Sure. I compiled pgsql 12 and this is the complete logfile after > starting up the server the first time with log_min_messages=debug2: > 20

Re: Greatest Common Divisor

2020-01-03 Thread Andres Freund
Hi, On 2020-01-03 18:49:18 -0500, Tom Lane wrote: > On some older RISC architectures, integer division is really slow, like > slower than floating-point. I'm not sure if that's true on any platform > people still care about though. In recent years, CPU architects have been > able to throw all th

Re: sidewinder has one failure

2020-01-03 Thread Mikael Kjellström
On 2020-01-03 15:48, Amit Kapila wrote: On Fri, Jan 3, 2020 at 7:03 PM Amit Kapila wrote: I debugged on HEAD and found that we are closing all the files (like postgresql.conf, postgresql.auto.conf, etc.) that got opened before set_max_safe_fds. I think on HEAD the 3 already opened files are

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Vik Fearing writes: > On 03/01/2020 20:14, Fabien COELHO wrote: >> The point of swapping is to a void possibly expensive modulo, but this >> should be done on absolute values, otherwise it may not achieve its >> purpose as stated by the comment? > Ah, true. How widespread are these architectures

Re: Greatest Common Divisor

2020-01-03 Thread Andres Freund
On 2020-01-03 18:00:01 -0500, Tom Lane wrote: > Alvaro Herrera writes: > > On 2020-Jan-03, Robert Haas wrote: > >> Then every time we add a function, or anything else, we can bikeshed > >> about whether it should go in pg_catalog or pg_extra! > > > Yeah, I was just thinking about that :-) I was

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Alvaro Herrera writes: > On 2020-Jan-03, Robert Haas wrote: >> Then every time we add a function, or anything else, we can bikeshed >> about whether it should go in pg_catalog or pg_extra! > Yeah, I was just thinking about that :-) I was thinking that all > standard-mandated functions, as well a

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 03/01/2020 20:14, Fabien COELHO wrote: > > Bonsoir Vik, > >  +int4gcd_internal(int32 arg1, int32 arg2) >  +{ >  +   int32   swap; >  + >  +   /* >  +    * Put the greater value in arg1. >  +    * This would happen automatically in the loop below, but > avoids  an >  +    * ex

Re: Greatest Common Divisor

2020-01-03 Thread Alvaro Herrera
On 2020-Jan-03, Robert Haas wrote: > On Fri, Jan 3, 2020 at 4:11 PM Alvaro Herrera > wrote: > > Maybe a very simple solution is indeed to have a separate pg_math or > > pg_extra or whatever, which by default is *last* in the search_path. > > That would make a user's gcd() be chosen preferently,

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 4:11 PM Alvaro Herrera wrote: > Maybe a very simple solution is indeed to have a separate pg_math or > pg_extra or whatever, which by default is *last* in the search_path. > That would make a user's gcd() be chosen preferently, if one exists. Then every time we add a functi

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 3:51 PM Merlin Moncure wrote: > Is that right? Default search_path is for pg_catalog to resolve before > public. Lightly testing with a hand rolled pg_advisory_lock > implementation that raise a notice, my default database seemed to > prefer the build in function. Maybe I'

Re: Online checksums patch - once again

2020-01-03 Thread Robert Haas
On Mon, Dec 16, 2019 at 10:16 AM Daniel Gustafsson wrote: > If reviewers think this version is nearing completion, then a v16 should > address the comment below, but as this version switches its underlying > infrastructure it seemed usefel for testing still. I think this patch still needs a lot o

Re: Removal of support for OpenSSL 0.9.8 and 1.0.0

2020-01-03 Thread Daniel Gustafsson
> On 3 Jan 2020, at 07:49, Michael Paquier wrote: > > On Thu, Jan 02, 2020 at 11:45:37PM -0500, Tom Lane wrote: >> Ah. The CF app doesn't understand that (and hence the cfbot ditto), >> so you might want to repost just the currently-proposed patch to get >> the cfbot to try it. > > Yes, let's d

Re: Greatest Common Divisor

2020-01-03 Thread Chapman Flack
On 1/3/20 4:10 PM, Alvaro Herrera wrote: > Maybe a very simple solution is indeed to have a separate pg_math or > pg_extra or whatever, which by default is *last* in the search_path. > That would make a user's gcd() be chosen preferently, if one exists. I'm liking the direction this is going. Re

Re: Greatest Common Divisor

2020-01-03 Thread Alvaro Herrera
On 2020-Jan-03, Merlin Moncure wrote: > On Fri, Jan 3, 2020 at 1:32 PM Robert Haas wrote: > > True, but because of the way search_path is typically set, they'd > > probably continue to get their own version anyway, so I'm not sure > > what the problem is. > > Is that right? Default search_path

Re: Greatest Common Divisor

2020-01-03 Thread Chapman Flack
On 1/3/20 3:09 PM, Peter Eisentraut wrote: > Geometry is generally in scope, though, for Postgres specifically and > for databases in general. > > Abstract algebra is not in scope, so far, and we still haven't been told > the use case for this. It's funny, I think I've used gcd and lcm in real li

Re: Greatest Common Divisor

2020-01-03 Thread Merlin Moncure
On Fri, Jan 3, 2020 at 1:32 PM Robert Haas wrote: > > On Fri, Jan 3, 2020 at 2:27 PM Chapman Flack wrote: > > On 1/3/20 2:11 PM, Robert Haas wrote: > > > and moving things to another schema does not help with that. It does > > > potentially help with the namespace pollution issue, but how much of

Re: Assigning ROW variable having NULL value to RECORD type variable doesn't give any structure to the RECORD variable.

2020-01-03 Thread Tom Lane
Robert Haas writes: > On Wed, Jan 1, 2020 at 10:50 AM Ashutosh Sharma wrote: >> I know this is expected to happen considering the changes done in >> above commit because from this commit onwards, NULL value assigned to >> any row variable represents a true NULL composite value before this >> comm

Re: global / super barriers (for checksums)

2020-01-03 Thread Robert Haas
On Mon, Dec 9, 2019 at 10:42 AM Robert Haas wrote: > > Hm. In my mental model it would be useful for barrier "processors" to > > not acknowledge the state change at certain points. Imagine e.g. needing > > to efficiently wait till all backends have processed a config file > > reload - since we don

Re: color by default

2020-01-03 Thread Jeff Janes
On Tue, Dec 31, 2019 at 8:35 AM Tom Lane wrote: > Peter Eisentraut writes: > > With the attached patch, I propose to enable the colored output by > > default in PG13. > > FWIW, I shall be setting NO_COLOR permanently if this gets committed. > I wonder how many people there are who actually *like

Re: Greatest Common Divisor

2020-01-03 Thread Peter Eisentraut
On 2020-01-03 16:22, Tom Lane wrote: Peter Eisentraut writes: On 2020-01-02 15:50, Dean Rasheed wrote: Out of curiosity, what was the original use-case for this? Yeah, I'm wondering, is this useful for any typical analytics or business application? Otherwise, abstract algebra functionality

Re: weird libpq GSSAPI comment

2020-01-03 Thread Robbie Harwood
Alvaro Herrera writes: > How about this? > > * If GSSAPI is enabled and we can reach a credential cache, > * set up a handle for it; if it's operating, just send a > * GSS startup message, instead of the SSL negotiation and > * r

Re: Assigning ROW variable having NULL value to RECORD type variable doesn't give any structure to the RECORD variable.

2020-01-03 Thread Pavel Stehule
pá 3. 1. 2020 v 19:57 odesílatel Robert Haas napsal: > On Wed, Jan 1, 2020 at 10:50 AM Ashutosh Sharma > wrote: > > I know this is expected to happen considering the changes done in > > above commit because from this commit onwards, NULL value assigned to > > any row variable represents a true N

Re: backup manifests

2020-01-03 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Jan 3, 2020 at 12:01 PM Stephen Frost wrote: > > You're certainly intending to do *something* with the manifest, and > > while I appreciate that you feel you've come up with a complete use-case > > that this simple manifest will be

Re: aggregate crash

2020-01-03 Thread Andres Freund
Hi, On 2019-12-27 20:13:26 +0300, Teodor Sigaev wrote: > Found crash on production instance, assert-enabled build crashes in pfree() > call, with default config. v11, v12 and head are affected, but, seems, you > need to be a bit lucky. > > The bug is comparing old and new aggregate pass-by-ref va

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 2:27 PM Chapman Flack wrote: > On 1/3/20 2:11 PM, Robert Haas wrote: > > and moving things to another schema does not help with that. It does > > potentially help with the namespace pollution issue, but how much of > > an issue is that anyway? Unless you've set up an unusual

Re: Greatest Common Divisor

2020-01-03 Thread Chapman Flack
On 1/3/20 2:11 PM, Robert Haas wrote: > and moving things to another schema does not help with that. It does > potentially help with the namespace pollution issue, but how much of > an issue is that anyway? Unless you've set up an unusual search_path > configuration, your own schemas probably prece

Re: weird libpq GSSAPI comment

2020-01-03 Thread Robbie Harwood
Stephen Frost writes: > Greetings, > > (I've added Robbie to this thread, so he can correct me if/when I go > wrong in my descriptions regarding the depths of GSSAPI ;) Hi, appreciate the CC since I'm not subscribed anymore. Thanks for your patience while I was PTO. > * Alvaro Herrera (alvhe..

Re: Greatest Common Divisor

2020-01-03 Thread Fabien COELHO
Bonsoir Vik, +int4gcd_internal(int32 arg1, int32 arg2) +{ + int32 swap; + + /* +* Put the greater value in arg1. +* This would happen automatically in the loop below, but avoids an +* expensive modulo simulation on some architectures. +*/

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 1:57 PM Chapman Flack wrote: > Is there a middle ground staring us in the face, where certain things > could be added in core, but in a new schema like pg_math (pg_ !), so > if you want them you put them on your search path or qualify them > explicitly, and if you don't, you

Re: Greatest Common Divisor

2020-01-03 Thread Chapman Flack
On 1/3/20 1:46 PM, Robert Haas wrote: > On Fri, Jan 3, 2020 at 1:10 PM Merlin Moncure wrote: >> Just stop doing it. It's very little extra work to package an item >> into an extension and this protects your hapless users who might have >> implemented a function called gcd() that does something di

Re: Assigning ROW variable having NULL value to RECORD type variable doesn't give any structure to the RECORD variable.

2020-01-03 Thread Robert Haas
On Wed, Jan 1, 2020 at 10:50 AM Ashutosh Sharma wrote: > I know this is expected to happen considering the changes done in > above commit because from this commit onwards, NULL value assigned to > any row variable represents a true NULL composite value before this > commit it used to be a tuple wi

Re: [PATCH] Increase the maximum value track_activity_query_size

2020-01-03 Thread Tom Lane
Robert Haas writes: > I vote for not trying to make this more complicated and just accepting > the original proposal. It's about a factor of ten increase over the > limit we have right now, which doesn't seem like enough to cause any > real breakage, and it should be enough to satisfy the majority

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 1:10 PM Merlin Moncure wrote: > Just stop doing it. It's very little extra work to package an item > into an extension and this protects your hapless users who might have > implemented a function called gcd() that does something different. > Ideally, the public namespace sh

Re: [PATCH] Increase the maximum value track_activity_query_size

2020-01-03 Thread Robert Haas
On Thu, Jan 2, 2020 at 3:27 PM Jeff Janes wrote: > I've seen some pretty big IN-lists and VALUES lists. They aren't so hard to > debug once you tune out iterations 3 through N-3 of the list members. Unless > they are hard to debug for other reasons. In these cases, it would be > helpful, if

Re: Greatest Common Divisor

2020-01-03 Thread Vik Fearing
On 02/01/2020 16:12, Tom Lane wrote: > Stephen Frost writes: >> * Dean Rasheed (dean.a.rash...@gmail.com) wrote: >>> I'm not objecting to adding it, I'm just curious. In fact, I think >>> that if we do add this, then we should probably add lcm() at the same >>> time, since handling its overflow ca

Re: \d is not showing global(normal) table info if we create temporary table with same name as global table

2020-01-03 Thread Mahendra Singh Thalor
On Fri, 3 Jan 2020 at 00:40, Tom Lane wrote: > > Robert Haas writes: > > On Thu, Jan 2, 2020 at 12:59 PM Mahendra Singh wrote: > >> While reading code and doing some testing, I found that if we create a > >> temporary table with same name as we created a normal(global) table, then > >> \d is s

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane 2020-01-03 <26339.1578072...@sss.pgh.pa.us> >> You do? I went looking in the Debian package source repo just the >> other day for some evidence that that was true, and couldn't find >> any, so I concluded that it was only an urban legend. Where is that >> do

Re: color by default

2020-01-03 Thread Robert Haas
On Thu, Jan 2, 2020 at 6:38 PM Gavin Flower wrote: > I find coloured output very difficult to read, as the colours seem to be > chosen on the basis everyone uses white as the background colour for > terminals -- whereas I use black, as do a lot of other people. I don't like colored output either.

Re: Greatest Common Divisor

2020-01-03 Thread Merlin Moncure
On Fri, Jan 3, 2020 at 10:24 AM Robert Haas wrote: > > On Fri, Jan 3, 2020 at 10:23 AM Tom Lane wrote: > > Now, those functions were just exposing libc functionality, so there > > wasn't a lot of code to write. There might be a good argument that > > gcd isn't useful enough to justify the amount

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 12:48 PM Christoph Berg wrote: > > Perhaps more importantly, *why* is it done? It seems to me that it > > takes a pretty fevered imagination to suppose that using libreadline > > Tom, claiming that things are "fevered" just because you didn't like > them is not appropriate.

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
ilm...@ilmari.org (Dagfinn Ilmari =?utf-8?Q?Manns=C3=A5ker?=) writes: > Tom Lane writes: >> Anybody know an easy way to do that in Perl? > I was going to suggest using Test::More's like() function to do the > regex check, but sadly that only escapes things that would break the TAP > stream syntax

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Christoph Berg
Re: Tom Lane 2020-01-03 <26339.1578072...@sss.pgh.pa.us> > Christoph Berg writes: > > Re: Tom Lane 2020-01-03 <13708.1578059...@sss.pgh.pa.us> > >> I found out while investigating this that the libedit version shipping > >> with buster (3.1-20181209) is differently broken for the same case: > > >

Re: accounting for memory used for BufFile during hash joins

2020-01-03 Thread Melanie Plageman
On Mon, Nov 25, 2019 at 10:11 AM Tomas Vondra wrote: > On Mon, Nov 25, 2019 at 05:33:35PM +0900, Michael Paquier wrote: > >On Tue, Sep 10, 2019 at 03:47:51PM +0200, Tomas Vondra wrote: > >> My feeling is that we should get the BNLJ committed first, and then > maybe > >> use some of those addition

Re: backup manifests

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 12:01 PM Stephen Frost wrote: > You're certainly intending to do *something* with the manifest, and > while I appreciate that you feel you've come up with a complete use-case > that this simple manifest will be sufficient for, I frankly doubt > that'll actually be the case.

Re: Greatest Common Divisor

2020-01-03 Thread Alvaro Herrera
On 2020-Jan-03, Robert Haas wrote: > On Fri, Jan 3, 2020 at 10:23 AM Tom Lane wrote: > > Now, those functions were just exposing libc functionality, so there > > wasn't a lot of code to write. There might be a good argument that > > gcd isn't useful enough to justify the amount of code we'd have

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane 2020-01-03 <13708.1578059...@sss.pgh.pa.us> >> I found out while investigating this that the libedit version shipping >> with buster (3.1-20181209) is differently broken for the same case: > (Fwiw this wasn't spotted before because we have this LD_PRELOAD hac

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > Also, while I'm asking for Perl advice: I can see in my editor that > there's a control-G bell character in that string, but this is far > from obvious on the web page. I'd kind of like to get the report > to escapify control characters so that what comes out is more like > >

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Christoph Berg
Re: Tom Lane 2020-01-03 <13708.1578059...@sss.pgh.pa.us> > I found out while investigating this that the libedit version shipping > with buster (3.1-20181209) is differently broken for the same case: (Fwiw this wasn't spotted before because we have this LD_PRELOAD hack that replaces libedit with r

Re: backup manifests

2020-01-03 Thread Stephen Frost
Greetings, * Robert Haas (robertmh...@gmail.com) wrote: > On Fri, Jan 3, 2020 at 11:44 AM Stephen Frost wrote: > > Sure, it'd be work, and for "adding a simple backup manifest", maybe too > > much to be worth considering ... but that's not what is going on here, > > is it? Are we really *just* g

Re: sidewinder has one failure

2020-01-03 Thread Tom Lane
I wrote: > Amit Kapila writes: >> The problem we are seeing on this machine is that I think we have >> seven files opened before we reach function set_max_safe_fds during >> startup. Now, it is not clear to me why it is opening extra file(s) >> during start-up as compare to other machines. > May

Re: backup manifests

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 11:44 AM Stephen Frost wrote: > Sure, it'd be work, and for "adding a simple backup manifest", maybe too > much to be worth considering ... but that's not what is going on here, > is it? Are we really *just* going to add a backup manifest to > pg_basebackup and call it done

Re: [HACKERS] Block level parallel vacuum

2020-01-03 Thread Robert Haas
On Sun, Dec 29, 2019 at 4:23 PM Tomas Vondra wrote: > IMO there's not much reason for the leader not to participate. For > regular queries the leader may be doing useful stuff (essentially > running the non-parallel part of the query) but AFAIK for VAUCUM that's > not the case and the worker is no

Re: backup manifests

2020-01-03 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Robert Haas writes: > > AFAICS, the only options to make that work with JSON are (1) introduce > > a new hand-coded JSON parser designed for frontend operation, (2) add > > a dependency on an external JSON parser that we can use from frontend >

Re: Greatest Common Divisor

2020-01-03 Thread Robert Haas
On Fri, Jan 3, 2020 at 10:23 AM Tom Lane wrote: > Now, those functions were just exposing libc functionality, so there > wasn't a lot of code to write. There might be a good argument that > gcd isn't useful enough to justify the amount of code we'd have to > add (especially if we allow it to scop

explain HashAggregate to report bucket and memory stats

2020-01-03 Thread Justin Pryzby
On Sun, Feb 17, 2019 at 11:29:56AM -0500, Jeff Janes wrote: https://www.postgresql.org/message-id/CAMkU%3D1zBJNVo2DGYBgLJqpu8fyjCE_ys%2Bmsr6pOEoiwA7y5jrA%40mail.gmail.com > What would I find very useful is [...] if the HashAggregate node under > "explain analyze" would report memory and bucket stat

Re: Greatest Common Divisor

2020-01-03 Thread Tom Lane
Peter Eisentraut writes: > On 2020-01-02 15:50, Dean Rasheed wrote: >> Out of curiosity, what was the original use-case for this? > Yeah, I'm wondering, is this useful for any typical analytics or > business application? Otherwise, abstract algebra functionality seems a > bit out of scope. No

Re: Fetching timeline during recovery

2020-01-03 Thread Jehan-Guillaume de Rorthais
Hi, On Mon, 23 Dec 2019 15:38:16 +0100 Jehan-Guillaume de Rorthais wrote: [...] > My idea would be to return a row from pg_stat_get_wal_receiver() as soon as > a wal receiver has been replicating during the uptime of the standby, no > matter if there's one currently working or not. If no wal rece

Re: sidewinder has one failure

2020-01-03 Thread Tom Lane
Amit Kapila writes: > On Fri, Jan 3, 2020 at 6:34 PM Mikael Kjellström > wrote: >> Why is this machine different from everybody else when it comes to this >> limit? > The problem we are seeing on this machine is that I think we have > seven files opened before we reach function set_max_safe_fds

Re: Allow an alias to be attached directly to a JOIN ... USING

2020-01-03 Thread Fabien COELHO
Hello Peter, I took another crack at this. Attached is a new patch that addresses the semantic comments from this and the other thread. It's all a bit tricky, comments welcome. It seems that this patch does not apply anymore after Tom's 5815696. -- Fabien.

Re: Recognizing superuser in pg_hba.conf

2020-01-03 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > > On Thu, Jan 2, 2020 at 15:50 Tom Lane wrote: > >> To cover the proposed functionality, you'd still need some way to > >> select not-superuser. So I don't think this fully answers the need > >> even if we wanted to do

Re: sidewinder has one failure

2020-01-03 Thread Amit Kapila
On Fri, Jan 3, 2020 at 7:03 PM Amit Kapila wrote: > > On Fri, Jan 3, 2020 at 6:34 PM Mikael Kjellström > wrote: > > > > > > On 2020-01-03 13:01, Amit Kapila wrote: > > > > > 2020-01-02 19:51:05.687 CET [24138:3] FATAL: insufficient file > > > descriptors available to start server process > > > 2

Re: Add support for automatically updating Unicode derived files

2020-01-03 Thread John Naylor
On Thu, Dec 26, 2019 at 12:39 PM Peter Eisentraut wrote: > > On 2019-12-19 23:48, John Naylor wrote: > > I would print out the full boilerplate like for other generated headers. > > Hmm, you are probably comparing with > src/common/unicode/generate-unicode_norm_table.pl, but other file > generatin

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Christoph Berg writes: > Shouldn't this print some "expected foo, got bar" diagnostics instead > of just dying? BTW, as far as that goes, we do: see for instance the tail end of https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=desmoxytes&dt=2020-01-02%2020%3A04%3A03 ok 8 - offer multiple

Re: pgsql: Add basic TAP tests for psql's tab-completion logic.

2020-01-03 Thread Tom Lane
Christoph Berg writes: > Re: Tom Lane 2020-01-02 >> Add basic TAP tests for psql's tab-completion logic. > The \DRD test fails on Debian/unstable: Indeed. It appears that recent libedit breaks tab-completion for words involving a backslash, which is the fault of this upstream commit: http://c

Re: BUG #16059: Tab-completion of filenames in COPY commands removes required quotes

2020-01-03 Thread Tom Lane
Peter Eisentraut writes: > On 2019-11-03 23:40, Tom Lane wrote: >> * The patch now always quotes completed filenames, so quote_if_needed() >> is misnamed and overcomplicated for this use-case. I left the extra >> generality in place for possible future use. On the other hand, this >> is the*only

Re: sidewinder has one failure

2020-01-03 Thread Amit Kapila
On Fri, Jan 3, 2020 at 6:34 PM Mikael Kjellström wrote: > > > On 2020-01-03 13:01, Amit Kapila wrote: > > > 2020-01-02 19:51:05.687 CET [24138:3] FATAL: insufficient file > > descriptors available to start server process > > 2020-01-02 19:51:05.687 CET [24138:4] DETAIL: System allows 19, we > >

Re: WIP: System Versioned Temporal Table

2020-01-03 Thread Vik Fearing
On 03/01/2020 11:57, Surafel Temesgen wrote: > > > On Thu, Jan 2, 2020 at 12:12 AM Vik Fearing > mailto:vik.fear...@2ndquadrant.com>> wrote: > > This does not compile against current head (0ce38730ac). > > > gram.y: error: shift/reduce conflicts: 6 found, 0 expected > > > Rebased and confli

Re: sidewinder has one failure

2020-01-03 Thread Mikael Kjellström
On 2020-01-03 13:01, Amit Kapila wrote: 2020-01-02 19:51:05.687 CET [24138:3] FATAL: insufficient file descriptors available to start server process 2020-01-02 19:51:05.687 CET [24138:4] DETAIL: System allows 19, we need at least 20. 2020-01-02 19:51:05.687 CET [24138:5] LOG: database syste

Re: backup manifests

2020-01-03 Thread Suraj Kharage
Thank you for review comments. On Mon, Dec 30, 2019 at 11:53 PM Robert Haas wrote: > On Tue, Dec 24, 2019 at 5:42 AM Suraj Kharage > wrote: > > To examine the first word of each line, I am using below check: > > if (strncmp(line, "File", 4) == 0) > > { > > .. > > } > > else if (strncmp(line, "M

Re: pgbench - allow to create partitioned tables

2020-01-03 Thread Fabien COELHO
Hello Peter, The documentation and pgbench --help output that accompanied this patch claims that the argument to pgbench --partition-method is optional and defaults to "range", but that is not actually the case, as the implementation requires an argument. Could you please sort this out? AFAI

  1   2   >