Re: Printing LSN made easy

2020-11-28 Thread Michael Paquier
On Fri, Nov 27, 2020 at 04:10:27PM +0530, Ashutosh Bapat wrote: > LSN_FORMAT_ARG expands to two comma separated arguments and is kinda > open at both ends but it's handy that way. Agreed that's useful. > Off list Peter Eisentraut pointed out that we can not use these macros > in elog/ereport

Re: configure and DocBook XML

2020-11-28 Thread Michael Paquier
On Fri, Nov 27, 2020 at 10:29:24AM -0500, Tom Lane wrote: > To me, it makes sense to have an option to do that, but I do find it > surprising that it's the default. But there is no need for an option, right? It is already possible to override the location where xmllint looks for the catalogs by

Re: parallel distinct union and aggregate support patch

2020-11-28 Thread Dilip Kumar
On Fri, Nov 27, 2020 at 9:25 PM Heikki Linnakangas wrote: > > I also had a quick look at the patch and the comments made so far. Summary: > > 1. The performance results are promising. > > 2. The code needs comments. > > Regarding the design: > > Thomas Munro mentioned the idea of a "Parallel

Re: [PATCH] LWLock self-deadlock detection

2020-11-28 Thread Michael Paquier
On Fri, Nov 27, 2020 at 11:08:49AM -0800, Peter Geoghegan wrote: > On Fri, Nov 27, 2020 at 10:22 AM Heikki Linnakangas wrote: >> I've made the mistake of forgetting to release an LWLock many times, >> leading to self-deadlock. And I just reviewed a patch that did that this >> week [1]. You

Re: Online verification of checksums

2020-11-28 Thread Michael Paquier
On Fri, Nov 27, 2020 at 11:15:27AM -0500, Stephen Frost wrote: > * Magnus Hagander (mag...@hagander.net) wrote: >> On Thu, Nov 26, 2020 at 8:42 AM Michael Paquier wrote: >>> But here the checksum is broken, so while the offset is something we >>> can rely on how do you make sure that the LSN is

Re: [HACKERS] logical decoding of two-phase transactions

2020-11-28 Thread Amit Kapila
On Fri, Nov 27, 2020 at 6:35 PM Ajin Cherian wrote: > > On Thu, Nov 26, 2020 at 10:43 PM Amit Kapila wrote: > > > I think what you need to do to reproduce this is to follow the > > snapshot machinery in SnapBuildFindSnapshot. Basically, first, start a > > transaction (say transaction-id is 500)

Re: CLUSTER on partitioned index

2020-11-28 Thread Justin Pryzby
On Sun, Nov 15, 2020 at 07:53:35PM -0600, Justin Pryzby wrote: > On Wed, Nov 04, 2020 at 08:23:56PM -0600, Justin Pryzby wrote: > > On Tue, Oct 27, 2020 at 07:33:12PM -0500, Justin Pryzby wrote: > > > I'm attaching a counter-proposal to your catalog change, which preserves > > > indisclustered on

Re: Feature Request: Report additionally error value

2020-11-28 Thread Tom Lane
"David G. Johnston" writes: > On Sat, Nov 28, 2020 at 4:18 PM Eugen Konkov wrote: >> I often fall into error like this: >> DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st >> execute failed: ERROR: timestamp out of range >> Would be nice if here also will be reported error

Re: What to do about the broken btree_gist for inet/cidr?

2020-11-28 Thread Tom Lane
Andreas Karlsson writes: > This has been broken for as long as we have had btree_gist indexes over > inet. And personally I am not a fan of PostgreSQL shipping with known > broken features. But it is also not obvious to me what the best way to > fix it is. Yeah, this has been lingering

Re: Feature Request: Report additionally error value

