Re: [HACKERS] [BUGS] Breakage with VACUUM ANALYSE + partitions

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 1:07 PM, Andres Freund wrote: > The attached patch basically adds the segment size checks to > _mdfd_getseg(), and doesn't perform extension, even in recovery, if > EXTENSION_REALLY_RETURN_NULL is passed. > > This fixes the issue for me, both in the

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread David Rowley
On 23 April 2016 at 09:19, Robert Haas wrote: > 2. Add a field "bool aggcombine" to args, and set it to true in this > case. When we see that in deparsing, expect the argument list to be > one element long, a TargetEntry containing a Var. Use that to dig out > the partial

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-22 Thread Jeff Janes
On Thu, Apr 21, 2016 at 11:00 PM, Noah Misch wrote: > On Mon, Apr 18, 2016 at 05:48:17PM +0300, Teodor Sigaev wrote: >> >>Added, see attached patch (based on v3.1) >> > >> >With this applied, I am getting a couple errors I have not seen before >> >after extensive crash recovery

Re: [HACKERS] [COMMITTERS] pgsql: Inline initial comparisons in TestForOldSnapshot()

2016-04-22 Thread Tom Lane
Kevin Grittner writes: > Since I failed to find anything in our docs or C comments, and very > scant clues in the Wiki and list archives, about when to use > PGDLLIMPORT and PGDLLEXPORT I figured it might be helpful to > clarify here, and maybe add something near one of the

Re: [HACKERS] kqueue

2016-04-22 Thread Andres Freund
On 2016-04-23 10:12:12 +1200, Thomas Munro wrote: > What is the policy for that kind of thing -- do nothing until someone > cares enough about the platform to supply a buildfarm animal? I think we should fix it, I just want to make sure we understand why the error is appearing now. Since we now

Re: [HACKERS] kqueue

2016-04-22 Thread Alvaro Herrera
Thomas Munro wrote: > On Sat, Apr 23, 2016 at 4:36 AM, Andres Freund wrote: > > On 2016-04-22 20:39:27 +1200, Thomas Munro wrote: > >> While doing that I discovered that unpatched master doesn't actually > >> build on recent NetBSD systems because our static function strtoi >

Re: [HACKERS] kqueue

2016-04-22 Thread Tom Lane
Andres Freund writes: >> pg_strtoi? > I think that's what Thomas did upthread. Are you taking this one then? I'd go with just "strtoint". We have "strtoint64" elsewhere. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] if (!superuser) checks

2016-04-22 Thread Andres Freund
Hi, On 2016-04-22 14:56:44 -0400, Stephen Frost wrote: > The idea we came up with is to have a pg_replication default role which > essentially replaces the REPLICATION role attribute. Andres didn't see > it as being terribly valuable to disallow a role with the REPLICATION > attribute from

Re: [HACKERS] kqueue

2016-04-22 Thread Andres Freund
On 2016-04-22 19:25:06 -0300, Alvaro Herrera wrote: > Since we haven't, maybe nobody cares, so why should we? I guess it's to a good degree because netbsd has pg packages, and it's fixed there? > would rename our function nonetheless FWIW; the name seems far too > generic to me. Yea. >

Re: [HACKERS] kqueue

2016-04-22 Thread Thomas Munro
On Sat, Apr 23, 2016 at 4:36 AM, Andres Freund wrote: > On 2016-04-22 20:39:27 +1200, Thomas Munro wrote: >> While doing that I discovered that unpatched master doesn't actually >> build on recent NetBSD systems because our static function strtoi >> clashes with a non-standard

Re: [HACKERS] kqueue

2016-04-22 Thread Tom Lane
Thomas Munro writes: > On Sat, Apr 23, 2016 at 4:36 AM, Andres Freund wrote: >> On 2016-04-22 20:39:27 +1200, Thomas Munro wrote: >>> While doing that I discovered that unpatched master doesn't actually >>> build on recent NetBSD systems because

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread David Rowley
On 23 April 2016 at 06:35, Robert Haas wrote: > 2. You're using the term "combine agg", but as far as the EXPLAIN > ANALYZE output is concerned, that's not a thing. There is > PartialAggregate, Aggregate, and FinalizeAggregate. I think you mean > FinalizeAggregate when

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread Robert Haas
On Sun, Apr 17, 2016 at 10:22 AM, Tom Lane wrote: > David Rowley writes: >> On 16 April 2016 at 04:27, Tom Lane wrote: >>> +1 for the latter, if we can do it conveniently. I think exposing >>> the names of the aggregate

Re: [HACKERS] pg_dump / copy bugs with "big lines" ?

