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) pg_logical_emit

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 t

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 >> > wrote: >> >> >> >> This patch needs to be applied on top discard_hba_and_iden

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 */ > } LatchEvent; > >

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 attaching the tlist to subplan), but I think it

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 > >> influence over the partial path's parallel_degree decisio

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: >>> http://www.postgresql.org/docs/devel/static/functions-datetime.html >>

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, but the hook can chec

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 "ready for committer" and passed the buck on

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 download all the archives and g

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 > method into PG is somethin

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 a simple way to comput

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) when tableoids are > requested

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 sch

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 Freund >> >wrote: >> >> >> >> On 2016-03-18 20:14:07 +0530, Amit Kapi

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 inform extension the context of hook >> invocatio

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 > > > http://www.postgresql.org/message-id/CAKFQuw

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

2016-03-19 Thread David Steele
On 3/17/16 1:17 PM, Robert Haas wrote: > On Thu, Mar 17, 2016 at 12:59 PM, Tom Lane wrote: >> One idea that might be worth considering is to define the function >> as generate_series(date,date,interval) returns timestamp (without >> time zone). The point here would be only to move the behavior fo

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

2016-03-19 Thread Amit Kapila
On Thu, Mar 17, 2016 at 2:56 PM, Constantin S. Pan wrote: > > On Thu, 17 Mar 2016 13:21:32 +0530 > Amit Kapila wrote: > > > On Wed, Mar 16, 2016 at 7:50 PM, Constantin S. Pan > > wrote: > > > > > > On Wed, 16 Mar 2016 18:08:38 +0530 > > > Amit Kapila wrote: > > > > > > > > > > > Why backend jus

Re: [HACKERS] Improve error handling in pltcl

2016-03-19 Thread Pavel Stehule
Hi 2016-03-13 20:24 GMT+01:00 Jim Nasby : > On 3/3/16 8:51 AM, Pavel Stehule wrote: > >> Hi >> >> I am testing behave, and some results looks strange >> > > Thanks for the review! > > postgres=# \sf foo >> CREATE OR REPLACE FUNCTION public.foo() >> RETURNS void >> LANGUAGE plpgsql >> AS $func

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

2016-03-19 Thread Pavel Stehule
2016-03-17 0:39 GMT+01:00 Tom Lane : > 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 table > >> b. So when I do ALTER a.a, then b.a should be chan

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

2016-03-19 Thread David G. Johnston
On Thursday, March 17, 2016, Michael Paquier wrote: > 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.

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

2016-03-19 Thread Tom Lane
Anastasia Lubennikova writes: > There is an issue, mentioned in the thread above: >> postgres=# select >> postgres-# to_char(date_trunc('week', '4713-01-01 BC'::date),'day') >> postgres-# ,to_char(date_trunc('week', '4714-12-29 BC'::date),'day') >> postgres-# ,to_char(date_trunc('wee

Re: [HACKERS] Proposal: BSD Authentication support

2016-03-19 Thread Thomas Munro
On Fri, Mar 18, 2016 at 12:49 PM, Marisa Emerson wrote: > On 18/03/16 03:57, Thomas Munro wrote: >> >> You used one name in the docs and another in the code: >> >> +BSD Authentication on PostgreSQL uses the >> auth-postgres >> +login type and authenticates with the postgres >> login >> >>

Re: [HACKERS] Declarative partitioning

2016-03-19 Thread Alexander Korotkov
Hi, Amit! I tried to apply your patch. It still applies, but has some duplicate oids. After fixing duplicate oids, I've noticed following warning during compilation by clang-700.1.81. scan.c:10308:23: warning: unused variable 'yyg' [-Wunused-variable] struct yyguts_t * yyg = (struct yyguts_

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

2016-03-19 Thread Vitaly Burovoy
On 3/16/16, Tom Lane wrote: > So I fixed that up and committed it, with a very short set of new > regression test cases. I seriously doubt that the other ones add > enough value to be worth trying to make them work in both float- and > int-timestamp cases; though if you want to submit a new patch

Re: [HACKERS] Parallel Aggregate

