Re: Improve search for missing parent downlinks in amcheck

2019-04-27 Thread Peter Geoghegan
On Sat, Apr 27, 2019 at 5:13 PM Alexander Korotkov wrote: > Yes, increasing of Bloom filter size also helps. But my intention was > to make non-lossy check here. Why is that your intention? Do you want to do this as a feature for Postgres 13, or do you want to treat this as a bug that we need to

Re: Race conditions with checkpointer and shutdown

2019-04-27 Thread Tom Lane
I have spent a fair amount of time trying to replicate these failures locally, with little success. I now think that the most promising theory is Munro's idea in [1] that the walreceiver is hanging up during its unsafe attempt to do ereport(FATAL) from inside a signal handler. It's extremely plau

Re: Improve search for missing parent downlinks in amcheck

2019-04-27 Thread Peter Geoghegan
On Sat, Apr 27, 2019 at 5:13 PM Alexander Korotkov wrote: > Yes, increasing of Bloom filter size also helps. But my intention was > to make non-lossy check here. I agree that that might be a good goal, but I am interested in knowing if there is something naive about how the downlinkfilter Bloom

Re: Improve search for missing parent downlinks in amcheck

2019-04-27 Thread Alexander Korotkov
On Tue, Apr 16, 2019 at 10:00 PM Peter Geoghegan wrote: > > On Mon, Apr 15, 2019 at 7:30 PM Alexander Korotkov > wrote: > > Currently we amcheck supports lossy checking for missing parent > > downlinks. It collects bitmap of downlink hashes and use it to check > > subsequent tree level. We've e

Re: Improve search for missing parent downlinks in amcheck

2019-04-27 Thread Peter Geoghegan
On Sat, Apr 27, 2019 at 4:57 PM Alexander Korotkov wrote: > "rootdescend" is cool type of check. Thank you for noticing, I wasn't aware > of it. > But can it detect the missing downlink in following situation? > > A > / \ > B <-> C <-> D > > Here A has downlinks to B and D, wh

Re: Improve search for missing parent downlinks in amcheck

2019-04-27 Thread Alexander Korotkov
On Tue, Apr 16, 2019 at 10:04 PM Peter Geoghegan wrote: > > On Tue, Apr 16, 2019 at 12:00 PM Peter Geoghegan wrote: > > Can you be more specific? What was the cause of the corruption? I'm > > always very interested in hearing about cases that amcheck could have > > detected, but didn't. > > FWIW,

Re: speeding up planning with partitions

2019-04-27 Thread Tom Lane
Amit Langote writes: > On 2019/04/23 7:08, Tom Lane wrote: >> [ a bunch of stuff ] > Not sure if you'll like it but maybe we could ignore even regular > inheritance child targets that are proven to be empty (is_dummy_rel()) for > a given query during the initial SELECT planning. That way, we can

pg_ssl

2019-04-27 Thread Steve
As you might know, generating SSL certificates for postgres (to be used by pgadmin, for example...) can be quite a bear; especially if you need more than one, since they are based on the username of the postgres user. I have made two command-line utilities written in python 3.6 to do just that

Re: nRe: [PATCH v1] Show whether tables are logged in \dt+

2019-04-27 Thread Fabien COELHO
Hello David, Patch applies. There seems to be a compilation issue: describe.c:5974:1: error: expected declaration or statement at end of input } Also there is an added indentation problem: the size & description stuff have been moved left but it should still in the verbose case, and a } i

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-27 Thread Fabien COELHO
Hello David, About v3. Applies, compiles, global & local make check are ok. doc gen ok. I'd put the commands in alphabetical order (echo, qecho, warn) instead of e/w/q in the condition. Done. Cannot see it: + else if (strcmp(cmd, "echo") == 0 || strcmp(cmd, "warn") == 0 || strcmp(cmd,

Re: Failure in contrib test _int on loach

2019-04-27 Thread Tom Lane
Anastasia Lubennikova writes: > So it is possible, but it doesn't require any extra algorithm changes. > I didn't manage to generate dataset to reproduce grandparent split. > Though, I do agree that it's worth checking out. Do you have any ideas? Ping? This thread has gone cold, but the bug is s