2020-11-28 Thread David G. Johnston
On Sat, Nov 28, 2020 at 4:18 PM Eugen Konkov wrote: > Hi all. > > I often fall into error like this: > > DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st > execute failed: ERROR: timestamp out of range > CONTEXT: SQL function "accounting_ready" statement 1 [for Statement >

Re: proposal: possibility to read dumped table's name from file

2020-11-28 Thread Justin Pryzby
On Sat, Nov 28, 2020 at 09:14:35PM +0100, Pavel Stehule wrote: > Any short or long option can be read from this file in simple format - one > option per line. Arguments inside double quotes can be multi lined. Row > comments started by # and can be used everywhere. Does this support even funkier

Feature Request: Report additionally error value

2020-11-28 Thread Eugen Konkov
Hi all. I often fall into error like this: DBIx::Class::Storage::DBI::_dbh_execute(): DBI Exception: DBD::Pg::st execute failed: ERROR: timestamp out of range CONTEXT: SQL function "accounting_ready" statement 1 [for Statement "SELECT COUNT( * ) FROM (WITH target_date AS ( SELECT

Re: parallel distinct union and aggregate support patch

2020-11-28 Thread Robert Haas
On Fri, Nov 27, 2020 at 10:55 AM Heikki Linnakangas wrote: > I think a non-buffering Reparttion node would be simpler, and thus > better. In these patches, you have a BatchSort node, and batchstore, but > a simple Parallel Repartition node could do both. For example, to > implement distinct: > >

Re: [sqlsmith] Failed assertion during partition pruning

2020-11-28 Thread Tom Lane
Andreas Seltenreich writes: > testing master at 3df51ca8 with sqlsmith triggers the following > assertion: > TRAP: FailedAssertion("!bms_is_empty(present_parts)", File: > "partprune.c", Line: 588, PID: 8540) > I looked at a dozen backtraces and they all sport a window aggregate but > that

[sqlsmith] Failed assertion during partition pruning

2020-11-28 Thread Andreas Seltenreich
Hi, testing master at 3df51ca8 with sqlsmith triggers the following assertion: TRAP: FailedAssertion("!bms_is_empty(present_parts)", File: "partprune.c", Line: 588, PID: 8540) I looked at a dozen backtraces and they all sport a window aggregate but that may still be random chance since

Re: A few new options for CHECKPOINT

2020-11-28 Thread Bossart, Nathan
On 11/28/20, 9:50 AM, "Stephen Frost" wrote: >> Granted, I used a rather aggressive checkpoint_timeout, but I think >> this demonstrates that waiting for a non-immediate checkpoint to >> complete can lower the amount of WAL needed for recovery, even though >> it might not lower it as much as

Re: proposal: possibility to read dumped table's name from file

2020-11-28 Thread Pavel Stehule
pá 27. 11. 2020 v 19:45 odesílatel Stephen Frost napsal: > Greetings, > > * Pavel Stehule (pavel.steh...@gmail.com) wrote: > > > I agree that being able to configure pg_dump via a config file would > > > be very useful, but the syntax proposed here feels much more like a > > > hacked-up syntax

Re: proposal: possibility to read dumped table's name from file

2020-11-28 Thread Pavel Stehule
Hi st 25. 11. 2020 v 21:00 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > st 25. 11. 2020 v 19:25 odesílatel Dean Rasheed < > dean.a.rash...@gmail.com> > > napsal: > >> I agree that being able to configure pg_dump via a config file would > >> be very useful, but the syntax proposed

Re: A few new options for CHECKPOINT

2020-11-28 Thread Stephen Frost
Greetings, * Bossart, Nathan (bossa...@amazon.com) wrote: > On 11/27/20, 10:58 AM, "Stephen Frost" wrote: > > If you'd like to show that I'm wrong, and it's entirely possible that I > > am, then retry the above with actual load on the system, and also > > actually look at how much outstanding

Re: Add Information during standby recovery conflicts

2020-11-28 Thread Alvaro Herrera
Hi Bertrand, On 2020-Nov-28, Drouvot, Bertrand wrote: > + if (nprocs > 0) > + { > + ereport(LOG, > + (errmsg("recovery still waiting after > %ld.%03d ms: %s", > +

Re: Removing unneeded self joins

2020-11-28 Thread Andrey Lepikhov
Thank you for the review, On 27.11.2020 21:49, Heikki Linnakangas wrote: On 31/10/2020 11:26, Andrey V. Lepikhov wrote: +    /* + * Process restrictlist to seperate out the self join quals from + * the other quals. e.g x = x goes to selfjoinquals and a = b to

Re: gcc -Wimplicit-fallthrough and pg_unreachable

2020-11-28 Thread Tom Lane
Chapman Flack writes: > I noticed in CI builds of PL/Java with PG 13 that -Wimplicit-fallthrough=3 > in pg_config's CFLAGS was causing some switch case fallthrough warnings > after an elog(ERROR. [1] Yeah, I can replicate this here (gcc 8.3.1 on RHEL8). My recollection is that we saw this when

gcc -Wimplicit-fallthrough and pg_unreachable

2020-11-28 Thread Chapman Flack
I noticed in CI builds of PL/Java with PG 13 that -Wimplicit-fallthrough=3 in pg_config's CFLAGS was causing some switch case fallthrough warnings after an elog(ERROR. [1] I added my own pg_unreachable() after the elog(ERROR, ...) calls [2] and that did away with the warnings. But it looks odd,

Re: Improving spin-lock implementation on ARM.

2020-11-28 Thread Alexander Korotkov
On Sat, Nov 28, 2020 at 5:36 AM Tom Lane wrote: > So at least on Apple's hardware, it seems like the CAS > implementation might be a shade faster when uncontended, > but it's very clearly worse when there is contention for > the spinlock. That's interesting, because the argument > that CAS