2016-04-22 Thread Bruce Momjian
On Thu, Mar 3, 2016 at 10:31:26AM +0900, Michael Paquier wrote: > On Thu, Mar 3, 2016 at 12:47 AM, Alvaro Herrera > wrote: > > Well, the CopyData message has an Int32 field for the message length. > > I don't know the FE/BE protocol very well but I suppose each row > >

Re: [HACKERS] snapshot too old, configured by time

2016-04-22 Thread Bruce Momjian
On Tue, Apr 19, 2016 at 07:38:04AM -0400, Robert Haas wrote: > 2. Without this feature, you can kill sessions or transactions to > control bloat, but this feature is properly thought of as a way to > avoid bloat *without* killing sessions or transactions. You can let > the session live, without

Re: [HACKERS] pg_dump dump catalog ACLs

2016-04-22 Thread Stephen Frost
Noah, all, * Noah Misch (n...@leadboat.com) wrote: > On Tue, Apr 05, 2016 at 05:50:18PM -0400, Stephen Frost wrote: > > Subject: [PATCH 4/5] In pg_dump, include pg_catalog and extension ACLs, if > > changed > > > > Now that all of the infrastructure exists, add in the ability to > > dump out

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread David Rowley
On 23 April 2016 at 13:58, Robert Haas wrote: > On Fri, Apr 22, 2016 at 5:36 PM, David Rowley > wrote: >> I really don't think that we should print FILTER details in a combine >> aggregate node. We'd be claiming to be doing something that

Re: [HACKERS] checkpoint_flush_after documentation inconsistency

2016-04-22 Thread Andres Freund
On 2016-04-22 23:33:07 -0400, Robert Haas wrote: > On Thu, Apr 21, 2016 at 2:20 PM, Andres Freund wrote: > > On 2016-04-18 14:33:28 +0900, Fujii Masao wrote: > >> On Fri, Apr 15, 2016 at 6:56 PM, Magnus Hagander > >> wrote: > >> > The documentation says

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 5:36 PM, David Rowley wrote: > I really don't think that we should print FILTER details in a combine > aggregate node. We'd be claiming to be doing something that we're > actually not doing. Please see advance_aggregates() in nodeAgg.c, and >

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Christian Ullrich
* Andrew Dunstan wrote: On 04/22/2016 02:46 AM, Michael Paquier wrote: Progress report: 1. My VS 2015 installations (I now have several) all generate solution file with: Microsoft Visual Studio Solution File, Format Version 12.00 so I propose to set that as the solution file version.

Re: [HACKERS] checkpoint_flush_after documentation inconsistency

2016-04-22 Thread Robert Haas
On Thu, Apr 21, 2016 at 2:20 PM, Andres Freund wrote: > On 2016-04-18 14:33:28 +0900, Fujii Masao wrote: >> On Fri, Apr 15, 2016 at 6:56 PM, Magnus Hagander wrote: >> > The documentation says that the default value is 128Kb on Linux, but the >> > code

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-22 Thread Noah Misch
On Mon, Apr 18, 2016 at 05:48:17PM +0300, Teodor Sigaev wrote: > >>Added, see attached patch (based on v3.1) > > > >With this applied, I am getting a couple errors I have not seen before > >after extensive crash recovery testing: > >ERROR: attempted to delete invisible tuple > >ERROR: unexpected

Re: [HACKERS] pg_dump dump catalog ACLs

2016-04-22 Thread Peter Geoghegan
On Fri, Apr 22, 2016 at 12:25 AM, Noah Misch wrote: > Folks run clusters with ~1000 databases; we previously accepted at least one > complex performance improvement[1] based on that use case. On the faster of > the two machines I tested, the present thread's commits slowed

Re: [HACKERS] Fix of doc for synchronous_standby_names.

2016-04-22 Thread Amit Langote
Horiguchi-san, On 2016/04/22 14:21, Kyotaro HORIGUCHI wrote: > I came to think that both of you are misunderstanding how > synchronous standbys are choosed so I'd like to clarify the > behavior. I certainly had a different (and/or wrong) idea in mind about how this works. Thanks a lot for

Re: [HACKERS] Wire protocol compression

