Re: [HACKERS] Better way of dealing with pgstat wait timeout during buildfarm runs?

2015-01-21 Thread Andres Freund
On 2015-01-21 22:43:03 -0500, Matt Kelly wrote: > > > > Sure, but nobody who is not a developer is going to care about that. > > A typical user who sees "pgstat wait timeout", or doesn't, isn't going > > to be able to make anything at all out of that. > > > As a user, I wholeheartedly disagree.

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Langote
On 22-01-2015 PM 02:30, Amit Kapila wrote: >> Perhaps you are aware or you've postponed working on it, but I see that >> a plan executing in a worker does not know about instrumentation. > > I have deferred it until other main parts are stabilised/reviewed. Once > that is done, we can take a call

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Thu, Jan 22, 2015 at 10:44 AM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > > On 21-01-2015 PM 09:43, Amit Kapila wrote: > > On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote > > wrote: > >> On Wednesday, January 21, 2015, Amit Kapila > > wrote: > >>> > >>> > >>> Does it happen only when

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Langote
On 21-01-2015 PM 09:43, Amit Kapila wrote: > On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote > wrote: >> On Wednesday, January 21, 2015, Amit Kapila > wrote: >>> >>> >>> Does it happen only when parallel_seqscan_degree > max_worker_processes? >> >> >> I have max_worker_processes set to the default

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Thu, Jan 22, 2015 at 6:37 AM, Kouhei Kaigai wrote: > > (Please point out me if my understanding is incorrect.) > > What happen if dynamic background worker process tries to reference temporary > tables? Because buffer of temporary table blocks are allocated on private > address space, its recen

Re: [HACKERS] Better way of dealing with pgstat wait timeout during buildfarm runs?

2015-01-21 Thread Matt Kelly
> > Sure, but nobody who is not a developer is going to care about that. > A typical user who sees "pgstat wait timeout", or doesn't, isn't going > to be able to make anything at all out of that. As a user, I wholeheartedly disagree. That warning helped me massively in diagnosing an unhealthy da

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2015-01-21 Thread Amit Kapila
On Thu, Jan 22, 2015 at 8:22 AM, Alvaro Herrera wrote: > > Amit Kapila wrote: > > On Wed, Jan 21, 2015 at 8:51 PM, Alvaro Herrera < alvhe...@2ndquadrant.com> > > wrote: > > > > > > I didn't understand the coding in GetQueryResult(); why do we check the > > > result status of the last returned resu

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2015-01-21 Thread Alvaro Herrera
Amit Kapila wrote: > On Wed, Jan 21, 2015 at 8:51 PM, Alvaro Herrera > wrote: > > > > I didn't understand the coding in GetQueryResult(); why do we check the > > result status of the last returned result only? It seems simpler to me > > to check it inside the loop, but maybe there's a reason you

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 8:51 PM, Alvaro Herrera wrote: > > I didn't understand the coding in GetQueryResult(); why do we check the > result status of the last returned result only? It seems simpler to me > to check it inside the loop, but maybe there's a reason you didn't do it > like that? > > A

Re: [HACKERS] Merging postgresql.conf and postgresql.auto.conf

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 9:43 PM, Sawada Masahiko wrote: > > On Wed, Jan 21, 2015 at 3:38 PM, Amit Kapila wrote: > > On Tue, Jan 20, 2015 at 9:38 PM, Robert Haas wrote: > > > > > > The reason why "sourcefile" and "sourceline" are not sufficient is that > > they can only give the information about

Re: [HACKERS] New CF app deployment

2015-01-21 Thread Michael Paquier
On Thu, Jan 22, 2015 at 10:47 AM, Josh Berkus wrote: > Now that I'm back on this side of the Pacific, is there any additional > data entry/cleanup which needs doing? An extra look would be worth it. Magnus or I may have missed patch entries between the old and new apps. My2c. -- Michael -- Sen

Re: [HACKERS] New CF app deployment

