[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] proposal: lock_time for pg_stat_database

2015-01-21 Thread Pavel Stehule
Hi 2015-01-16 20:33 GMT+01:00 Jim Nasby jim.na...@bluetreble.com: On 1/16/15 12:30 PM, Pavel Stehule wrote: 2015-01-16 19:24 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com mailto:pavel.steh...@gmail.com: 2015-01-16 19:06 GMT+01:00 Jim Nasby jim.na...@bluetreble.com

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

Re: [HACKERS] pg_stat_statements vs escape_string_warning

2015-01-21 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Wed, Jan 21, 2015 at 10:14 AM, Tom Lane t...@sss.pgh.pa.us 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

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 t...@sss.pgh.pa.us 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

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 of

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

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 copypaste mistakes: VlG-Arne Comments appreciated. Definition var_samp = Sum of squared differences /n-1 Definition stddev_samp = sqrt(var_samp) Example N=4 1.)

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.

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 are making

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 amit.kapil...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:38 PM, Robert Haas robertmh...@gmail.com 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

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 (proposed

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!: This form

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] 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 that..

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Kouhei Kaigai
On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote amitlangot...@gmail.com wrote: On Wednesday, January 21, 2015, Amit Kapila amit.kapil...@gmail.com wrote: Does it happen only when parallel_seqscan_degree max_worker_processes? I have max_worker_processes set to the default of 8

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 amitlangot...@gmail.com wrote: On Wednesday, January 21, 2015, Amit Kapila amit.kapil...@gmail.com wrote: Does it happen only when parallel_seqscan_degree max_worker_processes? I have

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 what

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Thu, Jan 22, 2015 at 6:37 AM, Kouhei Kaigai kai...@ak.jp.nec.com 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

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 amitlangot...@gmail.com wrote: On Wednesday, January 21, 2015, Amit Kapila amit.kapil...@gmail.com wrote:

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:

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 sawada.m...@gmail.com wrote: On Wed, Jan 21, 2015 at 3:38 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:38 PM, Robert Haas robertmh...@gmail.com wrote: The reason why sourcefile and sourceline are not sufficient

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 alvhe...@2ndquadrant.com 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

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 alvhe...@2ndquadrant.com 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

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

Re: [HACKERS] New CF app deployment

2015-01-21 Thread Michael Paquier
On Thu, Jan 22, 2015 at 10:47 AM, Josh Berkus j...@agliodbs.com 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. --

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. Note that

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: 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 langote_amit...@lab.ntt.co.jp 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

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Langote
On Wednesday, January 21, 2015, Amit Kapila amit.kapil...@gmail.com wrote: On Wed, Jan 21, 2015 at 12:47 PM, Amit Langote langote_amit...@lab.ntt.co.jp javascript:_e(%7B%7D,'cvml','langote_amit...@lab.ntt.co.jp'); wrote: On 20-01-2015 PM 11:29, Amit Kapila wrote: Note - I have yet to

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 and...@2ndquadrant.com 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

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 think it will

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 michael.paqu...@gmail.com wrote: On Tue, Jan 20, 2015 at 8:47 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jan 19, 2015 at 11:06 PM, Joe Conway m...@joeconway.com wrote: -BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On

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 understand

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

2015-01-21 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com 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

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 aggregate

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. Right, I

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 and...@2ndquadrant.com 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

Re: [HACKERS] parallel mode and parallel contexts

2015-01-21 Thread Robert Haas
On Wed, Jan 21, 2015 at 2:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:52 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:41 AM, Amit Kapila amit.kapil...@gmail.com wrote: It seems [WaitForBackgroundWorkerShutdown] has possibility to wait

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

2015-01-21 Thread Andrew Gierth
Peter == Peter Geoghegan p...@heroku.com 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

Re: [HACKERS] Parallel Seq Scan

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 4:31 PM, Amit Langote amitlangot...@gmail.com wrote: On Wednesday, January 21, 2015, Amit Kapila amit.kapil...@gmail.com wrote: Does it happen only when parallel_seqscan_degree max_worker_processes? I have max_worker_processes set to the default of 8 while

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 n to keep the

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 lt;http://www.johndcook.com/blog/standard_deviation/gt; 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 explain it

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 copypaste 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(Xi-XM4)²

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 copypaste 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] parallel mode and parallel contexts

2015-01-21 Thread Amit Kapila
On Wed, Jan 21, 2015 at 6:35 PM, Robert Haas robertmh...@gmail.com wrote: On Wed, Jan 21, 2015 at 2:11 AM, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:52 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:41 AM, Amit Kapila amit.kapil...@gmail.com

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