2016-04-22 Thread Craig Ringer
On 21 April 2016 at 22:21, Andreas Karlsson wrote: > Wouldn't such a solution be just as vulnerable to CRIME as TLS is? I > thought the reason for removing compression from TLS is to discourage > people from writing applications which are vulnerable to compression based >

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-22 Thread Peter Geoghegan
On Thu, Nov 5, 2015 at 2:44 PM, Jeff Janes wrote: > The bug theoretically exists in 9.5, but it wasn't until 9.6 (commit > e95680832854cf300e64c) that free pages were recycled aggressively > enough that it actually becomes likely to be hit. In other words: The bug could be

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Michael Paquier
On Fri, Apr 22, 2016 at 4:39 AM, Andrew Dunstan wrote: > On 04/11/2016 03:47 AM, Michael Paquier wrote: >> On Mon, Apr 11, 2016 at 3:25 PM, Michael Paquier >> wrote: >>> >>> Now, I have produced two patches: >>> -

Re: [HACKERS] Parser extensions (maybe for 10?)

2016-04-22 Thread Aleksander Alekseev
> > And the above is called an ad-hominem. > > An "ad hominem" attack means against the person rather than on the > topic of the issue, but I don't think Aleksander did that. I'm not > sure why you think what he wrote was out of line. It reads OK to me. Frankly when I re-read my own e-mails

Re: [HACKERS] pg_dump dump catalog ACLs

2016-04-22 Thread Noah Misch
On Wed, Apr 20, 2016 at 10:50:21PM -0400, Stephen Frost wrote: > On Wednesday, April 20, 2016, Noah Misch wrote: > > On Wed, Apr 20, 2016 at 11:12:44AM -0400, Stephen Frost wrote: > > > > On Sun, Apr 17, 2016 at 11:02:28PM -0400, Noah Misch wrote: > > > > > (3) pg_dumpall

Re: [HACKERS] Wire protocol compression