2015-01-21 Thread Josh Berkus
Magnus, Now that I'm back on this side of the Pacific, is there any additional data entry/cleanup which needs doing? -- Josh Berkus PostgreSQL Experts Inc. http://pgexperts.com -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://w

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Kouhei Kaigai
> On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote > wrote: > > On Wednesday, January 21, 2015, Amit Kapila > wrote: > >> > >> > >> Does it happen only when parallel_seqscan_degree > max_worker_processes? > > > > > > I have max_worker_processes set to the default of 8 while > parallel_seqscan_degre

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Stephen Frost
* Jim Nasby (jim.na...@bluetreble.com) wrote: > On 1/21/15 5:38 PM, Stephen Frost wrote: > >Being startup-only won't help if the user is a superuser. > > Crap, I thought postgresql.auto.conf was handled as an #include and therefore > you could still preempt it via postgresql.conf It's not just t

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Jim Nasby
On 1/21/15 5:38 PM, Stephen Frost wrote: * Jim Nasby (jim.na...@bluetreble.com) wrote: On 1/20/15 9:01 PM, Stephen Frost wrote: * Jim Nasby (jim.na...@bluetreble.com) wrote: +1. In particular I'm very concerned with the idea of doing this via roles, because that would make it trivial for any

[HACKERS] jsonb, unicode escapes and escaped backslashes

2015-01-21 Thread Andrew Dunstan
The following case has just been brought to my attention (look at the differing number of backslashes): andrew=# select jsonb '"\\u"'; jsonb -- "\u" (1 row) andrew=# select jsonb '"\u"'; jsonb -- "\u" (1 row) andrew=# s

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Stephen Frost
* Jim Nasby (jim.na...@bluetreble.com) wrote: > On 1/20/15 9:01 PM, Stephen Frost wrote: > >* Jim Nasby (jim.na...@bluetreble.com) wrote: > >>>+1. In particular I'm very concerned with the idea of doing this via > >>>roles, because that would make it trivial for any superuser to disable > >>>audi

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Jim Nasby
On 1/20/15 9:01 PM, Stephen Frost wrote: * Jim Nasby (jim.na...@bluetreble.com) wrote: >+1. In particular I'm very concerned with the idea of doing this via roles, because that would make it trivial for any superuser to disable auditing. The only good option I could see to provide this kind of

Re: [HACKERS] Temporal features in PostgreSQL

2015-01-21 Thread Bruce Momjian
On Fri, Jan 16, 2015 at 09:58:22AM -0700, pe...@vanroose.be wrote: > What's the current status of this topic? > Has someone worked on temporal tables for PostgreSQL since 2012 ? > > I'm giving a presentation on Fosdem later this month in Brussels, on the > topic of temporal tables, and would like

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2015-01-21 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> Okay, then. I concede the point: We should support the datum Peter> case as you outline, since it is simpler than any Peter> alternative. It probably won't even be necessary to formalize Peter> the idea that finished abbreviated keys must be pas

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2015-01-21 Thread Peter Geoghegan
On Wed, Jan 21, 2015 at 2:11 PM, Peter Geoghegan wrote: > Okay, then. I concede the point: We should support the datum case as > you outline, since it is simpler than any alternative. It probably > won't even be necessary to formalize the idea that finished > abbreviated keys must be pass-by-value

Re: [HACKERS] proposal: plpgsql - Assert statement

2015-01-21 Thread Jim Nasby
On 1/21/15 3:10 PM, Pavel Stehule wrote: is there some agreement on this behave of ASSERT statement? I would to assign last patch to next commitfest. Possible changes: * I would to simplify a behave of evaluating of message expression - probably I disallow NULL there. Well, the only thing

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2015-01-21 Thread Peter Geoghegan
On Wed, Jan 21, 2015 at 4:44 AM, Andrew Gierth wrote: > Now, I follow this general principle that someone who is not doing the > work should never say "X is easy" to someone who _is_ doing it, unless > they're prepared to at least outline the solution on request or > otherwise contribute. So see

Re: [HACKERS] proposal: plpgsql - Assert statement

2015-01-21 Thread Pavel Stehule
Hi all is there some agreement on this behave of ASSERT statement? I would to assign last patch to next commitfest. Possible changes: * I would to simplify a behave of evaluating of message expression - probably I disallow NULL there. * GUC enable_asserts will be supported * a assert exception

Re: [HACKERS] New CF app: changing email sender

2015-01-21 Thread Magnus Hagander
On Tue, Jan 20, 2015 at 1:44 AM, Kyotaro HORIGUCHI < horiguchi.kyot...@lab.ntt.co.jp> wrote: > Hello, the new app's clean looking gets my favor and the > integrated operation will do good for me:) > > By the way, I got the following notice when I tried to "Add > comment" on the new app. > > "Note!

