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

2015-01-20 Thread Michael Paquier
Hi all, Coverity is pointing out $subject, with the following stuff in gbt_var_same(): GBT_VARKEY *t1 = (GBT_VARKEY *) DatumGetPointer(d1); GBT_VARKEY *t2 = (GBT_VARKEY *) DatumGetPointer(d2); GBT_VARKEY_R r1, r2; r1 =

Re: [HACKERS] Async execution of postgres_fdw.

2015-01-20 Thread Kyotaro HORIGUCHI
Hello, thank you for the comment. I added experimental adaptive fetch size feature in this v6 patch. At Tue, 20 Jan 2015 04:51:13 +, Matt Kelly mkell...@gmail.com wrote in ca+kcukhluo+vaj4xr8gvsof_nw79udztdyhosdt13cfjkae...@mail.gmail.com I think its telling that varying the fetch size

Re: [HACKERS] PATCH: Reducing lock strength of trigger and foreign key DDL

2015-01-20 Thread Noah Misch
On Fri, Jan 16, 2015 at 04:59:56PM +0100, Andres Freund wrote: On 2015-01-16 15:16:20 +0100, Andreas Karlsson wrote: For this reason I opted to only lower the lock levels of ADD and ALTER TRIGGER, and not DROP TRIGGER. Neither of those require MVCC of then WHEN clause. I'm unconvinced

Re: [HACKERS] documentation update for doc/src/sgml/func.sgml

2015-01-20 Thread Fabien COELHO
I had a look at this patch. This patch adds some text below a table of functions. Immediately above that table, there is this existing language: The functions working with typedouble precision/type data are mostly implemented on top of the host system's C library; accuracy and behavior

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

2015-01-20 Thread Andrew Gierth
Kyotaro == Kyotaro HORIGUCHI horiguchi.kyot...@lab.ntt.co.jp writes: Kyotaro Hmm. The mail address indeed *was* mine but is now obsolete, Kyotaro so that the email might bounce. But I haven't find how to Kyotaro change it within the app itself, and the PostgreSQL community Kyotaro account

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

2015-01-20 Thread Ali Akbar
2015-01-20 18:17 GMT+07:00 Ali Akbar the.ap...@gmail.com: 2015-01-20 14:22 GMT+07:00 Jeff Davis pg...@j-davis.com: The current patch, which I am evaluating for commit, does away with per-group memory contexts (it uses a common context for all groups), and reduces the initial array allocation

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

2015-01-20 Thread Andrew Gierth
Robert == Robert Haas robertmh...@gmail.com writes: Robert All right, it seems Tom is with you on that point, so after Robert some study, I've committed this with very minor modifications. This caught my eye (thanks to conflict with GS patch): * In the future, we should consider forcing the

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

2015-01-20 Thread Ali Akbar
2015-01-20 14:22 GMT+07:00 Jeff Davis pg...@j-davis.com: The current patch, which I am evaluating for commit, does away with per-group memory contexts (it uses a common context for all groups), and reduces the initial array allocation from 64 to 8 (but preserves doubling behavior). Jeff

Re: [HACKERS] Bug in pg_dump

2015-01-20 Thread Gilles Darold
Le 19/01/2015 14:41, Robert Haas a écrit : On Thu, Jan 15, 2015 at 6:26 AM, Gilles Darold gilles.dar...@dalibo.com wrote: I attach a patch that solves the issue in pg_dump, let me know if it might be included in Commit Fest or if the three other solutions are a better choice. I think a fix

Re: [HACKERS] parallel mode and parallel contexts

2015-01-20 Thread Amit Kapila
On Sat, Jan 17, 2015 at 3:40 AM, Robert Haas robertmh...@gmail.com wrote: New patch attached. I'm going to take the risk of calling this v1 (previous versions have been 0.x), since I've now done something about the heavyweight locking issue, as well as fixed the message-looping bug Amit

Re: [HACKERS] New CF app deployment