Re: nRe: [PATCH v1] Show whether tables are logged in \dt+

2019-04-27 Thread David Fetter
On Sat, Apr 27, 2019 at 09:19:57AM +0200, Fabien COELHO wrote: > > Hello David, > > Patch v3 applies, but compiles for me with a warning because the indentation > of the following size block has been changed: > > describe.c: In function ‘listTables’: > describe.c:3705:7: warning: this ‘if’ claus

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-27 Thread David Fetter
On Sat, Apr 27, 2019 at 04:05:20PM +0200, Fabien COELHO wrote: > > Hello David, > > > Please find attached v2, name is now \warn. > > Patch applies cleanly, compiles, "make check ok", although there are no > tests. Doc gen ok. > > Code is pretty straightforward. > > I'd put the commands in alp

Re: generate documentation keywords table automatically

2019-04-27 Thread Tom Lane
Peter Eisentraut writes: > The SQL keywords table in the documentation had until now been generated > by me every year by some ad hoc scripting outside the source tree once > for each major release. This patch changes it to an automated process. Didn't test this, but +1 for the concept. Would i

Re: clean up docs for v12

2019-04-27 Thread Tom Lane
Michael Paquier writes: > On Fri, Apr 26, 2019 at 09:56:47PM -0500, Justin Pryzby wrote: >> -all autovacuum actions. Minus-one (the default) disables logging >> +all autovacuum actions. -1 (the default) >> disables logging >> >> There's nothing else that says "minus-one" anywhere

Re: BUG #15781: subselect on foreign table (postgres_fdw) can crash (segfault)

2019-04-27 Thread Tom Lane
Etsuro Fujita writes: > On Sat, Apr 27, 2019 at 2:10 AM Tom Lane wrote: >> If we don't want to change what the core code does with fdw_exprs, >> I think the only way to fix it is to hack postgres_fdw so that it >> won't generate plans involving the problematic case. > Seems reasonable. >> See a

Re: [PATCH v1] Add \echo_stderr to psql

2019-04-27 Thread Fabien COELHO
Hello David, Please find attached v2, name is now \warn. Patch applies cleanly, compiles, "make check ok", although there are no tests. Doc gen ok. Code is pretty straightforward. I'd put the commands in alphabetical order (echo, qecho, warn) instead of e/w/q in the condition. The -n t

Re: BUG #15781: subselect on foreign table (postgres_fdw) can crash (segfault)

2019-04-27 Thread Etsuro Fujita
On Sat, Apr 27, 2019 at 2:10 AM Tom Lane wrote: > > (2019/04/26 3:24), Tom Lane wrote: > >> If we do leave it like this, then the only way for postgres_fdw to > >> avoid trouble is to not have any entries in fdw_exprs that exactly > >> match entries in fdw_scan_tlist. So that pretty much devolve

Re: Identity columns should own only one sequence

2019-04-27 Thread Peter Eisentraut
On 2019-04-26 15:37, Laurenz Albe wrote: > What do you think of the patch I just posted on this thread to > remove ownership automatically when the default is dropped, as Michael > suggested? I think that would make things much more intuitive from > the user's perspective. I think that adds more

Re: Optimizer items in the release notes

2019-04-27 Thread Bruce Momjian
On Sat, Apr 27, 2019 at 02:47:44PM +1200, David Rowley wrote: > On Sat, 27 Apr 2019 at 14:22, Bruce Momjian wrote: > > > > * They are hard to explain > > > > > > That can be true, but we generally get there if not the first time > > > then after a few iterations. Authors and committers of the > >

nRe: [PATCH v1] Show whether tables are logged in \dt+

2019-04-27 Thread Fabien COELHO
Hello David, Patch v3 applies, but compiles for me with a warning because the indentation of the following size block has been changed: describe.c: In function ‘listTables’: describe.c:3705:7: warning: this ‘if’ clause does not guard... [-Wmisleading-indentation] else if (pset.sversion >=