2016-03-19 Thread James Sewell
Hi again, This is probably me missing something, but is there a reason parallel aggregate doesn't seem to ever create append nodes containing Index scans? SET random_page_cost TO 0.2; SET max_parallel_degree TO 8; postgres=# explain SELECT sum(count_i) FROM base GROUP BY view_time_day;

[HACKERS] Re: [PATH] Jsonb, insert a new value into an array at arbitrary position

2016-03-19 Thread Petr Jelinek
I still don't like that this works on path leading to an object given that we can't fulfill the promise of inserting to an arbitrary position there. -- Petr Jelinek http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services -- Sent via pgsql-hac

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() > >> for each. It will need to inform extension the context of hook >

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

2016-03-19 Thread Jim Nasby
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 table b. So when I do ALTER a.a, then b.a should be changed. What if I drop a.a or drop a? So this is reason, why I don't would this feature

Re: [HACKERS] Performance degradation in commit ac1d794

2016-03-19 Thread Amit Kapila
On Thu, Mar 17, 2016 at 7:34 AM, Andres Freund wrote: > Hi, > > * I can do a blind rewrite of the windows implementation, but I'm > obviously not going to get that entirely right. So I need some help > from a windows person to test this. > I can help you verifying the windows implementation.

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

2016-03-19 Thread David Steele
On 3/17/16 5:07 PM, David G. Johnston wrote: > Figured out it had to be added to 2016-09...done Hmm ... this patch is currently marked "needs review" in CF 2016-03. Am I missing something, should this have been closed? -- -David da...@pgmasters.net -- Sent via pgsql-hackers mailing list (pg

[HACKERS] Minor typos in optimizer/README

2016-03-19 Thread Jim Nasby
Studying the partification commit, I noticed a few typos in $SUBJECT. Patch attached. -- Jim Nasby, Data Architect, Blue Treble Consulting, Austin TX Experts in Analytics, Data Architecture and PostgreSQL Data in Trouble? Get it in Treble! http://BlueTreble.com diff --git a/src/backend/optimizer/

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: http://www.sraoss.co.jp/index_e

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() > > >> for each. It will need to inform extension the c

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 >> Alvaro

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. > Ah, I see. FWIW, t

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 messy compared to the am

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 table > >> b. So when I do ALTER a.a, then b.a s

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 Company diff --git a/

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 CF record and forgot: >> https://commitfest

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 the initial results

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 some difficulty with that. I keep >> hoping s

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 > like it would be pretty t

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, Constantin S. Pan > > > wrote: > > > > 3. Tested on some real data (G

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 > achie

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 which stores tuple data, and reset it >>> at the

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. I think building with --enable-cassert is su

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 ind

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 >>> wrote: Here's a small docpatch to fix two typos in the new documen

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 this patch is good? I do

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 @@ create_agg_path(PlannerInfo *root, > > > > List *groupClause, > > List

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 first case a quick grep c

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 >> generate_series(1,100

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 that if we do end up using a Result node, th

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. cur_

[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 honest

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 the OID of the new pg

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 li

[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 PG_CMD_

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 then an fsync pass o

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 last year. >>> >>> This version does not s

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 nu

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 it

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 found at once. I disagree that the example > is no

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 made to work, but it is m

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 think that's the wrong directio

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 o

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 project (and needs to, > > > per the example of needing to compute a no

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 >> float8_pl. There's already a func

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 maili

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 some adjustment. > >> OK, how about this? > > Looks pretty close

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 invocation is needed just after create__paths() >>> for each. It will n

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 the steps anyway. So I'd be inclined >> to l

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 someone might want to > exam

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 high hopes >> to get this portion integrating into co

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. > > What's the specifics of

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 a.a%TYPE) >> >> >> >> And the people expecting the living relation between tabl

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 required I mean, they a

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 well >> advised to boot it to the 2016-09 CF and f

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() comes out when both > >> >pgwin32_signal_event an

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 however change the ap

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 should be marked "ready f

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. regards

[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. B

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 going to stay stable. > Hmm... It's not ea

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 a real >>> alternative to Aggref. But that's not what you've got here. A >>

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 3/17/16 4:49 AM, Dean Rasheed wrote: > >

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 unreadable, because of th

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 available, it would just

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 not

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 to

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 doubt that female coders stay awa

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 important, because wha

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 --git a/src/backend/acces

  1   2   3   4   >