2015-01-20 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: On Tue, Jan 20, 2015 at 4:31 PM, Andres Freund and...@2ndquadrant.com wrote: I think you misunderstood me ;). I was talking about the old CF application providing a RSS feed of all changes to all entries.

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Amit Kapila
On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Jan 12, 2015 at 3:25 AM, Robert Haas robertmh...@gmail.com wrote: Yeah, you need two separate global variables pointing to shm_mq objects, one of which gets used by pqmq.c for errors and the other of which

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

2015-01-20 Thread Tom Lane
Michael Paquier michael.paqu...@gmail.com writes: Coverity is pointing out $subject, with the following stuff in gbt_var_same(): ... As Heikki pointed me out on IM, the lack of crash report in this area, as well as similar coding style in cube/ seem to be sufficient arguments to simply remove

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

2015-01-20 Thread Tom Lane
Jeff Davis pg...@j-davis.com writes: Tom (tgl), Is my reasoning above acceptable? Uh, sorry, I've not been paying any attention to this thread for awhile. What's the remaining questions at issue? regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] New CF app deployment

2015-01-20 Thread Magnus Hagander
On Tue, Jan 20, 2015 at 3:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: On Tue, Jan 20, 2015 at 4:31 PM, Andres Freund and...@2ndquadrant.com wrote: I think you misunderstood me ;). I was talking about the old CF application providing a RSS

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

