Re: Loaded footgun open_datasync on Windows

2018-06-09 Thread Amit Kapila
On Fri, Jun 8, 2018 at 11:00 PM, Magnus Hagander wrote: > > On Fri, Jun 8, 2018 at 4:55 AM, Amit Kapila wrote: >> >> >> -#include "postgres_fe.h" >> +#include "postgres.h" >> >> I don't think that server application can use backend environment unless >> it is adapted to do so. I think the

Re: [PATCH] Trim trailing whitespace in vim and emacs

2018-06-09 Thread Andrew Dunstan
On 06/05/2018 05:33 PM, Andrew Gierth wrote: "Matthew" == Matthew Woodcraft writes: Matthew> A few days ago there was a suggestion on this list to add a Matthew> .editorconfig file specifying tab width: Matthew>

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-06-09 Thread Amit Kapila
On Fri, Jun 8, 2018 at 5:27 PM, Simon Riggs wrote: > On 8 June 2018 at 11:33, Amit Kapila wrote: >> On Fri, Jun 8, 2018 at 1:53 PM, Simon Riggs wrote: >>> >>> So the attached patch fixes both the bug in the recent commit and the >>> one I just found by observation of 49bff5300d527, since they

Re: why partition pruning doesn't work?

2018-06-09 Thread Tom Lane
I wrote: > One thing I'm wondering about is why in the world are PartitionPruneInfo > and its subsidiary struct types declared in primnodes.h? Oh, and while I'm bitching: it seems like there is hardly any part of the partitioning code in which the comments aren't desperately in need of a

Re: POC: GROUP BY optimization

2018-06-09 Thread Tomas Vondra
On 06/09/2018 08:09 PM, Tomas Vondra wrote: > > /snip/ > > 4) when adding Sort for grouping, try producing the right output order >(if the ORDER BY was specified) > BTW I've just realized we already do something similar in master. If you run a query like this: SELECT a, b, count(*) FROM

Re: adding tab completions

2018-06-09 Thread Justin Pryzby
Thanks for review and comment. On Tue, Jun 05, 2018 at 05:29:42PM +0300, Arthur Zakirov wrote: > On Sun, Jun 03, 2018 at 10:39:22PM -0500, Justin Pryzby wrote: > > > Also I think it could be good to list column names after parentheses, > > > but I'm not sure if it easy to implement. > > I tried

PostgreSQL vs SQL Standard

2018-06-09 Thread Andrew Gierth
I created this wiki page: https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard I'd been thinking of collecting this information for a while, but was spurred into further action when someone referred me to Markus Winand's PGCon talk slides. I think I got all the issues I currently know

Re: PostgreSQL vs SQL Standard

2018-06-09 Thread Tom Lane
Andrew Gierth writes: > I created this wiki page: > https://wiki.postgresql.org/wiki/PostgreSQL_vs_SQL_Standard Good idea! > I think I got all the issues I currently know of, but there may be > more, and others may disagree with my classification of issues or the > rationales for violating the

Re: Add CONTRIBUTING.md

2018-06-09 Thread Peter Geoghegan
On Tue, May 29, 2018 at 10:10 AM, Andres Freund wrote: >> WHile you're at it, you could also add an .editorconfig so that github >> displays code with 4-character tabs. >> >> (e.g. https://github.com/RhodiumToad/pllua-ng/blob/master/.editorconfig ) > > +1 - why don't you start a thread about it?

Re: Postgres 11 release notes

2018-06-09 Thread Justin Pryzby
On Sat, Jun 09, 2018 at 01:35:19PM -0700, David G. Johnston wrote: > On Fri, May 11, 2018 at 8:08 AM, Bruce Momjian wrote: > > > I have committed the first draft of the Postgres 11 release notes. I > > will add more markup soon. You can view the most current version here: > > > >

Re: Explain buffers wrong counter with parallel plans

2018-06-09 Thread Amit Kapila
On Fri, Jun 8, 2018 at 11:34 PM, Robert Haas wrote: > On Wed, Jun 6, 2018 at 12:08 PM, Alvaro Herrera > wrote: >> So, apparently this is not a Postgres 11 open item, but rather a bug >> that goes back to pg10. However, maybe it would be worth fixing soon >> anyway? In particular, if we want to

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-06-09 Thread Fabien COELHO
Hello Marina, v9-0002-Pgbench-errors-use-the-Variables-structure-for-cl.patch - a patch for the Variables structure (this is used to reset client variables during the repeating of transactions after serialization/deadlock failures). About this second patch: This extracts the variable

Re: JIT documentation fixes

2018-06-09 Thread Peter Geoghegan
On Thu, May 31, 2018 at 11:50 AM, Daniel Gustafsson wrote: > When reading the JIT developer documentation, a few small wordsmithing issues > stood out (although this may be due to me not being a native english speaker). > The attached patch fixes these to what I think the sentences inteded to

