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

2014-01-26 Thread Simon Riggs
On 21 January 2014 19:48, Simon Riggs si...@2ndquadrant.com wrote: On 21 January 2014 12:54, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: Rebased patch is attached. Does this fix the Windows bug reported by Kumar on 20/11/2013 ? Please respond. -- Simon Riggs

Re: [HACKERS] patch: option --if-exists for pg_dump

2014-01-26 Thread Pavel Stehule
Hello Second update - I reduced patch by removing not necessary changes. Attached tests and Makefile Now --if-exists option is fully consistent with -c option With some free time I plan to enhance test script about more object types - now It contains almost all usual types. Regards Pavel

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

2014-01-26 Thread Mitsumasa KONDO
2014-01-26 Simon Riggs si...@2ndquadrant.com On 21 January 2014 19:48, Simon Riggs si...@2ndquadrant.com wrote: On 21 January 2014 12:54, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: Rebased patch is attached. Does this fix the Windows bug reported by Kumar on 20/11/2013 ?

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

2014-01-26 Thread Simon Riggs
On 23 January 2014 12:43, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: I tested my patch in pgbench, but I cannot find bottleneck of my latest patch. ... Attached is latest developping patch. It hasn't been test much yet, but sqrt caluclation may be faster. Thank you for reworking

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 15 January 2014 00:34, Marko Tiikkaja ma...@joh.to wrote: Hi all! It's me again, trying to find a solution to the most common mistakes I make. This time it's accidental shadowing of variables, especially input variables. I've wasted several hours banging my head against the wall while

Re: [HACKERS] [COMMITTERS] pgsql: libpq: Support TLS versions beyond TLSv1.

2014-01-26 Thread Craig Ringer
On 01/26/2014 10:13 AM, Alvaro Herrera wrote: Stephen Frost escribió: * Noah Misch (n...@leadboat.com) wrote: +1. If you can upgrade to 9.4, you can also bring your TLS protocol out of the iron age. Agreed- this was going to be my 2c. Anyone w/ an SSL library that old isn't likely to be

Re: [HACKERS] Visual Studio 2013 build