Re: [HACKERS] proposal: lock_time for pg_stat_database

2015-01-21 Thread Pavel Stehule
Hi 2015-01-16 20:33 GMT+01:00 Jim Nasby : > On 1/16/15 12:30 PM, Pavel Stehule wrote: > >> >> >> 2015-01-16 19:24 GMT+01:00 Pavel Stehule > >: >> >> >> >> 2015-01-16 19:06 GMT+01:00 Jim Nasby > >: >> >> On 1/16/15 11:35

[HACKERS] Windows buildfarm animals are still not happy with abbreviated keys patch

2015-01-21 Thread Peter Geoghegan
Even following Robert's disabling of abbreviated keys on Windows, buildfarm animals hamerkop, brolga, currawong and bowerbird remain unhappy, with failing regression tests for "collate" and sometimes (but not always) "aggregates". Some of these only use the C locale. I think that "aggregates" does

Re: [HACKERS] pg_stat_statements vs escape_string_warning

2015-01-21 Thread Tom Lane
Peter Geoghegan writes: > On Wed, Jan 21, 2015 at 10:14 AM, Tom Lane wrote: >> This isn't a back-patchable bug fix, but given the lack of prior >> complaints, maybe it doesn't matter. Alternatively, we could back-patch >> only the addition of escape_string_warning to the struct: that would fit >

Re: [HACKERS] pg_stat_statements vs escape_string_warning

2015-01-21 Thread Peter Geoghegan
On Wed, Jan 21, 2015 at 10:14 AM, Tom Lane wrote: > What I'm inclined to do about this is add an escape_string_warning bool > field to struct core_yy_extra_type, which would be copied from the GUC > variable by scanner_init(); then check_string_escape_warning() would > consult that field instead o

[HACKERS] pg_stat_statements vs escape_string_warning

2015-01-21 Thread Tom Lane
I happened to notice that if you run the regression tests with pg_stat_statements installed, you will often (not always) get a failure that looks like this: *** src/test/regress/expected/plpgsql.out Tue Jan 20 12:01:52 2015 --- src/test/regress/results/plpgsql.out Wed Jan 21 12:43:19 2015

Re: [HACKERS] moving from contrib to bin

2015-01-21 Thread Bruce Momjian
On Sat, Jan 17, 2015 at 02:08:34PM +0100, Andres Freund wrote: > 7) Are we sure that the authors in the affected contrib modules are ok >with their authorship notice being removed? I don't think Ants, Bruce >or Simon have a problem with that, but ... I am fine. It means others can be blam

Re: [HACKERS] moving from contrib to bin

2015-01-21 Thread Bruce Momjian
On Sat, Jan 17, 2015 at 01:16:18PM +0100, Andres Freund wrote: > Hi, > > FWIW, I find it rather annoying if people attach patchsets as > tarballs. That makes it impossible to look at them in the mailreader > since I really don't have anything reasonable to go on to teach it to > treat it as a set

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Arne Scheffer
Andrew Dunstan schrieb am 2015-01-21: > On 01/21/2015 11:21 AM, Arne Scheffer wrote: > >Why is it a bad thing to call the column "stddev_samp" analog to the > >aggregate function or make a note in the documentation, that the > >sample stddev is used to compute the solution? > I think you ar

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Arne Scheffer
On Wed, 21 Jan 2015, Andrew Dunstan wrote: On 01/21/2015 09:27 AM, Arne Scheffer wrote: Sorry, corrected second try because of copy&paste mistakes: VlG-Arne Comments appreciated. Definition var_samp = Sum of squared differences /n-1 Definition stddev_samp = sqrt(var_samp) Example N=4 1.) S

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Andrew Dunstan
On 01/21/2015 11:21 AM, Arne Scheffer wrote: Why is it a bad thing to call the column "stddev_samp" analog to the aggregate function or make a note in the documentation, that the sample stddev is used to compute the solution? I think you are making a mountain out of a molehill, frankly. T

Re: [HACKERS] Additional role attributes && superuser review