Re: POC: GROUP BY optimization

2018-06-09 Thread Tomas Vondra
On 06/07/2018 06:22 PM, Teodor Sigaev wrote: >>> Yes. But again, this description is a bit short. First it works after >>> first patch and might get some preordered leading pathkeys. Second, it >>> tries to match ORDER BY clause order if there is no preordered leading >>> pathkeys from first

Re: JIT documentation fixes

2018-06-09 Thread Daniel Gustafsson
> On 9 Jun 2018, at 19:05, Peter Geoghegan wrote: > > On Thu, May 31, 2018 at 11:50 AM, Daniel Gustafsson wrote: >> When reading the JIT developer documentation, a few small wordsmithing issues >> stood out (although this may be due to me not being a native english >> speaker). >> The attached

Re: why partition pruning doesn't work?

2018-06-09 Thread Tom Lane
David Rowley writes: > I'm really hoping this is what you meant about the special-case code for > Params. > Does this look any better? I'm starting to look this over and it seems like generally the right thing, though I'm finding minor things I don't like much. One thing I'm wondering about is

Re: Postgres 11 release notes

2018-06-09 Thread David G. Johnston
On Fri, May 11, 2018 at 8:08 AM, Bruce Momjian wrote: > I have committed the first draft of the Postgres 11 release notes. I > will add more markup soon. You can view the most current version here: > > http://momjian.us/pgsql_docs/release-11.html ​Some thoughts:​ ​As a major ​item:

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-06-09 Thread Marina Polyakova
On 09-06-2018 16:31, Fabien COELHO wrote: Hello Marina, Hello! v9-0002-Pgbench-errors-use-the-Variables-structure-for-cl.patch - a patch for the Variables structure (this is used to reset client variables during the repeating of transactions after serialization/deadlock failures). About

Re: Compromised postgresql instances

2018-06-09 Thread Andrew Dunstan
On 06/09/2018 03:27 AM, Andrew Gierth wrote: "Thomas" == Thomas Kellerer writes: Thomas> And a blog post going into details on how that specific attack works. Thomas>

Re: Postgres 11 release notes

2018-06-09 Thread Jonathan S. Katz
> On Jun 9, 2018, at 4:35 PM, David G. Johnston > wrote: > > On Fri, May 11, 2018 at 8:08 AM, Bruce Momjian > wrote: > I have committed the first draft of the Postgres 11 release notes. I > will add more markup soon. You can view the most current version here: > >

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-06-09 Thread Marina Polyakova
On 09-06-2018 9:55, Fabien COELHO wrote: Hello Marina, Hello! v9-0001-Pgbench-errors-use-the-RandomState-structure-for-.patch - a patch for the RandomState structure (this is used to reset a client's random seed during the repeating of transactions after serialization/deadlock failures).

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-06-09 Thread Simon Riggs
On 8 June 2018 at 19:03, Andres Freund wrote: >> It seems to have affected Greg. > > As far as I can tell Greg was just theorizing? I'll wait for Greg to say whether this was an actual case that needs to be fixed or not. If not, happy to revert. -- Simon Riggs

Re: hot_standby_feedback vs excludeVacuum and snapshots

2018-06-09 Thread Simon Riggs
On 8 June 2018 at 19:03, Andres Freund wrote: > Hi, > > On 2018-06-08 09:23:02 +0100, Simon Riggs wrote: >> I have also found another bug which affects what we do next. >> >> For context, AEL locks are normally removed by COMMIT or ABORT. >> StandbyReleaseOldLocks() is just a sweeper to catch

Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian

2018-06-09 Thread Tom Lane
David Rowley writes: > So it looks like I've assumed that the Append path's partitioned_rels > will only ever be set for partitioned tables, but it can, in fact, be > set for UNION ALL parents too when the union children are partitioned > tables. > As a discussion topic, I've attached a patch

Re: JIT documentation fixes

2018-06-09 Thread Peter Geoghegan
On Sat, Jun 9, 2018 at 10:40 AM, Daniel Gustafsson wrote: > Thanks, I’m honoured to get the first commit. Keep them coming. :-) -- Peter Geoghegan

Re: [HACKERS] WIP Patch: Pgbench Serialization and deadlock errors

2018-06-09 Thread Fabien COELHO
Hello Marina, v9-0001-Pgbench-errors-use-the-RandomState-structure-for-.patch - a patch for the RandomState structure (this is used to reset a client's random seed during the repeating of transactions after serialization/deadlock failures). A few comments about this first patch. Patch

Re: Compromised postgresql instances

2018-06-09 Thread Andrew Gierth
> "Thomas" == Thomas Kellerer writes: Thomas> And a blog post going into details on how that specific attack works. Thomas> https://www.imperva.com/blog/2018/03/deep-dive-database-attacks-scarlett-johanssons-picture-used-for-crypto-mining-on-postgre-database/ *headdesk* *headdesk*