2015-01-20 Thread Tomas Vondra
Hi, On 20.1.2015 12:23, Ali Akbar wrote: 2015-01-20 18:17 GMT+07:00 Ali Akbar the.ap...@gmail.com Sorry, there is another comment of makeMdArrayResult, i suggest also changing it like this: @@ -4738,6 +4764,12 @@ makeArrayResult(ArrayBuildState *astate, * beware: no check that specified

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 10:30 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Disable -faggressive-loop-optimizations in gcc 4.8+ for pre-9.2 branches. With this optimization flag enabled, recent versions of gcc can generate incorrect code that assumes variable-length arrays

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

2015-01-20 Thread Robert Haas
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 everyone is agreed that we need to not break things

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Amit Kapila
On Tue, Jan 20, 2015 at 9:43 PM, Thom Brown t...@linux.com wrote: On 20 January 2015 at 14:29, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Jan 12, 2015 at 3:25 AM, Robert Haas robertmh...@gmail.com wrote:

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Thom Brown
On 20 January 2015 at 16:55, Amit Kapila amit.kapil...@gmail.com wrote: On Tue, Jan 20, 2015 at 9:43 PM, Thom Brown t...@linux.com wrote: On 20 January 2015 at 14:29, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila amit.kapil...@gmail.com wrote:

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Thom Brown
On 20 January 2015 at 14:29, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Jan 12, 2015 at 3:25 AM, Robert Haas robertmh...@gmail.com wrote: Yeah, you need two separate global variables pointing to shm_mq

Re: [HACKERS] proposal: searching in array function - array_position

2015-01-20 Thread Pavel Stehule
Hi I am sending updated version - it allow third optional argument that specify where searching should to start. With it is possible repeatably call this function. Regards Pavel 2015-01-17 23:43 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com: Hi here is a proof concept of array_offset

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

2015-01-20 Thread Alvaro Herrera
Robert Haas wrote: Would anybody object to me pushing this commit to branches 8.2 and 8.3? Since those branches are out of support, I am not sure what the point is. If we want people to be able to use those branches reasonably we need to back-port fixes for critical security and stability

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

2015-01-20 Thread Robert Haas
On Mon, Jan 19, 2015 at 10:39 PM, Amit Kapila amit.kapil...@gmail.com wrote: I think whichever process reads postgresql.conf/postgresql.auto.conf have to do this (unless we restrict that this will be done at some other time) and postmaster is one of them. It seems to me that it is not good

Re: [HACKERS] parallel mode and parallel contexts

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 9:41 AM, Amit Kapila amit.kapil...@gmail.com wrote: It seems [WaitForBackgroundWorkerShutdown] has possibility to wait forever. Assume one of the worker is not able to start (not able to attach to shared memory or some other reason), then status returned by

[HACKERS] basebackups during ALTER DATABASE ... SET TABLESPACE ... not safe?

2015-01-20 Thread Andres Freund
Hi, I'm analyzing a problem in which a customer had a pg_basebackup (from standby) created 9.2 cluster that failed with WAL contains references to invalid pages. The failed record was a xlog redo visible i.e. XLOG_HEAP2_VISIBLE. First I thought there might be another bug along the line of

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

2015-01-20 Thread Robert Haas
On Mon, Jan 19, 2015 at 9:29 PM, Peter Geoghegan p...@heroku.com wrote: I think that the attached patch should at least fix that much. Maybe the problem on the other animal is also explained by the lack of this, since there could also be a MinGW-ish strxfrm_l(), I suppose. Committed that,

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

2015-01-20 Thread Tomas Vondra
On 25.12.2014 22:28, Tomas Vondra wrote: On 25.12.2014 21:14, Andres Freund wrote: That's indeed odd. Seems to have been lost when the statsfile was split into multiple files. Alvaro, Tomas? The goal was to keep the logic as close to the original as possible. IIRC there were pgstat wait

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Thom Brown
On 20 January 2015 at 14:29, Amit Kapila amit.kapil...@gmail.com wrote: On Thu, Jan 15, 2015 at 6:57 PM, Amit Kapila amit.kapil...@gmail.com wrote: On Mon, Jan 12, 2015 at 3:25 AM, Robert Haas robertmh...@gmail.com wrote: Yeah, you need two separate global variables pointing to shm_mq

Re: [HACKERS] Inaccuracy in VACUUM's tuple count estimates

2015-01-20 Thread Robert Haas
On Mon, Jan 19, 2015 at 10:53 PM, tim_wilson tim.wil...@telogis.com wrote: Was slightly optimistic that this comment in the release notes might mean that my bug with bloat on hot tables might have been fixed in 9.4 /Make VACUUM properly report dead but not-yet-removable rows to the statistics

Re: [HACKERS] New CF app deployment

2015-01-20 Thread Pavel Stehule
2015-01-20 19:16 GMT+01:00 Pavel Stehule pavel.steh...@gmail.com: Hi I cannot to set my name as author for patch: https://commitfest.postgresql.org/4/112/ It is solved now - I don't understand a autocomplete in first moment All works well Regards Pavel Regards Pavel 2015-01-13

Re: [HACKERS] Reducing buildfarm disk usage: remove temp installs when done

2015-01-20 Thread Andrew Dunstan
On 01/19/2015 09:53 AM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: But I'm wondering if we should look at using the tricks git-new-workdir uses, setting up symlinks instead of a full clone. Then we'd have one clone with a bunch of different work dirs. That plus a but of

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

2015-01-20 Thread Alvaro Herrera
Tom Lane wrote: Disable -faggressive-loop-optimizations in gcc 4.8+ for pre-9.2 branches. With this optimization flag enabled, recent versions of gcc can generate incorrect code that assumes variable-length arrays (such as oidvector) are actually fixed-length because they're embedded in some

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

2015-01-20 Thread Andres Freund
On 2015-01-20 11:10:53 -0500, Robert Haas wrote: On Tue, Jan 20, 2015 at 10:30 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Tom Lane wrote: Disable -faggressive-loop-optimizations in gcc 4.8+ for pre-9.2 branches. With this optimization flag enabled, recent versions of gcc can

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 11:18 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Robert Haas wrote: Would anybody object to me pushing this commit to branches 8.2 and 8.3? Since those branches are out of support, I am not sure what the point is. If we want people to be able to use those

Re: [HACKERS] New CF app deployment

2015-01-20 Thread Pavel Stehule
Hi I cannot to set my name as author for patch: https://commitfest.postgresql.org/4/112/ Regards Pavel 2015-01-13 6:35 GMT+01:00 Magnus Hagander mag...@hagander.net: Hi! Last I said something about the new CF app I said I was planning to deploy it over the holidays, and that clearly did

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

2015-01-20 Thread Jeff Davis
On Tue, Jan 20, 2015 at 6:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: Tom (tgl), Is my reasoning above acceptable? Uh, sorry, I've not been paying any attention to this thread for awhile. What's the remaining questions at issue? This patch is trying to

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 1:05 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: So when I'm trying to decide what to audit, I have to: (a) check if the current user is mentioned in .roles; if so, audit. (b) check if the current user is a descendant of one of the roles

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

2015-01-20 Thread Jim Nasby
On 1/16/15 10:32 PM, David G Johnston wrote: One thought I have in this line is that currently there doesn't seem to be a way to know if the setting has an entry both in postgresql.conf and postgresql.auto.conf, if we can have some way of knowing the same (pg_settings?), then it could be

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

2015-01-20 Thread David Johnston
On Tue, Jan 20, 2015 at 1:24 PM, Jim Nasby jim.na...@bluetreble.com wrote: On 1/16/15 10:32 PM, David G Johnston wrote: Two changes solve this problem in what seems to be a clean way. 1) Upon each parsing of postgresql.conf we store all assigned variables somewhere Parsing is relatively

