Re: [HACKERS] oldest xmin is far in the past

2016-03-19 Thread John Snow
There is no any long transaction neither prepared transaction. #autovacuum_freeze_max_age = 2 - default value I have 9.4.5 version. Also it all started after I've setup Slony replication(mb just a coincidence). All tables in public schema have the same "age", I believe this is weird. How

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

2016-03-19 Thread Jeff Janes
On Thu, Mar 17, 2016 at 2:15 PM, Kevin Grittner wrote: > New patch just to merge in recent commits -- it was starting to > show some bit-rot. Tests folded in with main patch. I'm not sure if this is operating as expected. I set the value to 1min. I set up a test like this:

Re: [HACKERS] logger process infinite loop

2016-03-19 Thread Jeff Janes
On Fri, Mar 18, 2016 at 10:39 PM, Andres Freund wrote: > Hi, > > On 2016-03-18 21:59:01 -0700, Jeff Janes wrote: >> While testing some patches on my laptop, I noticed my knee getting >> uncomfortably warm. It turns out I has accumulating deranged logging >> processes, needing

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Sat, Mar 19, 2016 at 12:00 AM, Andres Freund wrote: > > On 2016-03-18 20:14:07 +0530, Amit Kapila wrote: > > > I have done some > > tests on Windows with 0003 patch which includes running the regressions > > (vcregress check) and it passes. Will look into it tomorrow once

Re: [HACKERS] Weighted Stats

2016-03-19 Thread David Fetter
On Fri, Mar 18, 2016 at 06:12:12PM -0700, Jeff Janes wrote: > On Tue, Mar 15, 2016 at 8:36 AM, David Fetter wrote: > > > > Please find attached a patch that uses the float8 version to cover the > > numeric types. > > Is there a well-defined meaning for having a negative weight?

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
On March 18, 2016 11:32:53 PM PDT, Amit Kapila wrote: >On Sat, Mar 19, 2016 at 12:00 AM, Andres Freund >wrote: >> >> On 2016-03-18 20:14:07 +0530, Amit Kapila wrote: >> >> > I have done some >> > tests on Windows with 0003 patch which includes

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Sat, Mar 19, 2016 at 12:14 PM, Andres Freund wrote: > > > > On March 18, 2016 11:32:53 PM PDT, Amit Kapila wrote: > >On Sat, Mar 19, 2016 at 12:00 AM, Andres Freund > >wrote: > >> > >> On 2016-03-18 20:14:07 +0530, Amit Kapila

Re: [HACKERS] logger process infinite loop

2016-03-19 Thread Andres Freund
On 2016-03-18 22:39:25 -0700, Andres Freund wrote: > Hi, > > On 2016-03-18 21:59:01 -0700, Jeff Janes wrote: > > While testing some patches on my laptop, I noticed my knee getting > > uncomfortably warm. It turns out I has accumulating deranged logging > > processes, needing kill -9 to get rid

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Kevin Grittner
On Thu, Mar 17, 2016 at 11:41 PM, Kevin Grittner wrote: > Note that since multiple lines with gender-specific pronouns > sometimes are near each other and thus show up in the same block, > there are 59 blocks in 42 files. Adding two more pronouns I noticed in a closer scan of

Re: [HACKERS] pgbench - allow backslash-continuations in custom scripts

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 10:02 AM, Tom Lane wrote: > Robert Haas writes: >> Well, I'm trying to find a piece of this patch that is small enough >> that I can understand it and in good enough shape that I can commit it >> independently, but I am having

Re: [HACKERS] Proposal: SET ROLE hook

2016-03-19 Thread David Steele
On 3/6/16 1:17 AM, Pavel Stehule wrote: > 2016-03-05 21:49 GMT+01:00 Joe Conway >: > > I still don't see any point in trying to pass data back from the hooks > as the extension can maintain that state just fine, although it looks >

Re: [HACKERS] [WIP] speeding up GIN build with parallel workers

2016-03-19 Thread Constantin S. Pan
On Wed, 16 Mar 2016 18:08:38 +0530 Amit Kapila wrote: > On Wed, Mar 16, 2016 at 2:55 PM, Constantin S. Pan > wrote: > > > > On Wed, 16 Mar 2016 12:14:51 +0530 > > Amit Kapila wrote: > > > > > On Wed, Mar 16, 2016 at 5:41 AM,

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Gavin Flower
On 18/03/16 09:41, Joshua D. Drake wrote: On 03/17/2016 01:36 PM, Alvaro Herrera wrote: [...] (*) I'm probably going to be expelled from the project for saying this, but I very much doubt that female coders stay away from PostgreSQL just because some files say "he" in comments rather than