2015-01-21 Thread Adam Brightwell
All, > > I'm slightly mystified as to how including the word "online" helps > here. It's unlikely that there will be an offline_backup permission, > because if the system is off-line, SQL-level permissions are > irrelevant. After re-reading through this thread is seems like EXCLUSIVEBACKUP (pro

Re: [HACKERS] Merging postgresql.conf and postgresql.auto.conf

2015-01-21 Thread Sawada Masahiko
On Wed, Jan 21, 2015 at 3:38 PM, Amit Kapila wrote: > On Tue, Jan 20, 2015 at 9:38 PM, Robert Haas wrote: > > Okay and I was also not in favour of this approach. > Okay I agree with this. > > The reason why "sourcefile" and "sourceline" are not sufficient is that > they can only give the inform

Re: [HACKERS] TODO : Allow parallel cores to be used by vacuumdb [ WIP ]

2015-01-21 Thread Alvaro Herrera
I didn't understand the coding in GetQueryResult(); why do we check the result status of the last returned result only? It seems simpler to me to check it inside the loop, but maybe there's a reason you didn't do it like that? Also, what is the reason we were ignoring those errors only in "comple

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Andrew Dunstan
On 01/21/2015 09:27 AM, Arne Scheffer wrote: Sorry, corrected second try because of copy&paste mistakes: VlG-Arne Comments appreciated. Definition var_samp = Sum of squared differences /n-1 Definition stddev_samp = sqrt(var_samp) Example N=4 1.) Sum of squared differences 1_4Sum(Xi-XM4)² =

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Arne Scheffer
Sorry, corrected second try because of copy&paste mistakes: VlG-Arne > Comments appreciated. > Definition var_samp = Sum of squared differences /n-1 > Definition stddev_samp = sqrt(var_samp) > Example N=4 > 1.) Sum of squared differences > 1_4Sum(Xi-XM4)² > = > 2.) adding nothing > 1_4Sum(X

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Arne Scheffer
> >>I don't understand. I'm following pretty exactly the calculations > >>stated > >>at ; > >>I'm not a statistician. Perhaps others who are more literate in Maybe I'm mistaken here, but I think, the algorithm is not that complicated. I try to ex

Re: [HACKERS] Add min and max execute statement time in pg_stat_statement

2015-01-21 Thread Arne Scheffer
David G Johnston schrieb am 2015-01-21: > Andrew Dunstan wrote > > On 01/20/2015 01:26 PM, Arne Scheffer wrote: > >> And a very minor aspect: > >> The term "standard deviation" in your code stands for > >> (corrected) sample standard deviation, I think, > >> because you devide by n-1 instead of

Re: [HACKERS] parallel mode and parallel contexts

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 6:35 PM, Robert Haas wrote: > > On Wed, Jan 21, 2015 at 2:11 AM, Amit Kapila wrote: > > On Tue, Jan 20, 2015 at 9:52 PM, Robert Haas wrote: > >> On Tue, Jan 20, 2015 at 9:41 AM, Amit Kapila > >> wrote: > >> > It seems [WaitForBackgroundWorkerShutdown] has possibility to

Re: [HACKERS] parallel mode and parallel contexts

2015-01-21 Thread Robert Haas
On Wed, Jan 21, 2015 at 2:11 AM, Amit Kapila wrote: > On Tue, Jan 20, 2015 at 9:52 PM, Robert Haas wrote: >> On Tue, Jan 20, 2015 at 9:41 AM, Amit Kapila >> wrote: >> > It seems [WaitForBackgroundWorkerShutdown] has possibility to wait >> > forever. >> > Assume one of the worker is not able to s

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2015-01-21 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> Basically, the intersection of the datum sort case with Peter> abbreviated keys seems complicated. Not to me. To me it seems completely trivial. Now, I follow this general principle that someone who is not doing the work should never say "X is e

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote wrote: > On Wednesday, January 21, 2015, Amit Kapila wrote: >> >> >> Does it happen only when parallel_seqscan_degree > max_worker_processes? > > > I have max_worker_processes set to the default of 8 while parallel_seqscan_degree is 4. So, this may b

Re: [HACKERS] Re: [COMMITTERS] pgsql: Disable -faggressive-loop-optimizations in gcc 4.8+ for pre-9.2

2015-01-21 Thread Alvaro Herrera
Bernd Helmle wrote: > > > --On 20. Januar 2015 17:15:01 +0100 Andres Freund > wrote: > > >I personally think that being able to at least compile/make check old > >versions a bit longer is a good idea. > > +1 from me for this idea. Already done yesterday :-) Thanks, -- Álvaro Herrera

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Stephen Frost
* Abhijit Menon-Sen (a...@2ndquadrant.com) wrote: > At 2015-01-20 21:47:02 -0500, sfr...@snowman.net wrote: > > Review the opening of this email though and consider that we could > > look at "what privileges has the audit role granted to the current > > role?" as defining what is to be audited. >

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Langote
On Wednesday, January 21, 2015, Amit Kapila wrote: > On Wed, Jan 21, 2015 at 12:47 PM, Amit Langote < > langote_amit...@lab.ntt.co.jp > > wrote: > > > > On 20-01-2015 PM 11:29, Amit Kapila wrote: > > > Note - I have yet to handle the new node types introduced at some > > > of the places and need

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 12:47 PM, Amit Langote < langote_amit...@lab.ntt.co.jp> wrote: > > On 20-01-2015 PM 11:29, Amit Kapila wrote: > > Note - I have yet to handle the new node types introduced at some > > of the places and need to verify prepared queries and some other > > things, however I thin