Re: [HACKERS] logical column ordering

2015-01-20 Thread Alvaro Herrera
I've decided to abandon this patch. I have spent too much time looking at it now. If anyone is interested in trying to study, I can provide the patches I came up with, explanations, and references to prior discussion -- feel free to ask. My main motivation for this work is to enable a later

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

2015-01-20 Thread Tomas Vondra
Hi, On 20.1.2015 21:13, Jeff Davis wrote: On Tue, Jan 20, 2015 at 6:44 AM, Tom Lane t...@sss.pgh.pa.us wrote: Jeff Davis pg...@j-davis.com writes: Tom (tgl), Is my reasoning above acceptable? Uh, sorry, I've not been paying any attention to this thread for awhile. What's the remaining

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 3:34 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 3:34 PM, Robert Haas robertmh...@gmail.com wrote: Dear me. Peter, can you fix this RSN? Investigating. It's certainly possible to fix Andrew's test case with the attached. I'm not sure that that's

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

2015-01-20 Thread Tomas Vondra
On 21.1.2015 00:38, Michael Paquier wrote: On Wed, Jan 21, 2015 at 1:08 AM, Tomas Vondra I've tried to reproduce this on my Raspberry PI 'machine' and it's not very difficult to trigger this. About 7 out of 10 'make check' runs fail because of 'pgstat wait timeout'. All the occurences I've

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 6:27 PM, Andrew Gierth and...@tao11.riddles.org.uk wrote: Robert == Robert Haas robertmh...@gmail.com writes: Robert All right, it seems Tom is with you on that point, so after Robert some study, I've committed this with very minor modifications. While hacking up a

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 3:46 AM, Andrew Gierth and...@tao11.riddles.org.uk wrote: The comment in tuplesort_begin_datum that abbreviation can't be used seems wrong to me; why is the copy of the original value pointed to by stup-tuple (in the case of by-reference types, and abbreviation is

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

2015-01-20 Thread Andrew Dunstan
On 01/20/2015 01:26 PM, Arne Scheffer wrote: Interesting patch. I did a quick review looking only into the patch file. The sum of variances variable contains the sum of squared differences instead, I think. Umm, no. It's not. e-counters.sum_var_time += (total_time - old_mean) *

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

2015-01-20 Thread Andrew Gierth
Robert == Robert Haas robertmh...@gmail.com writes: Robert All right, it seems Tom is with you on that point, so after Robert some study, I've committed this with very minor modifications. While hacking up a patch to demonstrate the simplicity of extending this to the Datum sorter, I seem to

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