2016-04-22 Thread Craig Ringer
On 21 April 2016 at 22:07, Tom Lane wrote: > > Yeah. I think this should definitely be in the list of things we want > to add when we do the fabled 4.0 protocol revision (and, indeed, it's > been in the above-cited list for awhile). Whether we've yet gotten to > the point

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Michael Paquier
On Fri, Apr 22, 2016 at 1:30 PM, Tom Lane wrote: > Andrew Dunstan writes: >> On 04/21/2016 05:15 PM, Tom Lane wrote: >>> Do the other contrib modules all pass? I can't recall if seg was the >>> only one we'd left like this. > >> Only seg fails. > > As a

Re: [HACKERS] Why doesn't src/backend/port/win32/socket.c implement bind()?

2016-04-22 Thread Michael Paquier
On Thu, Apr 21, 2016 at 11:46 PM, Tom Lane wrote: > I wrote: >> Michael Paquier writes: >>> And this gives the patch attached, just took the time to hack it. > >> I think this is a good idea, but (1) I'm inclined not to restrict it to >> Windows,

Re: [HACKERS] kqueue

2016-04-22 Thread Thomas Munro
On Fri, Apr 22, 2016 at 12:21 PM, Andres Freund wrote: > On 2016-04-21 14:25:06 -0400, Robert Haas wrote: >> On Thu, Apr 21, 2016 at 2:22 PM, Andres Freund wrote: >> > On 2016-04-21 14:15:53 -0400, Robert Haas wrote: >> >> On Tue, Mar 29, 2016 at 7:53 PM,

Re: [HACKERS] Missing lookup in msvcr120 for pgwin32_putenv

2016-04-22 Thread Magnus Hagander
On Thu, Apr 21, 2016 at 11:16 PM, Michael Paquier wrote: > Hi all, > > While looking at e545281 I bumped into the following thing that has > visibly been forgotten since VS2013 support has been added: > --- a/src/port/win32env.c > +++ b/src/port/win32env.c > @@ -67,6

Re: [HACKERS] Truncating/vacuuming relations on full tablespaces

2016-04-22 Thread Asif Naeem
On Wed, Apr 6, 2016 at 9:06 PM, Robert Haas wrote: > On Wed, Apr 6, 2016 at 3:32 AM, Asif Naeem wrote: > >> Oh, I see. I think it's probably not a good idea to skip truncating > >> those maps, but perhaps the option could be defined as making no new

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Tom Lane
Michael Paquier writes: > On Fri, Apr 22, 2016 at 1:30 PM, Tom Lane wrote: >> If we assume that oldstyle functions returning integer are still okay, >> which the success of the regression test case involving oldstyle_length() >> seems to prove, then

Re: [HACKERS] postgres_fdw : Not able to update foreign table referring to a local table's view when use_remote_estimate = true

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 8:44 AM, Rajkumar Raghuwanshi wrote: > I observed below in postgres_fdw. > > Observation: Update a foreign table which is referring to a local table's > view (with use_remote_estimate = true) getting failed with below error. >

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-04-22 Thread Amit Kapila
On Wed, Apr 20, 2016 at 7:39 PM, Andres Freund wrote: > > On 2016-04-19 20:27:31 +0530, Amit Kapila wrote: > > On Sun, Apr 17, 2016 at 2:26 AM, Andres Freund wrote: > > > > > > On 2016-04-16 16:44:52 -0400, Noah Misch wrote: > > > > That is more

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Andreas Joseph Krogh
På fredag 22. april 2016 kl. 14:56:33, skrev Robert Haas >: On Thu, Apr 21, 2016 at 7:20 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Apr 21, 2016 at 4:01 PM, Gavin Flower >>

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-04-22 Thread Amit Kapila
On Thu, Apr 21, 2016 at 6:38 AM, Ants Aasma wrote: > > On Tue, Apr 19, 2016 at 6:11 PM, Kevin Grittner wrote: > > On Tue, Apr 19, 2016 at 9:57 AM, Amit Kapila wrote: > >> On Sun, Apr 17, 2016 at 2:26 AM, Andres Freund

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Tom Lane
Robert Haas writes: > On Thu, Apr 21, 2016 at 7:20 PM, Tom Lane wrote: >> Is that because max_worker_processes is only 8 by default? Maybe we >> need to raise that, at least for beta purposes? > I'm not really in favor of that. I mean, almost all of

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Robert Haas
On Thu, Apr 21, 2016 at 7:20 PM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Apr 21, 2016 at 4:01 PM, Gavin Flower >> wrote: >>> Why not 4? As most processors now have at least 4 physical cores, & surely >>> it be

Re: [HACKERS] Re: [COMMITTERS] pgsql: Avoid extra locks in GetSnapshotData if old_snapshot_threshold

2016-04-22 Thread Kevin Grittner
On Thu, Apr 21, 2016 at 4:13 PM, Kevin Grittner wrote: > I have your test case running, and it is not immediately > clear why old rows are not being vacuumed away. I have not found the reason that the vacuuming is not as aggressive as it should be with this

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Joshua D. Drake
On 04/22/2016 06:47 AM, Robert Haas wrote: On Fri, Apr 22, 2016 at 9:33 AM, Tom Lane wrote: Robert Haas writes: On Thu, Apr 21, 2016 at 7:20 PM, Tom Lane wrote: Is that because max_worker_processes is only 8 by default? Maybe

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Andrew Dunstan
On 04/22/2016 02:46 AM, Michael Paquier wrote: Progress report: 1. My VS 2015 installations (I now have several) all generate solution file with: Microsoft Visual Studio Solution File, Format Version 12.00 so I propose to set that as the solution file version. I am wondering why it

[HACKERS] postgres_fdw : Not able to update foreign table referring to a local table's view when use_remote_estimate = true

2016-04-22 Thread Rajkumar Raghuwanshi
Hi, I observed below in postgres_fdw. *Observation:* Update a foreign table which is referring to a local table's view (with use_remote_estimate = true) getting failed with below error. ERROR: column "ctid" does not exist CONTEXT: Remote SQL command:

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 9:33 AM, Tom Lane wrote: > Robert Haas writes: >> On Thu, Apr 21, 2016 at 7:20 PM, Tom Lane wrote: >>> Is that because max_worker_processes is only 8 by default? Maybe we >>> need to raise that, at least for

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Michael Paquier
On Fri, Apr 22, 2016 at 10:49 PM, Tom Lane wrote: > How far back are we thinking of supporting VS2015, anyway? I can check > and push this as a separate patch. My guess is 9.5: HEAD + last stable branch. That's what has been done when support for VS2012 or VS2013 has been

Re: [HACKERS] kqueue

2016-04-22 Thread Andres Freund
On 2016-04-22 20:39:27 +1200, Thomas Munro wrote: > I vote to leave this patch in the next commitfest where it is, and > reconsider if someone shows up with a relevant problem report on large > systems. Sounds good! > Here's a new version of the patch that fixes some stupid bugs. I have > run

Re: [HACKERS] max_parallel_degree > 0 for 9.6 beta

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 10:07 AM, Joshua D. Drake wrote: > This is the problem right here. > > We should be shipping for a reasonable production configuration. It is not > reasonable to assume that someone is going to be running on a Rasberry Pi 2. > Yes, we can

Re: [HACKERS] pg_dump dump catalog ACLs

2016-04-22 Thread Stephen Frost
* Noah Misch (n...@leadboat.com) wrote: > On Wed, Apr 20, 2016 at 10:50:21PM -0400, Stephen Frost wrote: > > I'm certainly open to improving these issues now if we agree that they > > should be fixed for 9.6. If we don't want to include such changes in 9.6 > > then I will propose then for

Re: [HACKERS] [BUGS] Breakage with VACUUM ANALYSE + partitions

2016-04-22 Thread Andres Freund
On 2016-04-14 11:09:29 +0530, Abhijit Menon-Sen wrote: > At 2016-04-12 09:00:57 -0400, robertmh...@gmail.com wrote: > > > > On Mon, Apr 11, 2016 at 1:17 PM, Andres Freund wrote: > > > > > > 3) Actually handle the case of the last open segment not being > > >RELSEG_SIZE

