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

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 rather

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: http://www.postgresql.org/mailpref

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

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 wrote: Thanks for the comments. 2014/1/21 KaiGai Kohei : In addition, an idea which I can't throw away is to assume that all constraints defined on foreign tables as ASSERTIVE. Foreign tables potentially ha

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

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 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 something I felt s

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

Re: [HACKERS] effective_cache_size calculation overflow

2014-01-26 Thread Tom Lane
Magnus Hagander 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 (pgsql-hackers@pos

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 wrote: > On Mon, Jan 27, 2014 at 11:53 AM, Michael Paquier > wrote: >> On Mon, Jan 27, 2014 at 11:29 AM, Michael Paquier >> wrote: >>> Hi, >>> >>> Please find attached an updated patch (context diffs) improving the >>> comments related to ALTER SYSTE

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 : 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 UPDATE executed against forei

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.

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 wrote: > On Mon, Jan 27, 2014 at 11:29 AM, Michael Paquier > 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

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 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 > corrects some typos and mak

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 inconsistenci

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 wrote: > On Sat, Jan 25, 2014 at 5:41 AM, Fujii Masao wrote: >> On Thu, Jan 23, 2014 at 4:10 PM, Michael Paquier >> wrote: >>> On Thu, Jan 9, 2014 at 6:36 AM, Gabriele Bartolini >>> wrote: Il 08/01/14 18:42, Simon Riggs ha scritto: > Not

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

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 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 by a large fact

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] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 26 January 2014 22:44, Pavel Stehule wrote: > > Dne 26. 1. 2014 23:24 "Simon Riggs" napsal(a): > > >> >> On 26 January 2014 15:53, Pavel Stehule wrote: >> > >> > >> > >> > 2014-01-26 Florian Pflug >> > >> >> On Jan26, 2014, at 10:19 , Simon Riggs wrote: >> >> > Also, having >> >> > plpgsql

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
Dne 26. 1. 2014 23:24 "Simon Riggs" napsal(a): > > On 26 January 2014 15:53, Pavel Stehule wrote: > > > > > > > > 2014-01-26 Florian Pflug > > > >> On Jan26, 2014, at 10:19 , Simon Riggs wrote: > >> > Also, having > >> > plpgsql.warnings_as_errors = off (default) | on > >> > makes sense and sh

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 26 January 2014 15:53, Pavel Stehule wrote: > > > > 2014-01-26 Florian Pflug > >> On Jan26, 2014, at 10:19 , Simon Riggs 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 th

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 schrieb: On 01/26/2014 03:14 PM, Tom Lane wrote: Andrew Dunstan 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 Andres Freund
Andrew Dunstan schrieb: > >On 01/26/2014 03:14 PM, Tom Lane wrote: >> Andrew Dunstan 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, h

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 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. That's going to make m

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

2014-01-26 Thread Tom Lane
Andrew Dunstan 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 (pgsql-hackers@postgresql.org) T

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

2014-01-26 Thread Tom Lane
Andrew Dunstan 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 >> script t

Re: [HACKERS] PoC: Partial sort

2014-01-26 Thread Marti Raudsepp
On Mon, Jan 20, 2014 at 2:43 PM, Alexander Korotkov 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 coding style fixes fo

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

2014-01-26 Thread Tom Lane
Peter Geoghegan writes: > On Sat, Jan 25, 2014 at 2:20 PM, Tom Lane 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 release+reacquire is also >

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" >> 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 from @client_

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

[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] 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)

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 C

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 wrote: > >> On 25 January 2014 22:33, Stephen Frost 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 with the lack of concret

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

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 ha

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

2014-01-26 Thread Tom Lane
Andrew Dunstan 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 can do: >

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

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

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 17:47 , Andrew Dunstan 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 > better name.

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

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 00:24 , David Rowley wrote: >> On Sat, Jan 25, 2014 at 3:21 PM, Florian Pflug wrote: >> On Jan24, 2014, at 08:47 , Dean Rasheed wrote: >> The invtrans_minmax patch doesn't contain any patches yet - David, could >> you provide some for these functions, and also for bool_and and

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

2014-01-26 Thread Pavel Stehule
2014-01-26 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: >

[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] 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 (AND/OR

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Pavel Stehule
2014-01-26 Florian Pflug > On Jan26, 2014, at 10:19 , Simon Riggs 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 s

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 10:19 , Simon Riggs 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 these objections w

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

Re: [HACKERS] INTERVAL overflow detection is terribly broken

2014-01-26 Thread Florian Pflug
On Jan26, 2014, at 03:50 , Bruce Momjian 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 think), and thu

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 im

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 CFLAGS="-fno-omit-fra

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 w

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 withou

Re: [HACKERS] Visual Studio 2013 build

2014-01-26 Thread Magnus Hagander
On Sun, Jan 26, 2014 at 1:13 AM, Andrew Dunstan 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 >> definitions th

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

Re: [HACKERS] plpgsql.warn_shadow

2014-01-26 Thread Simon Riggs
On 15 January 2014 00:34, Marko Tiikkaja 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 > shouting

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 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 this so that the calculation

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

2014-01-26 Thread Mitsumasa KONDO
2014-01-26 Simon Riggs > On 21 January 2014 19:48, Simon Riggs wrote: > > On 21 January 2014 12:54, KONDO Mitsumasa > wrote: > >> Rebased patch is attached. > > > > Does this fix the Windows bug reported by Kumar on 20/11/2013 ? > > Please respond. Oh.. Very sorry... Last day, I tried to find

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 Simon Riggs
On 21 January 2014 19:48, Simon Riggs wrote: > On 21 January 2014 12:54, KONDO Mitsumasa > wrote: >> Rebased patch is attached. > > Does this fix the Windows bug reported by Kumar on 20/11/2013 ? Please respond. -- Simon Riggs http://www.2ndQuadrant.com/ PostgreSQL Develop