2015-01-20 Thread Michael Paquier
On Wed, Jan 21, 2015 at 1:08 AM, Tomas Vondra tomas.von...@2ndquadrant.com wrote: On 25.12.2014 22:28, Tomas Vondra wrote: On 25.12.2014 21:14, Andres Freund wrote: That's indeed odd. Seems to have been lost when the statsfile was split into multiple files. Alvaro, Tomas? The goal was to

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 2:00 PM, Peter Geoghegan p...@heroku.com wrote: Maybe that's the wrong way of fixing that, but for now I don't think it's acceptable that abbreviation isn't always used in certain cases where it could make sense (e.g. not for simple GroupAggregates with a single

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 3:34 PM, Robert Haas robertmh...@gmail.com wrote: Dear me. Peter, can you fix this RSN? Investigating. -- Peter Geoghegan -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 3:33 PM, Robert Haas robertmh...@gmail.com wrote: Peter, this made bowerbird (Windows 8/Visual Studio) build, but it's failing make check. Ditto hamerkop (Windows 2k8/VC++) and currawong (Windows XP Pro/MSVC++). jacana (Windows 8/gcc) and brolga (Windows XP

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

2015-01-20 Thread Andrew Dunstan
On 01/20/2015 06:32 PM, David G Johnston wrote: 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] B-Tree support function number 3 (strxfrm() optimization)

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 3:57 PM, Peter Geoghegan p...@heroku.com wrote: It's certainly possible to fix Andrew's test case with the attached. I'm not sure that that's the appropriate fix, though: there is probably a case to be made for not bothering with abbreviation once we've read tuples in

Re: [HACKERS] New CF app deployment

2015-01-20 Thread Magnus Hagander
On Tue, Jan 20, 2015 at 3:43 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: On Tue, Jan 20, 2015 at 4:31 PM, Andres Freund and...@2ndquadrant.com wrote: I think you misunderstood me ;). I was talking about the old CF application providing a RSS

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 10:54 AM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 19, 2015 at 9:29 PM, Peter Geoghegan p...@heroku.com wrote: I think that the attached patch should at least fix that much. Maybe the problem on the other animal is also explained by the lack of this, since

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

2015-01-20 Thread David G Johnston
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 estimator unbiased. How about mentioning the

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 5:32 PM, Robert Haas robertmh...@gmail.com wrote: I was assuming we were going to fix this by undoing the abbreviation (as in the abort case) when we spill to disk, and not bothering with it thereafter. The spill-to-disk case is at least as compelling at the internal

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

2015-01-20 Thread Stephen Frost
* Robert Haas (robertmh...@gmail.com) wrote: On Tue, Jan 20, 2015 at 1:05 AM, Abhijit Menon-Sen a...@2ndquadrant.com wrote: So when I'm trying to decide what to audit, I have to: (a) check if the current user is mentioned in .roles; if so, audit. (b) check if the current user

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 9:33 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 6:30 PM, Robert Haas robertmh...@gmail.com wrote: I don't want to change the on-disk format for tapes without a lot more discussion. Can you come up with a fix that avoids that for now? A more

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 5:03 PM, 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 flexibility

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 8:39 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 5:32 PM, Robert Haas robertmh...@gmail.com wrote: I was assuming we were going to fix this by undoing the abbreviation (as in the abort case) when we spill to disk, and not bothering with it

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 4:07 PM, David Johnston david.g.johns...@gmail.com wrote: sourceline and sourcefile pertain only to the current value while the point of adding these other pieces is to provide a snapshot of all the different mappings that the system knows about; instead of having to

Re: [HACKERS] WITH CHECK and Column-Level Privileges