Re: Partitioning: issues/ideas (Was: Re: [HACKERS] On partitioning)

2015-01-21 Thread Amit Langote
On 21-01-2015 AM 01:42, Robert Haas wrote: > On Mon, Jan 19, 2015 at 8:48 PM, Amit Langote > wrote: Specifically, do we regard a partitions as pg_inherits children of its partitioning parent? >>> >>> I don't think this is totally an all-or-nothing decision. I think >>> everyone is agree

Re: [HACKERS] Re: [COMMITTERS] pgsql: Disable -faggressive-loop-optimizations in gcc 4.8+ for pre-9.2

2015-01-21 Thread Bernd Helmle
--On 20. Januar 2015 17:15:01 +0100 Andres Freund wrote: I personally think that being able to at least compile/make check old versions a bit longer is a good idea. +1 from me for this idea. -- Thanks Bernd -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)

Re: [HACKERS] Dereferenced pointers checked as NULL in btree_utils_var.c

2015-01-21 Thread Heikki Linnakangas
On 01/21/2015 07:14 AM, Michael Paquier wrote: Also, looking at the code of gist, gbt_var_same is called through gistKeyIsEQ, which is used for an insertion or for a split. The point is that when doing an insertion, a call to gistgetadjusted is done and we look if one of the keys is NULL. If one

Re: [HACKERS] B-Tree support function number 3 (strxfrm() optimization)

2015-01-21 Thread Andrew Gierth
> "Peter" == Peter Geoghegan writes: Peter> You'll probably prefer the attached. This patch works by Peter> disabling abbreviation, but only after writing out runs, with Peter> the final merge left to go. That way, it doesn't matter when Peter> abbreviated keys are not read back from disk

Re: [HACKERS] Error check always bypassed in tablefunc.c

2015-01-21 Thread Michael Paquier
On Tue, Jan 20, 2015 at 4:05 PM, Michael Paquier wrote: > On Tue, Jan 20, 2015 at 8:47 AM, Michael Paquier > wrote: >> On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway wrote: >>> -BEGIN PGP SIGNED MESSAGE- >>> Hash: SHA1 >>> >>> On 01/19/2015 08:16 AM, Alvaro Herrera wrote: Haven't look

Re: [HACKERS] pgaudit - an auditing extension for PostgreSQL

2015-01-21 Thread Abhijit Menon-Sen
[After a discussion on IRC with Stephen…] At 2015-01-20 21:47:02 -0500, sfr...@snowman.net wrote: > > Review the opening of this email though and consider that we could > look at "what privileges has the audit role granted to the current > role?" as defining what is to be audited. Right, I unders

Re: [HACKERS] PATCH: decreasing memory needlessly consumed by array_agg

2015-01-21 Thread Jeff Davis
On Tue, 2015-01-20 at 23:37 +0100, Tomas Vondra wrote: > Tom's message where he points that out is here: > http://www.postgresql.org/message-id/20707.1396372...@sss.pgh.pa.us That message also says: "I think a patch that stood a chance of getting committed would need to detect whether the aggrega