Re: [HACKERS] Updated backup APIs for non-exclusive backups

2016-04-22 Thread Robert Haas
On Wed, Apr 20, 2016 at 1:32 PM, Magnus Hagander wrote: > Note that we have not marked them as deprecated. We're just giving warnings > that they will be deprecated. But I think that is being said here is that maybe they won't be deprecated, at least not any time soon. And

Re: [HACKERS] VS 2015 support in src/tools/msvc

2016-04-22 Thread Tom Lane
Michael Paquier writes: > On Fri, Apr 22, 2016 at 10:49 PM, Tom Lane wrote: >> How far back are we thinking of supporting VS2015, anyway? I can check >> and push this as a separate patch. > My guess is 9.5: HEAD + last stable branch. That's what

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-22 Thread Jeff Janes
On Mon, Apr 18, 2016 at 7:48 AM, Teodor Sigaev wrote: >>> Added, see attached patch (based on v3.1) >> >> >> With this applied, I am getting a couple errors I have not seen before >> after extensive crash recovery testing: >> ERROR: attempted to delete invisible tuple >> ERROR:

Re: [HACKERS] EXPLAIN VERBOSE with parallel Aggregate

2016-04-22 Thread Robert Haas
On Thu, Apr 21, 2016 at 8:57 PM, David Rowley wrote: > OK, so here's my thoughts. Currently, as mentioned above, I've > included a PARTIAL prefix for partial aggregates. This is > syntactically incorrect for the dumping of views etc, but that should > not matter as

Re: [HACKERS] GIN data corruption bug(s) in 9.6devel

2016-04-22 Thread Robert Haas
On Fri, Apr 22, 2016 at 2:20 PM, Jeff Janes wrote: >> Check my reasoning: In version 4 I added a remebering of tail of pending >> list into blknoFinish variable. And when we read page which was a tail on >> cleanup start then we sets cleanupFinish variable and after cleaning

Re: [HACKERS] Parallel Queries and PostGIS

2016-04-22 Thread Stephen Frost
Paul, * Paul Ramsey (pram...@cleverelephant.ca) wrote: > On Mon, Mar 28, 2016 at 9:45 AM, Stephen Frost wrote: > > Would you agree that it'd be helpful to have for making the st_union() > > work better in parallel? > > For our particular situation w/ ST_Union, yes, it would

Re: [HACKERS] if (!superuser) checks

2016-04-22 Thread Stephen Frost
All, * Stephen Frost (sfr...@snowman.net) wrote: > In particular, the pg_logical_* functions have superuser checks and > those checks also allow roles who have the replication role attribute. > That isn't something we can represent with the GRANT system currently. I chatted with Andres a bit at

Re: [HACKERS] "parallel= " information is not coming in pg_dumpall for create aggregate

2016-04-22 Thread Fabrízio de Royes Mello
On Thu, Apr 21, 2016 at 12:06 AM, Robert Haas wrote: > > On Mon, Apr 18, 2016 at 10:47 AM, Fabrízio de Royes Mello > wrote: > >> I checked in PG 9.6 , if we create an aggregate function with saying - > >> parallel=safe/restricted/unsafe and then

[HACKERS] [PATCH] add option to pg_dumpall to exclude tables from the dump

2016-04-22 Thread Juergen Hannappel
A new option -T --exlude-table for pg_dumpall. This option is then passed through to the pg_dump which really does the work. This feature can be used to exclude large tables that are known not to change from a database backup dump so that only the changing parts of the database are dumped.

Re: [HACKERS] [COMMITTERS] pgsql: Inline initial comparisons in TestForOldSnapshot()

2016-04-22 Thread Kevin Grittner
On Thu, Apr 21, 2016 at 1:45 PM, Tom Lane wrote: > PGDLLIMPORT is what's needed on any backend global variable that's to > be referenced by extensions. I already pushed a fix before noticing > this thread. Thanks! Since I failed to find anything in our docs or C comments,