2015-01-20 Thread Stephen Frost
* Noah Misch (n...@leadboat.com) wrote: On Mon, Jan 19, 2015 at 11:05:22AM -0500, Stephen Frost wrote: One remaining question is about single-column key violations. Should we special-case those and allow them to be shown or no? I can't see a reason not to currently but I wonder if we

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 6:30 PM, Robert Haas robertmh...@gmail.com wrote: I don't want to change the on-disk format for tapes without a lot more discussion. Can you come up with a fix that avoids that for now? A more conservative approach would be to perform conversion on-the-fly once more.

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

2015-01-20 Thread Stephen Frost
Abhijit, * Abhijit Menon-Sen (a...@2ndquadrant.com) wrote: At 2015-01-19 08:26:59 -0500, sfr...@snowman.net wrote: I'm confused by this statement.. Let me see if I've understood your clarification: Thanks much for the example use-case and for working this through with me. I actually think

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 7:07 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 3:57 PM, Peter Geoghegan p...@heroku.com wrote: It's certainly possible to fix Andrew's test case with the attached. I'm not sure that that's the appropriate fix, though: there is probably a case to

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

2015-01-20 Thread Arne Scheffer
Andrew Dunstan schrieb am 2015-01-20: On 01/20/2015 01:26 PM, Arne Scheffer wrote: Interesting patch. I did a quick review looking only into the patch file. The sum of variances variable contains the sum of squared differences instead, I think. Umm, no. It's not. Umm, yes, i think, it

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

2015-01-20 Thread Stephen Frost
Jim, * 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 flexibility would be allowing

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Amit Kapila
On Tue, Jan 20, 2015 at 10:59 PM, Thom Brown t...@linux.com wrote: On 20 January 2015 at 14:29, Amit Kapila amit.kapil...@gmail.com 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

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

2015-01-20 Thread David Johnston
On Tue, Jan 20, 2015 at 8:46 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 20, 2015 at 4:07 PM, David Johnston david.g.johns...@gmail.com wrote: sourceline and sourcefile pertain only to the current value while the point of adding these other pieces is to provide a snapshot of

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