2014-01-26 Thread Magnus Hagander
On Sun, Jan 26, 2014 at 1:13 AM, Andrew Dunstan and...@dunslane.net wrote: On 12/02/2013 05:12 PM, Brar Piening wrote: Hackers, the attached patch enables Microsoft Visual Studio 2013 as additional build environment. After some tweaking (VS now has got its own rint and a few macro

Re: [HACKERS] alternative back-end block formats

2014-01-26 Thread Craig Ringer
On 01/21/2014 07:43 PM, Christian Convey wrote: Hi all, I'm playing around with Postgres, and I thought it might be fun to experiment with alternative formats for relation blocks, to see if I can get smaller files and/or faster server performance. It's not clear how you'd do this without

Re: [HACKERS] Standalone synchronous master

2014-01-26 Thread Hannu Krosing
On 01/24/2014 10:29 PM, Josh Berkus wrote: On 01/24/2014 12:47 PM, Heikki Linnakangas wrote: ISTM the consensus is that we need better monitoring/administration interfaces so that people can script the behavior they want in external tools. Also, a new synchronous apply replication mode would

Re: [HACKERS] GIN improvements part2: fast scan

2014-01-26 Thread Andres Freund
On 2014-01-26 07:24:58 +0100, Tomas Vondra wrote: Not sure how to interpret that, though. For example where did the ginCompareItemPointers go? I suspect it's thanks to inlining, and that it might be related to the performance decrease. Or maybe not. Try recompiling with

Re: [HACKERS] Freezing without write I/O

2014-01-26 Thread Andres Freund
On 2014-01-25 20:26:16 -0800, Peter Geoghegan wrote: Shouldn't this patch be in the January commitfest? I think we previously concluded that there wasn't much chance to get this into 9.4 and there's significant work to be done on the patch before new reviews are required, so not submitting it

Re: [HACKERS] INTERVAL overflow detection is terribly broken

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 03:50 , Bruce Momjian br...@momjian.us wrote: Patch attached. + if ((float)tm-tm_year * MONTHS_PER_YEAR + tm-tm_mon INT_MAX) + return -1; Is this bullet-proof? If float and int are both 32-bit, the float's mantissa will be less than 32-bit (24 or so, I

[HACKERS] effective_cache_size calculation overflow

2014-01-26 Thread Magnus Hagander
To test something unrelated, I set my shared_buffers to 7TB on my laptop today (no, unfortunately I don't have that much RAM). That leads to the startup error: FATAL: -536870912 is outside the valid range for parameter effective_cache_size (-1 .. 2147483647) So clearly there is an overflow

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 10:19 , Simon Riggs si...@2ndquadrant.com wrote: Also, having plpgsql.warnings_as_errors = off (default) | on makes sense and should be included in 9.4 I still think this is a bad idea, for the same reasons I don't like consistent_into (discussed in a separate thread). But

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
2014-01-26 Florian Pflug f...@phlo.org On Jan26, 2014, at 10:19 , Simon Riggs si...@2ndquadrant.com wrote: Also, having plpgsql.warnings_as_errors = off (default) | on makes sense and should be included in 9.4 I still think this is a bad idea, for the same reasons I don't like

Re: [HACKERS] GIN improvements part2: fast scan

2014-01-26 Thread Heikki Linnakangas
On 01/26/2014 08:24 AM, Tomas Vondra wrote: Hi! On 25.1.2014 22:21, Heikki Linnakangas wrote: Attached is a new version of the patch set, with those bugs fixed. I've done a bunch of tests with all the 4 patches applied, and it seems to work now. I've done tests with various conditions

[HACKERS] running make check with only specified tests

2014-01-26 Thread Andrew Dunstan
I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe which I have called check-with for want of a better name. And with it I can do: $ make check-with TESTS=json

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Pavel Stehule
2014-01-26 Andrew Dunstan and...@dunslane.net I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe which I have called check-with for want of a better name. And with it

Re: [HACKERS] [PATCH] Negative Transition Aggregate Functions (WIP)

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 00:24 , David Rowley dgrowle...@gmail.com wrote: On Sat, Jan 25, 2014 at 3:21 PM, Florian Pflug f...@phlo.org wrote: On Jan24, 2014, at 08:47 , Dean Rasheed dean.a.rash...@gmail.com wrote: The invtrans_minmax patch doesn't contain any patches yet - David, could you provide

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 17:47 , Andrew Dunstan and...@dunslane.net wrote: I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe which I have called check-with for want of a

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Andrew Dunstan
On 01/26/2014 12:01 PM, Florian Pflug wrote: On Jan26, 2014, at 17:47 , Andrew Dunstan and...@dunslane.net wrote: I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe which I have called check-with for want of a better name. And with it I

Re: [HACKERS] In-core regression tests for replication, cascading, archiving, PITR, etc. Michael Paquier

2014-01-26 Thread Greg Sabino Mullane
-BEGIN PGP SIGNED MESSAGE- Hash: RIPEMD160 I thought the goal here was to have a testing framework that (a) is portable to every platform we support and (b) doesn't require root privileges to run. None of those options sound like they'll help meet those requirements. FWIW, I

[HACKERS] Tablespace options in \db+

2014-01-26 Thread Magnus Hagander
Currently, tablespace options (such as random_page_cost) aren't shown in \db or \db+ in psql - the only way to see them is to directly query pg_tablespaces. This seems like an oversight from back when the feature was added. I realize the CF is closed, but would people be ok with me pushing this

Re: [HACKERS] A better way than tweaking NTUP_PER_BUCKET

2014-01-26 Thread Atri Sharma
Sent from my iPad On 26-Jan-2014, at 4:38, Simon Riggs si...@2ndquadrant.com wrote: On 25 January 2014 22:33, Stephen Frost sfr...@snowman.net wrote: * Tom Lane (t...@sss.pgh.pa.us) wrote: AFAICT, there was no consensus in this thread on what to do, which probably has something to do

Re: [HACKERS] Tablespace options in \db+

2014-01-26 Thread Stephen Frost
* Magnus Hagander (mag...@hagander.net) wrote: Currently, tablespace options (such as random_page_cost) aren't shown in \db or \db+ in psql - the only way to see them is to directly query pg_tablespaces. This seems like an oversight from back when the feature was added. I realize the CF is

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-26 Thread Andres Freund
Hi, On 2014-01-24 19:23:28 -0500, Greg Stark wrote: Since the point release we've run into a number of databases that when we restore from a base backup end up being larger than the primary database was. Sometimes by a large factor. The data below is from 9.1.11 (both primary and standby) but

[HACKERS] shouldn't we log permission errors when accessing the configured trigger file?

2014-01-26 Thread Andres Freund
Hi, For some reason CheckForStandbyTrigger() doesn't report permission errors when stat()int the trigger file. Shouldn't we fix that? static bool CheckForStandbyTrigger(void) { ... if (stat(TriggerFile, stat_buf) == 0) { ereport(LOG,

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Andrew Dunstan
On 01/26/2014 12:08 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: I've often wanted to be able to run make check and just have it run the small number of tests I am interested in. Here's a tiny patch along those lines. It creates a new targe which I have called check-with for

Re: [HACKERS] GIN improvements part2: fast scan

2014-01-26 Thread Tomas Vondra
On 26.1.2014 17:14, Heikki Linnakangas wrote: I would actually expect it to be fairly effective for that query, so that's a bit surprising. I added counters to see where the calls are coming from, and it seems that about 80% of the calls are actually coming from this little the feature I

Re: [HACKERS] [patch] Client-only installation on Windows

2014-01-26 Thread Andrew Dunstan
On 01/24/2014 05:36 AM, MauMau wrote: From: Andrew Dunstan and...@dunslane.net Is there any reason why pgbench is listed in @client_program_files as well as @client_contribs? AFAICT it should only be in the latter. Thank you for reviewing the patch. Yes, you are right. I removed pgbench

Re: [HACKERS] Storing pg_stat_statements query texts externally, pg_stat_statements in core

2014-01-26 Thread Tom Lane
Peter Geoghegan p...@heroku.com writes: On Sat, Jan 25, 2014 at 2:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: Well, it's fairly expensive to generate that text, in the case of a large/complex statement. It's possible that continuing to hold the lock is nonetheless the right thing to do because

Re: [HACKERS] PoC: Partial sort

2014-01-26 Thread Marti Raudsepp
On Mon, Jan 20, 2014 at 2:43 PM, Alexander Korotkov aekorot...@gmail.com wrote: Another changes in this version of patch: 1) Applied patch to don't compare skipCols in tuplesort by Marti Raudsepp 2) Adjusting sort bound after processing buckets. Hi, Here's a patch with some whitespace and

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: On 01/26/2014 12:08 PM, Tom Lane wrote: Also, the tests themselves don't take that long, especially in parallel mode. If you need to speed up repeated testing, it's more profitable to avoid the install/initdb overhead of a make check. I use a small

Re: [HACKERS] [patch] Client-only installation on Windows

2014-01-26 Thread Tom Lane
Andrew Dunstan and...@dunslane.net writes: Committed, with a little help from perltidy. I think you forgot to push to master? The only recent commit I see from you is the Visual Studio 2013 fixes. regards, tom lane -- Sent via pgsql-hackers mailing list

Re: [HACKERS] [patch] Client-only installation on Windows

2014-01-26 Thread Andrew Dunstan
On 01/26/2014 03:14 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Committed, with a little help from perltidy. I think you forgot to push to master? The only recent commit I see from you is the Visual Studio 2013 fixes. Oh, hell and damnation.

Re: [HACKERS] [patch] Client-only installation on Windows

2014-01-26 Thread Andres Freund
Andrew Dunstan and...@dunslane.net schrieb: On 01/26/2014 03:14 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Committed, with a little help from perltidy. I think you forgot to push to master? The only recent commit I see from you is the Visual Studio 2013 fixes.

Re: [HACKERS] [patch] Client-only installation on Windows

2014-01-26 Thread Andrew Dunstan
On 01/26/2014 05:04 PM, Andres Freund wrote: Andrew Dunstan and...@dunslane.net schrieb: On 01/26/2014 03:14 PM, Tom Lane wrote: Andrew Dunstan and...@dunslane.net writes: Committed, with a little help from perltidy. I think you forgot to push to master? The only recent commit I see from

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 26 January 2014 15:53, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-01-26 Florian Pflug f...@phlo.org On Jan26, 2014, at 10:19 , Simon Riggs si...@2ndquadrant.com wrote: Also, having plpgsql.warnings_as_errors = off (default) | on makes sense and should be included in 9.4 I

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
Dne 26. 1. 2014 23:24 Simon Riggs si...@2ndquadrant.com napsal(a): On 26 January 2014 15:53, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-01-26 Florian Pflug f...@phlo.org On Jan26, 2014, at 10:19 , Simon Riggs si...@2ndquadrant.com wrote: Also, having

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 26 January 2014 22:44, Pavel Stehule pavel.steh...@gmail.com wrote: Dne 26. 1. 2014 23:24 Simon Riggs si...@2ndquadrant.com napsal(a): On 26 January 2014 15:53, Pavel Stehule pavel.steh...@gmail.com wrote: 2014-01-26 Florian Pflug f...@phlo.org On Jan26, 2014, at 10:19 , Simon

Re: [HACKERS] PoC: Duplicate Tuple Elidation during External Sort for DISTINCT

2014-01-26 Thread Jon Nelson
What are my next steps here? I believe the concept is sound, the code is appears to work and doesn't crash, and the result does show a performance win in most cases (sometimes a big win). It's also incomplete, at least insofar as it doesn't interface with the cost models at all, etc... -- Jon

Re: [HACKERS] Recovery inconsistencies, standby much larger than primary

2014-01-26 Thread Greg Stark
On Sun, Jan 26, 2014 at 9:45 AM, Andres Freund and...@2ndquadrant.com wrote: Hi, On 2014-01-24 19:23:28 -0500, Greg Stark wrote: Since the point release we've run into a number of databases that when we restore from a base backup end up being larger than the primary database was. Sometimes

Re: [HACKERS] running make check with only specified tests

2014-01-26 Thread Alvaro Herrera
Tom Lane wrote: Anyway, I have no great objection to the proposed patch, I'm just dubious that it's really worth the trouble. If you do go through with it, I'd suggest adding an installcheck-with variant. In the bikeshedding department, maybe -tests instead of -with? No objection to the

Re: [HACKERS] [PATCH] Support for pg_stat_archiver view

2014-01-26 Thread Michael Paquier
On Sat, Jan 25, 2014 at 3:19 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Sat, Jan 25, 2014 at 5:41 AM, Fujii Masao masao.fu...@gmail.com wrote: On Thu, Jan 23, 2014 at 4:10 PM, Michael Paquier michael.paqu...@gmail.com wrote: On Thu, Jan 9, 2014 at 6:36 AM, Gabriele Bartolini

Re: [HACKERS] ALTER SYSTEM SET typos and fix for temporary file name management

2014-01-26 Thread Michael Paquier
Hi, Please find attached an updated patch (context diffs) improving the comments related to ALTER SYSTEM. This patch does nothing for the suffix tmp/temp used in a couple of places of the code, it only corrects some typos and makes the comments more consistent with current code. The

Re: [HACKERS] ALTER SYSTEM SET typos and fix for temporary file name management

2014-01-26 Thread Michael Paquier
On Mon, Jan 27, 2014 at 11:29 AM, Michael Paquier michael.paqu...@gmail.com wrote: Hi, Please find attached an updated patch (context diffs) improving the comments related to ALTER SYSTEM. This patch does nothing for the suffix tmp/temp used in a couple of places of the code, it only

Re: [HACKERS] ALTER SYSTEM SET typos and fix for temporary file name management

2014-01-26 Thread Fujii Masao
On Mon, Jan 27, 2014 at 11:53 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jan 27, 2014 at 11:29 AM, Michael Paquier michael.paqu...@gmail.com wrote: Hi, Please find attached an updated patch (context diffs) improving the comments related to ALTER SYSTEM. This patch does

Re: [HACKERS] Standalone synchronous master

2014-01-26 Thread Rajeev rastogi
On 01/25/2014, Josh Berkus wrote: ISTM the consensus is that we need better monitoring/administration interfaces so that people can script the behavior they want in external tools. Also, a new synchronous apply replication mode would be handy, but that'd be a whole different patch. We

Re: [HACKERS] [Review] inherit support for foreign tables

2014-01-26 Thread Etsuro Fujita
(2014/01/25 11:27), Shigeru Hanada wrote: 2014/1/23 Etsuro Fujita fujita.ets...@lab.ntt.co.jp: Shigeru Hanada wrote: Though this would be debatable, in current implementation, constraints defined on a foreign table (now only NOT NULL and CHECK are supported) are not enforced during INSERT or

Re: [HACKERS] ALTER SYSTEM SET typos and fix for temporary file name management

2014-01-26 Thread Michael Paquier
On Mon, Jan 27, 2014 at 12:49 PM, Fujii Masao masao.fu...@gmail.com wrote: On Mon, Jan 27, 2014 at 11:53 AM, Michael Paquier michael.paqu...@gmail.com wrote: On Mon, Jan 27, 2014 at 11:29 AM, Michael Paquier michael.paqu...@gmail.com wrote: Hi, Please find attached an updated patch (context

Re: [HACKERS] effective_cache_size calculation overflow

2014-01-26 Thread Tom Lane
Magnus Hagander mag...@hagander.net writes: So clearly there is an overflow somewhere in the calculation of effective_cache_size, most likely from the fact that it's now dynamically calculated. Yeah. Fixed. regards, tom lane -- Sent via pgsql-hackers mailing list

[HACKERS] Typo fix in src/backend/catalog/README

2014-01-26 Thread Amit Langote
Hi, There is a possible typo in src/backend/catalog/README and the attached fixes it. -- Amit diff --git a/src/backend/catalog/README b/src/backend/catalog/README index fce01ea..7e0ddf3 100644 --- a/src/backend/catalog/README +++ b/src/backend/catalog/README @@ -92,7 +92,7 @@ them. Thus, the

Re: [HACKERS] Storing pg_stat_statements query texts externally, pg_stat_statements in core

2014-01-26 Thread Peter Geoghegan
On Sun, Jan 26, 2014 at 10:38 AM, Tom Lane t...@sss.pgh.pa.us wrote: Meh. This line of argument seems to reduce to we don't need to worry about performance of this code path because it won't be reached often. I think I may have over-elaborated, giving you the false impression that this was

[HACKERS] missing windows client only installation

2014-01-26 Thread Pavel Stehule
Hello One window user reported unpleasant issue - there is not official client only installation for PostgreSQL for windows similar to Oracle or D2 client only installation. I know so this issue can be solved by pgAdmin or ODBC driver installation, but still it is a issue for users without good

Re: [HACKERS] inherit support for foreign tables

2014-01-26 Thread Etsuro Fujita
(2014/01/22 4:09), Robert Haas wrote: On Mon, Jan 20, 2014 at 9:44 PM, Shigeru Hanada shigeru.han...@gmail.com wrote: Thanks for the comments. 2014/1/21 KaiGai Kohei kai...@ak.jp.nec.com: In addition, an idea which I can't throw away is to assume that all constraints defined on foreign tables

Re: [HACKERS] Typo fix in src/backend/catalog/README

2014-01-26 Thread Heikki Linnakangas
On 01/27/2014 07:22 AM, Amit Langote wrote: There is a possible typo in src/backend/catalog/README and the attached fixes it. Thanks, fixed. - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
Putting this and all future options as keywords seems like a poor choice. Indeed, the # syntax proposed isn't even fully described on list here, nor are examples given in tests. My feeling is that nobody even knows that is being proposed and would likely cause more discussion if they

Re: [HACKERS] Memory leak in PL/pgSQL function which CREATE/SELECT/DROP a temporary table

2014-01-26 Thread Heikki Linnakangas
On 01/25/2014 11:36 PM, Bruce Momjian wrote: On Tue, Jun 18, 2013 at 09:07:59PM +0300, Heikki Linnakangas wrote: Hmm. I could repeat this, and it seems that the catcache for pg_statistic accumulates negative cache entries. Those slowly take up the memory. Digging a bit deeper, this is a

Re: [HACKERS] WIP patch (v2) for updatable security barrier views

2014-01-26 Thread Kouhei Kaigai
Hello, I checked the latest updatable security barrier view patch. Even though I couldn't find a major design problem in this revision, here are two minor comments below. I think, it needs to be reviewed by committer to stick direction to implement this feature. Of course, even I know Tom argued