Re: [HACKERS] jsonb array-style subscription

2016-03-19 Thread David Steele
Hi Dmitry, On 3/3/16 5:31 AM, Dmitry Dolgov wrote: >> If the patch were proposing a similar amount of new infrastructure to >> support some datatype-extensible concept of subscripting, I'd be much >> happier about it. > > Well, actually, I agree with that. I can try to rework the patch to >

Re: [HACKERS] [COMMITTERS] pgsql: Improve memory management for external sorts.

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 2:39 PM, Robert Haas wrote: > On Fri, Mar 18, 2016 at 2:25 PM, Andres Freund wrote: >> On 2016-03-17 20:11:00 +, Robert Haas wrote: >>> Improve memory management for external sorts. >>> >>> Introduce a new memory context

Re: [HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Jim Nasby
On 3/16/16 2:16 PM, Tom Lane wrote: Robert Haas writes: On Wed, Mar 16, 2016 at 2:05 PM, Tom Lane wrote: Possible compromise: remove files only in non-Assert builds? That sorta seems like tying two things together that aren't obviously related.

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Tatsuo Ishii
Sounds like a bug. We should either fix pgbench so that -M and -C can be used together (I don't see any technical reason why we can't do this) or modify pgbench to not allow using -M and -C (less desirable). Best regards, -- Tatsuo Ishii SRA OSS, Inc. Japan English:

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Kouhei Kaigai
> > Robert Haas writes: > > > On Mon, Mar 14, 2016 at 9:21 PM, Kouhei Kaigai > > > wrote: > > >> So, even though we don't need to define multiple hook declarations, > > >> I think the hook invocation is needed just after create__paths() > > >>

Re: [HACKERS] Speed up Clog Access by increasing CLOG buffers

2016-03-19 Thread Amit Kapila
On Wed, Mar 16, 2016 at 11:57 PM, Jesper Pedersen < jesper.peder...@redhat.com> wrote: > > On 03/15/2016 01:17 AM, Amit Kapila wrote: >> >> I have updated the comments and changed the name of one of a variable from >> "all_trans_same_page" to "all_xact_same_page" as pointed out offlist by >>

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Tom Lane
David Steele writes: > On 3/17/16 11:55 AM, David G. Johnston wrote: >> With the first argument casted to date it doesn't matter whether you >> cast the second argument as the pseudo-type anyelement will take its >> value from the first argument and force the second to date.

Re: [HACKERS] Show dropped users' backends in pg_stat_activity

2016-03-19 Thread Oskari Saarenmaa
16.03.2016, 17:48, Tom Lane kirjoitti: Robert Haas writes: Gee, I would have expected the DROP to be blocked until the user disconnected, like we do for DROP DATABASE. Making that race-condition-free would require some notion of a lock on roles, I think. Seems pretty

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread Jim Nasby
On 3/15/16 7:17 PM, Tom Lane wrote: In short, I think we should reject this implementation and instead try to implement the type operators we want in the core grammar's Typename production, from which plpgsql will pick it up automatically. +1. Something else that's been discussed is allowing

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread David G. Johnston
On Wed, Mar 16, 2016 at 4:39 PM, Tom Lane wrote: > Jim Nasby writes: > > On 3/3/16 4:51 AM, Pavel Stehule wrote: > >> CREATE TABLE a(a int); > >> CREATE TABLE b(a a.a%TYPE) > >> > >> And the people expecting the living relation between table a and

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 12:57 PM, Tom Lane wrote: > Yeah, I was thinking about the same thing. The comment block above > where you're looking would need some adjustment. OK, how about this? -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread Michael Paquier
On Fri, Mar 18, 2016 at 8:16 AM, Tom Lane wrote: > David Steele writes: >> On 3/17/16 7:00 PM, Tom Lane wrote: >>> The message I saw was post-1-March. If it was in fact submitted in >>> time for 2016-03, then we owe it a review. > >> I meant to add the

Re: [HACKERS] POC, WIP: OR-clause support for indexes

2016-03-19 Thread Teodor Sigaev
I also wonder whether the patch should add explanation of OR-clauses handling into the READMEs in src/backend/access/* Not yet, but will The patch would probably benefit from transforming it into a patch series - one patch for the infrastructure shared by all the indexes, then one patch per

Re: [HACKERS] RFC: replace pg_stat_activity.waiting with something more descriptive

2016-03-19 Thread Michael Paquier
On Thu, Mar 17, 2016 at 11:10 PM, Robert Haas wrote: > On Wed, Mar 16, 2016 at 10:03 PM, Michael Paquier > wrote: >> On Wed, Mar 16, 2016 at 5:28 AM, Robert Haas wrote: >>> On Tue, Mar 15, 2016 at 9:17 AM, Thomas Reiss

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Alvaro Herrera
Joshua D. Drake wrote: > On 03/17/2016 01:36 PM, Alvaro Herrera wrote: > >Robert Haas wrote: > >>On Thu, Mar 17, 2016 at 3:31 PM, Joshua D. Drake > >>wrote: > >>>Per the twitter verse, here is an updated version of primnodes.h > >> > >>+1. > > > >+1 what? Are you saying

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Amit Kapila
On Thu, Mar 17, 2016 at 10:35 AM, David Rowley wrote: > > On 17 March 2016 at 01:19, Amit Kapila wrote: > > Few assorted comments: > > > > 2. > > AggPath * > > create_agg_path(PlannerInfo *root, > > @@ -2397,9 +2399,11 @@

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Chapman Flack
On 03/17/16 09:35, Tom Lane wrote: > Chapman Flack writes: >> I'm in the same boat ... I have an input function I want to test, and so >> far I have failed to think of *any* sql construct that causes it to be >> invoked with other than -1 for the typmod. > > COPY was the

Re: [HACKERS] Weighted Stats

2016-03-19 Thread Jeff Janes
On Fri, Mar 18, 2016 at 11:34 PM, David Fetter wrote: > On Fri, Mar 18, 2016 at 06:12:12PM -0700, Jeff Janes wrote: >> Also, I think it might not give the correct answer even without >> negative weights: >> >> create table foo as select floor(random()*1)::int val from >>

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Wed, Mar 16, 2016 at 12:57 PM, Tom Lane wrote: >> Yeah, I was thinking about the same thing. The comment block above >> where you're looking would need some adjustment. > OK, how about this? Looks pretty close. One point is

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
On 2016-03-18 14:00:58 -0400, Robert Haas wrote: > No, I mean it should be quite common for a particular fd to have no > events reported. If we're polling on 100 fds and 1 of them is active > and the other 99 are just sitting there, we want to skip over the > other 99 as quickly as possible.

[HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread Joshua D. Drake
Per the twitter verse, here is an updated version of primnodes.h -- Command Prompt, Inc. http://the.postgres.company/ +1-503-667-4564 PostgreSQL Centered full stack support, consulting and development. Everyone appreciates your honesty, until you are

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

2016-03-19 Thread Magnus Hagander
On Wed, Mar 16, 2016 at 5:06 PM, David Steele wrote: > Hi Magnus, > > On 3/2/16 12:49 PM, Marco Nenciarini wrote: > > > I've finally found some time to take a look to the patch. > > > > It applies with some fuzziness on master, but the result looks correct. > > Unfortunately

Re: [HACKERS] async replication code

2016-03-19 Thread otheus uibk
I will ask again: where in the code is the asynchronous replication code? The docs are not detailed/exact enough. > > Main question: I want to understand very precisely the exact algirithm > used in PG to do asynchronous streaming replication. Eg, I want to know how > the record is written and

Re: [HACKERS] WIP: Access method extendability

2016-03-19 Thread Petr Jelinek
On 16/03/16 15:31, Teodor Sigaev wrote: Good catch, thanks! Tests were added. I don't see any objection, is consensus reached? I'm close to comiit that... I did only cursory review on the bloom contrib module and don't really have complaints there, but I know you can review that one. I'd

[HACKERS] initdb: introduce PG_CMD_PRINTF intestead of PG_CMD_PRINTF{1,2,3}

2016-03-19 Thread Alexander Kuleshov
Hello all, The src/bin/initdb/initdb.c provides three macros to write data to cmdfd. All of these macro do the same, but with different amount of arguments for fprintf(). Attached patch introduces PG_CMD_PRINTF macro which will take set of variadic arguments via __VA_ARGS__ to replace the

Re: [HACKERS] silent data loss with ext4 / all current versions

2016-03-19 Thread Michael Paquier
On Fri, Mar 18, 2016 at 12:03 AM, Andres Freund wrote: > This is a *much* more expensive approach though. Doing the fsync > directly after modifying the file. One file by one file. Will usually > result in each fsync blocking for a while. > > In comparison of doing a flush and

Re: [HACKERS] Idle In Transaction Session Timeout, revived

2016-03-19 Thread Robert Haas
On Tue, Mar 15, 2016 at 8:08 PM, Vik Fearing wrote: > On 03/08/2016 10:42 PM, Robert Haas wrote: >> On Sun, Jan 31, 2016 at 8:33 AM, Vik Fearing wrote: >>> Attached is a rebased and revised version of my >>> idle_in_transaction_session_timeout patch from

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

2016-03-19 Thread Kevin Grittner
New patch just to merge in recent commits -- it was starting to show some bit-rot. Tests folded in with main patch. -- Kevin Grittner EDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company snapshot-too-old-v5.patch Description: invalid/octet-stream -- Sent via pgsql-hackers

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 2:02 PM, Tom Lane wrote: > Robert Haas writes: >> On Wed, Mar 16, 2016 at 12:57 PM, Tom Lane wrote: >>> Yeah, I was thinking about the same thing. The comment block above >>> where you're looking would need

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 2:47 PM, Tom Lane wrote: > Robert Haas writes: >> On Mon, Mar 14, 2016 at 9:21 PM, Kouhei Kaigai wrote: >>> So, even though we don't need to define multiple hook declarations, >>> I think the hook

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Thu, Mar 17, 2016 at 2:31 PM, Tom Lane wrote: >> Also, I don't particularly see a need for a corresponding API for FDWs. >> If an FDW is going to do anything in this space, it presumably has to >> build up ForeignPaths for all

Re: [HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Tom Lane
"Joshua D. Drake" writes: > Hello, > fd.c[1] will remove files from pgsql_tmp on a restart but not a > crash-restart per this comment: > /* > * NOTE: we could, but don't, call this during a post-backend-crash restart > * cycle. The argument for not doing it is that

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 2:31 PM, Tom Lane wrote: > Well, I'm prepared to yield to the extent of repeating the hook call > before each phase with an UpperRelationKind parameter to tell which phase > we're about to do. The main concern here is to avoid redundant > computation,

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Corey Huinker
On Thu, Mar 17, 2016 at 10:00 AM, David Steele wrote: > On 3/17/16 4:49 AM, Dean Rasheed wrote: > > > On 16 March 2016 at 23:32, David Steele wrote: > > > >> > >> I think in this case it comes down to a committer's judgement so I have > >> marked this

Re: [HACKERS] async replication code

2016-03-19 Thread Stas Kelvich
> On 16 Mar 2016, at 15:52, otheus uibk wrote: > > Greetings, Hi > > I am new here. Apologetic question: how can i search the archives of this > mailing list? Is there some set of magic words to put in Google? Must I wade > through 20 pages of hits? Should I

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 2:12 PM, Stephen Frost wrote: > I'm not sure that I agree with the above. This patch has been through > the ringer multiple times regarding the user-facing bits and, by and > large, the results appear reasonable. Further, getting a better auth >

Re: [HACKERS] btree_gin and btree_gist for enums

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 11:21 AM, Andrew Dunstan wrote: > On 03/17/2016 06:44 AM, Andrew Dunstan wrote: >> >> Here is a patch to add enum support to btree_gin and btree_gist. I didn't >> include distance operations, as I didn't think it terribly important, and >> there isn't

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread Corey Huinker
On Thu, Mar 17, 2016 at 11:30 AM, David G. Johnston < david.g.johns...@gmail.com> wrote: > ​I'd call it "generate_dates(...)" and be done with it. > Sold. Hope to have a revised patch for you today or tomorrow.

Re: [HACKERS] Odd system-column handling in postgres_fdw join pushdown patch

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 7:00 AM, Etsuro Fujita wrote: > BUT: we don't make any effort to ensure that local and remote values > match, so system columns other than ctid and oid should not be retrieved > from the remote server. I agree. > So, I'd like to propose: (1)

Re: [HACKERS] incorrect docs for pgbench / skipped transactions

2016-03-19 Thread Fabien COELHO
Hello Tomas, while learning about format of the transaction log produced by pgbench, I've noticed this sentence in the section describing format of the per-transaction log: The last field skipped_transactions reports the number of transactions skipped because they were too far behind

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
On March 18, 2016 11:52:08 PM PDT, Amit Kapila wrote: >On Sat, Mar 19, 2016 at 12:14 PM, Andres Freund >wrote: >> >> >> >> On March 18, 2016 11:32:53 PM PDT, Amit Kapila > >wrote: >> >On Sat, Mar 19, 2016 at 12:00 AM, Andres

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Tom Lane
Robert Haas writes: > On Mon, Mar 14, 2016 at 9:21 PM, Kouhei Kaigai wrote: >> So, even though we don't need to define multiple hook declarations, >> I think the hook invocation is needed just after create__paths() >> for each. It will need to

Re: [HACKERS] [GENERAL] Request - repeat value of \pset title during \watch interations

2016-03-19 Thread David G. Johnston
Figured out it had to be added to 2016-09...done On Wed, Mar 9, 2016 at 11:40 PM, David G. Johnston < david.g.johns...@gmail.com> wrote: > Adding -hackers for consideration in the Commitfest. > > Thanks! > > David J. > > >>>Original request by me > > >

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Fri, Mar 18, 2016 at 1:34 PM, Andres Freund wrote: > > Hi, > > On 2016-03-17 09:01:36 -0400, Robert Haas wrote: > > 0001: Looking at this again, I'm no longer sure this is a bug. > > Doesn't your patch just check the same conditions in the opposite > > order? > > Which is

Re: [HACKERS] Relation extension scalability

2016-03-19 Thread Dilip Kumar
On Thu, Mar 17, 2016 at 1:31 PM, Petr Jelinek wrote: > Great. > > Just small notational thing, maybe this would be simpler?: > extraBlocks = Min(512, lockWaiters * 20); > Done, new patch attached. -- Regards, Dilip Kumar EnterpriseDB: http://www.enterprisedb.com diff

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Tom Lane
Tatsuo Ishii writes: > Sounds like a bug. We should either fix pgbench so that -M and -C can > be used together (I don't see any technical reason why we can't do > this) or modify pgbench to not allow using -M and -C (less desirable). We're not resetting the prepared[]

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Fri, Mar 18, 2016 at 1:34 PM, Andres Freund wrote: > > > Attached is a significantly revised version of the earlier series. Most > importantly I have: > * Unified the window/unix latch implementation into one file (0004) > After applying patch 0004* on HEAD, using command

Re: [HACKERS] Declarative partitioning

2016-03-19 Thread Alexander Korotkov
On Wed, Mar 16, 2016 at 5:29 PM, Amit Langote wrote: > > 9.6 feature freeze in coming, and we're planning our development > resources > > for 9.7. Besides providing an extension, we would like these features to > > eventually arrive to core. In order to achieve this we

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 10:04 PM, Andres Freund wrote: > Questions: > * I'm kinda inclined to merge the win32 and unix latch > implementations. There's already a fair bit in common, and this is > just going to increase that amount. Don't care either way. > * Right now

Re: [HACKERS] checkpointer continuous flushing

2016-03-19 Thread Tomas Vondra
Hi, On 03/17/2016 06:36 PM, Fabien COELHO wrote: Hello Tomas, Thanks for these great measures. * 4 x CPU E5-4620 (2.2GHz) 4*8 = 32 cores / 64 threads. Yep. I only used 32 clients though, to keep some of the CPU available for the rest of the system (also, HT does not really double the

Re: [HACKERS] [WIP] Effective storage of duplicates in B-tree index.

2016-03-19 Thread Anastasia Lubennikova
Please, find the new version of the patch attached. Now it has WAL functionality. Detailed description of the feature you can find in README draft https://goo.gl/50O8Q0 This patch is pretty complicated, so I ask everyone, who interested in this feature, to help with reviewing and testing

Re: [HACKERS] [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check

2016-03-19 Thread Tom Lane
Mark Dilger writes: >> On Mar 14, 2016, at 5:12 PM, Vitaly Burovoy wrote: >> I don't think it is real, and even in such case all constants are >> collected together in the file and will be found and changed at once. > I agree that they would be

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Tom Lane
Fabien COELHO writes: >>> Is a connection per transaction really a sane case to consider? >> Yes, I would think. This case reveals the connection overhead. We >> already are able to handle the simple query cases. Why not for >> extended query cases? > Probably it can be

Re: [HACKERS] Optimization for updating foreign tables in Postgres FDW

2016-03-19 Thread Robert Haas
On Fri, Mar 18, 2016 at 5:15 AM, Etsuro Fujita wrote: > On 2016/03/10 2:56, Robert Haas wrote: >> I see that you went and changed all of the places that tested for != >> CMD_SELECT and made them test for == CMD_INSERT || == CMD_UPDATE || == >> CMD_DELETE instead. I

Re: [HACKERS] fd.c doesn't remove files on a crash-restart

2016-03-19 Thread Joshua D. Drake
On 03/16/2016 11:08 AM, Andres Freund wrote: Well as Andrew said, we could also create postmaster start option that defaults to don't save. I think these days you'd simply use restart_after_crash = false. For debugging I found that to be rather valuable. That would have created an extended

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 3:09 AM, Amit Kapila wrote: > On Wed, Mar 9, 2016 at 11:58 PM, Robert Haas > wrote: > > > > On Wed, Mar 9, 2016 at 12:33 PM, Tom Lane wrote: > > > > > > Gather is a bit weird, because although it can

Re: [HACKERS] Combining Aggregates

2016-03-19 Thread Haribabu Kommi
On Thu, Mar 17, 2016 at 10:59 PM, Tomas Vondra wrote: > Hi, > > On 03/17/2016 12:53 PM, David Rowley wrote: >> > ... >> >> >> I just had a quick skim over the patch and noticed the naming >> convention you're using for the combine function is *_pl, and you have >>

Re: [HACKERS] Password identifiers, protocol aging and SCRAM protocol

2016-03-19 Thread Michael Paquier
On Sat, Mar 19, 2016 at 12:28 AM, Robert Haas wrote: > On Fri, Mar 18, 2016 at 9:31 AM, Michael Paquier > wrote: >> That's not an issue for me to rebase this set of patches. The only >> conflicts that I anticipate are on 0009, but I don't have

Re: [HACKERS] POC: Cache data in GetSnapshotData()

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 1:33 PM, Andres Freund wrote: > On 2016-03-16 13:29:22 -0400, Robert Haas wrote: >> Whoa. At 64 clients, we're hardly getting any benefit, but then by 88 >> clients, we're getting a huge benefit. I wonder why there's that sharp >> change there. > >

Re: [HACKERS] plpgsql - DECLARE - cannot to use %TYPE or %ROWTYPE for composite types

2016-03-19 Thread Pavel Stehule
2016-03-17 1:02 GMT+01:00 David G. Johnston : > On Wed, Mar 16, 2016 at 4:39 PM, Tom Lane wrote: > >> Jim Nasby writes: >> > On 3/3/16 4:51 AM, Pavel Stehule wrote: >> >> CREATE TABLE a(a int); >> >> CREATE TABLE b(a

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 10:57 AM, Andres Freund wrote: > On 2016-03-17 09:01:36 -0400, Robert Haas wrote: >> 0001: Looking at this again, I'm no longer sure this is a bug. >> Doesn't your patch just check the same conditions in the opposite >> order? > > Yes, that's what's

Re: [HACKERS] eXtensible Transaction Manager API (v2)

2016-03-19 Thread Stas Kelvich
On 12 Mar 2016, at 13:19, Michael Paquier wrote: > > On Fri, Mar 11, 2016 at 9:35 PM, Tom Lane wrote: >> IMO this is not committable as-is, and I don't think that it's something >> that will become committable during this 'fest. I think we'd be

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Sat, Mar 19, 2016 at 12:40 PM, Andres Freund wrote: > > On March 18, 2016 11:52:08 PM PDT, Amit Kapila wrote: > >> >Won't the new code needs to ensure that ResetEvent(latchevent) > >should > >> >get > >> >called in case WaitForMultipleObjects()

Re: [HACKERS] PATCH: index-only scans with partial indexes

2016-03-19 Thread Kyotaro HORIGUCHI
Thank for changing status. At Wed, 16 Mar 2016 12:13:07 -0400, David Steele wrote in <56e98613.5000...@pgmasters.net> > On 3/9/16 3:29 AM, Kyotaro HORIGUCHI wrote: > > > Hello, thank you for the comments. The new v8 patch is attched. > > As far as I can see this patch

Re: [HACKERS] typmod is always -1

2016-03-19 Thread Tom Lane
Chapman Flack writes: > I'm in the same boat ... I have an input function I want to test, and so > far I have failed to think of *any* sql construct that causes it to be > invoked with other than -1 for the typmod. COPY was the first case a quick grep came across.

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
On 2016-03-16 15:41:28 -0400, Robert Haas wrote: > On Wed, Mar 16, 2016 at 3:25 PM, Andres Freund wrote: > >> > - Given current users we don't need a large amount of events, so having > >> > to iterate through the registered events doesn't seem bothersome. We > >> > could

[HACKERS] Applying logical replication changes by more than one process

2016-03-19 Thread Konstantin Knizhnik
Hi, I am trying to use logical replication mechanism in implementation of PostgreSQL multimaster and faced with one conceptual problem. Originally logical replication was intended to support asynchronous replication. In this case applying changes by single process should not be a bottleneck.

Re: [HACKERS] WIP: Upper planner pathification

2016-03-19 Thread Tom Lane
Kouhei Kaigai writes: > On Wed, Mar 16, 2016 at 2:47 PM, Tom Lane wrote: >> I do not, however, like the proposal to expose wflists and so forth. >> Those are internal data structures in grouping_planner and I absolutely >> refuse to promise that they're

Re: [HACKERS] [PATCH] Integer overflow in timestamp[tz]_part() and date/time boundaries check

2016-03-19 Thread Tom Lane
I wrote: > My feeling is we ought to preserve the old behavior here, which would > involve making JULIAN_MAXYEAR_FOR_TIMESTAMPS format-dependent and > adjusting the float values for the two derived constants; not much of a > problem code-wise. I think though that it would break quite a number of

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 7:57 AM, Robert Haas wrote: > On Wed, Mar 16, 2016 at 6:49 AM, David Rowley > wrote: >> On 16 March 2016 at 15:04, Robert Haas wrote: >>> I don't think I'd be objecting if you made PartialAggref

Re: [HACKERS] Re: Add generate_series(date,date) and generate_series(date,date,integer)

2016-03-19 Thread David Steele
On 3/17/16 11:30 AM, David G. Johnston wrote: > On Thu, Mar 17, 2016 at 7:57 AM, Corey Huinker >wrote: > > On Thu, Mar 17, 2016 at 10:00 AM, David Steele > wrote: > > On

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Robert Haas
On Thu, Mar 17, 2016 at 10:53 AM, Andres Freund wrote: >> I wonder if there's a way to refactor this code to avoid having so >> much cut-and-paste duplication. > > I guess you mean WaitEventSetWait() and WaitEventAdjust*? I've tried, > and my attempt ended up look nearly

Re: [HACKERS] Using quicksort for every external sort run

2016-03-19 Thread Peter Geoghegan
On Wed, Mar 16, 2016 at 6:42 PM, Peter Geoghegan wrote: >> - I think that batchmemtuples() is somewhat weird. Normally, >> grow_memtuples() doubles the size of the array each time it's called. >> So if you somehow called this function when you still had lots of >> memory

Re: [HACKERS] [BUGS] pgbench -C -M prepared gives an error

2016-03-19 Thread Fabien COELHO
Hello Tatsuo, We're not resetting the prepared[] array when we pull the plug on an existing connection. Is a connection per transaction really a sane case to consider? Yes, I would think. This case reveals the connection overhead. We already are able to handle the simple query cases. Why

Re: [HACKERS] checkpointer continuous flushing

2016-03-19 Thread Tomas Vondra
Hi, On 03/11/2016 02:34 AM, Andres Freund wrote: Hi, I just pushed the two major remaining patches in this thread. Let's see what the buildfarm has to say; I'd not be surprised if there's some lingering portability problem in the flushing code. There's one remaining issue we definitely want

Re: [HACKERS] Make primnodes.h gender neutral

2016-03-19 Thread David G. Johnston
On Thu, Mar 17, 2016 at 2:17 PM, Gavin Flower wrote: > On 18/03/16 09:41, Joshua D. Drake wrote: > >> On 03/17/2016 01:36 PM, Alvaro Herrera wrote: >> >> [...] > >> >> >>> (*) I'm probably going to be expelled from the project for saying this, >>> but I very much

Re: [HACKERS] Improve error handling in pltcl

2016-03-19 Thread Tom Lane
Pavel Stehule writes: > I'll mark this patch as ready for commiters. I started to look at this patch. It seems to me that the format of the errorCode output is not terribly well designed. I see that Tcl constrains it to be a list starting with an

Re: [HACKERS] postgresql 9.4 on AIX 7.1

2016-03-19 Thread Craig Ringer
On 18 March 2016 at 05:00, Lizeth Solis Aramayo wrote: > Hello, > > > > Please I want to install the software mentioned Up (postgresql 9.4 on AIX > 7.1 – 8.0 ). > > Do you think that I could do this? > Yes. There are a number of AIX buildfarm members, testing with both

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

2016-03-19 Thread David Steele
Hi Magnus, On 3/2/16 12:49 PM, Marco Nenciarini wrote: > I've finally found some time to take a look to the patch. > > It applies with some fuzziness on master, but the result looks correct. > Unfortunately the OID of the new pg_stop_backup function conflicts with > "pg_blocking_pids()" patch

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Andres Freund
Hi, On 2016-03-17 09:01:36 -0400, Robert Haas wrote: > 0001: Looking at this again, I'm no longer sure this is a bug. > Doesn't your patch just check the same conditions in the opposite > order? Which is important, because what's in what pfds[x] depends on wakeEvents. Folded it into a later

Re: [HACKERS] Proposal: Generic WAL logical messages

2016-03-19 Thread Tomas Vondra
Hi, a few comments about the last version of the patch: 1) LogicalDecodeMessageCB Do we actually need the 'transactional' parameter here? I mean, having the 'txn' should be enough, as transactional = (txt != NULL) Of course, having a simple flag is more convenient. 2)

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread James Sewell
Hey, I think are definitely use cases for using parallel agg on a small table when the time for each agg operation is very high. PostGIS can be used to create many examples of low row count and table size but high CPU operations. This does bring up an interesting point I don't quite understand

Re: [HACKERS] pg_hba_lookup function to get all matching pg_hba.conf entries

2016-03-19 Thread Haribabu Kommi
On Wed, Mar 16, 2016 at 9:49 PM, Shulgin, Oleksandr wrote: > On Tue, Mar 15, 2016 at 7:23 PM, David Steele wrote: >> >> On 3/3/16 12:16 AM, Haribabu Kommi wrote: >> > On Fri, Feb 5, 2016 at 2:29 PM, Haribabu Kommi >> >

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Robert Haas
On Wed, Mar 16, 2016 at 2:52 PM, Andres Freund wrote: > How about the following sketch of an API > > typedef struct LatchEvent > { > uint32 events; /* interesting events */ > uint32 revents; /* returned events */ > int fd; /* fd associated with event

Re: Pushdown target list below gather node (WAS Re: [HACKERS] WIP: Upper planner pathification)

2016-03-19 Thread Amit Kapila
On Thu, Mar 17, 2016 at 7:10 PM, Tom Lane wrote: > > Amit Kapila writes: > > While reading above code changes, it looks like it is assuming that subpath > > and subplan will always be same (as it is verifying projection capability > > of subpath and

Re: [HACKERS] Choosing parallel_degree

2016-03-19 Thread Robert Haas
On Tue, Mar 15, 2016 at 8:26 PM, Julien Rouhaud wrote: > On 15/03/2016 21:12, Robert Haas wrote: > > On Mon, Mar 14, 2016 at 9:25 PM, David Rowley > > wrote: > >> Over in [1] James mentioned about wanting more to be able to have more > >>

Re: [HACKERS] [PATCH] Supporting +-Infinity values by to_timestamp(float8)

2016-03-19 Thread Vitaly Burovoy
On 2016-03-15, David Steele wrote: > On 3/4/16 2:56 PM, Vitaly Burovoy wrote: >> On 3/4/16, Anastasia Lubennikova wrote: >> >>> I think that you should update documentation. At least description of >>> epoch on this page: >>>

  1   2   3   4   >