2015-01-20 Thread Amit Kapila
On Tue, Jan 20, 2015 at 9:38 PM, Robert Haas robertmh...@gmail.com wrote: On Mon, Jan 19, 2015 at 10:39 PM, Amit Kapila amit.kapil...@gmail.com wrote: I think whichever process reads postgresql.conf/postgresql.auto.conf have to do this (unless we restrict that this will be done at some other

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

2015-01-20 Thread Jim Nasby
On 1/20/15 2:20 PM, Robert Haas wrote: On Tue, Jan 20, 2015 at 1:05 AM, Abhijit Menon-Sena...@2ndquadrant.com wrote: So when I'm trying to decide what to audit, I have to: (a) check if the current user is mentioned in .roles; if so, audit. (b) check if the current user is a

Re: [HACKERS] proposal: searching in array function - array_position

2015-01-20 Thread Pavel Stehule
2015-01-20 21:32 GMT+01:00 Jim Nasby jim.na...@bluetreble.com: On 1/20/15 11:12 AM, Pavel Stehule wrote: I am sending updated version - it allow third optional argument that specify where searching should to start. With it is possible repeatably call this function. What happened to

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 6:39 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 6:34 PM, Robert Haas robertmh...@gmail.com wrote: That might be OK. Probably needs a bit of performance testing to see how it looks. Well, we're still only doing it when we do our final merge. So

Re: [HACKERS] Async execution of postgres_fdw.

2015-01-20 Thread Matt Kelly
I'm trying to compare v5 and v6 in my laptop right now. Apparently my laptop is quite a bit faster than your machine because the tests complete in roughly 3.3 seconds. I added more data and didn't see anything other than noise. (Then again the queries were dominated by the disk sort so I should

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

2015-01-20 Thread Abhijit Menon-Sen
At 2015-01-20 20:36:39 -0500, robertmh...@gmail.com wrote: I think this is throwing the baby out with the bathwater. Neither C functions nor all-or-nothing are going to be of any practical use. Do you see some approach that has a realistic chance of making 9.5 and would also actually be worth

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 5:42 PM, Robert Haas robertmh...@gmail.com wrote: On Tue, Jan 20, 2015 at 8:39 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 5:32 PM, Robert Haas robertmh...@gmail.com wrote: I was assuming we were going to fix this by undoing the abbreviation (as

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 5:46 PM, Peter Geoghegan p...@heroku.com wrote: Would you prefer it if the spill-to-disk case aborted in the style of low entropy keys? That doesn't seem significantly safer than this, and it certainly not acceptable from a performance perspective. BTW, I can write

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

2015-01-20 Thread Robert Haas
On Tue, Jan 20, 2015 at 8:39 PM, Peter Geoghegan p...@heroku.com wrote: On Tue, Jan 20, 2015 at 5:32 PM, Robert Haas robertmh...@gmail.com wrote: I was assuming we were going to fix this by undoing the abbreviation (as in the abort case) when we spill to disk, and not bothering with it

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

2015-01-20 Thread Peter Geoghegan
On Tue, Jan 20, 2015 at 6:34 PM, Robert Haas robertmh...@gmail.com wrote: That might be OK. Probably needs a bit of performance testing to see how it looks. Well, we're still only doing it when we do our final merge. So that's only doubling the number of conversions required, which if we're

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

2015-01-20 Thread Michael Paquier
On Tue, Jan 20, 2015 at 11:38 PM, Tom Lane t...@sss.pgh.pa.us wrote: Michael Paquier michael.paqu...@gmail.com writes: Coverity is pointing out $subject, with the following stuff in gbt_var_same(): ... As Heikki pointed me out on IM, the lack of crash report in this area, as well as similar

Re: [HACKERS] parallel mode and parallel contexts

2015-01-20 Thread Amit Kapila
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 forever. Assume one of the worker is not able to start (not able to attach

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Amit Langote
On 20-01-2015 PM 11:29, Amit Kapila wrote: I have taken care of integrating the parallel sequence scan with the latest patch posted (parallel-mode-v1.patch) by Robert at below location: http://www.postgresql.org/message-id/ca+tgmozduk4k3xhbxc9vm-82khourezdvqwtfglhwsd2r2a...@mail.gmail.com

Re: [HACKERS] Async execution of postgres_fdw.

2015-01-20 Thread Kyotaro HORIGUCHI
Hello, thank you for looking this but sorry that the last patch was buggy so that adaptive fetch size did not work. The attached is the fixed patch. It apparently improves the performance for the test case shown in the previous mail, in which the average tuple length is about 140 bytes. 21 Jan

Re: [HACKERS] hamerkop is stuck

2015-01-20 Thread Noah Misch
On Mon, Jan 19, 2015 at 10:44:37AM +0900, TAKATSUKA Haruka wrote: On Fri, 16 Jan 2015 03:25:00 -0500 Noah Misch n...@leadboat.com wrote: Buildfarm member hamerkop stopped reporting in after commit f6dc6dd. After commit 8d9cb0b, it resumed reporting in for 9.3 and earlier branches. It is

Re: [HACKERS] proposal: searching in array function - array_position

2015-01-20 Thread Jim Nasby
On 1/20/15 11:12 AM, Pavel Stehule wrote: I am sending updated version - it allow third optional argument that specify where searching should to start. With it is possible repeatably call this function. What happened to returning an array of offsets? I think that would be both easier to use

Re: [HACKERS] Parallel Seq Scan

2015-01-20 Thread Jim Nasby
On 1/19/15 7:20 AM, Robert Haas wrote: Another thing is that I think prefetching is not supported on all platforms (Windows) and for such systems as per above algorithm we need to rely on block-by-block method. Well, I think we should try to set up a test to see if this is hurting us. First,

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

2015-01-20 Thread Arne Scheffer
Interesting patch. I did a quick review looking only into the patch file. The sum of variances variable contains the sum of squared differences instead, I think. And a very minor aspect: The term standard deviation in your code stands for (corrected) sample standard deviation, I think, because