Re: [HACKERS] auto_explain WAS: RFC: Timing Events

2012-11-21 Thread Gavin Flower
On 22/11/12 12:15, Greg Smith wrote: On 11/8/12 2:16 PM, Josh Berkus wrote: Also, logging only the long-running queries is less useful than people on this list seem to think. When I'm doing real performance analysis, I need to see *everything* which was run, not just the slow stuff. Often

Re: [HACKERS] discarding duplicate indexes

2012-12-20 Thread Gavin Flower
On 20/12/12 14:57, Josh Kupershmidt wrote: CREATE TABLE test (id int); CREATE INDEX test_idx1 ON test (id); CREATE INDEX test_idx2 ON test (id); I initially misread your example code, but after I realised my mistake, I thought of an alternative scenario that might be worth considering. CREATE

Re: [HACKERS] proposal: ANSI SQL 2011 syntax for named parameters

2012-12-28 Thread Gavin Flower
On 29/12/12 10:19, Peter Eisentraut wrote: On 12/28/12 11:22 AM, Pavel Stehule wrote: I am not sure, but maybe is time to introduce ANSI SQL syntax for functions' named parameters It is defined in ANSI SQL 2011 CALL P (B = 1, A = 2) instead PostgreSQL syntax CALL ( B := 1, A := 2) I agree

Re: [HACKERS] inconsistent time zone formats in log

2012-12-29 Thread Gavin Flower
On 30/12/12 05:24, Tom Lane wrote: Andres Freund and...@2ndquadrant.com writes: On 2012-12-29 07:23:24 -0500, Peter Eisentraut wrote: The xlog code uses two different time zone formats at various times. One is a pg_time_t (stored in pg_control/ControlFileData), the other is a TimestampTz.

Re: [HACKERS] json api WIP patch

2013-01-15 Thread Gavin Flower
On 16/01/13 08:04, David Fetter wrote: On Mon, Jan 14, 2013 at 07:52:56PM -0500, Andrew Dunstan wrote: On 01/14/2013 07:36 PM, Merlin Moncure wrote: While testing this I noticed that integer based 'get' routines are zero based -- was this intentional? Virtually all other aspects of SQL are 1

Re: [HACKERS] Parallel query execution

2013-01-15 Thread Gavin Flower
On 16/01/13 11:14, Bruce Momjian wrote: I mentioned last year that I wanted to start working on parallelism: https://wiki.postgresql.org/wiki/Parallel_Query_Execution Years ago I added thread-safety to libpq. Recently I added two parallel execution paths to pg_upgrade. The first

Re: [HACKERS] CF3+4 (was Re: Parallel query execution)

2013-01-22 Thread Gavin Flower
On 22/01/13 22:35, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: In this connection I refer you to Sturgeon's Law(*): 90% of everything is crud. Applied to our problem, it says that 90% of all patch ideas are bad. Therefore, we should be expecting to reject a large fraction of

Re: [HACKERS] Event Triggers: adding information

2013-01-22 Thread Gavin Flower
On 23/01/13 16:02, Robert Haas wrote: On Tue, Jan 22, 2013 at 11:38 AM, Thom Brown t...@linux.com wrote: ...unless I've coincidentally stumbled upon the new MEOW LIKE A CAT command coming in 9.3. ;) +1 for adding that. I've been wanting it for years. Can we have it back ported to 9.2,

Re: [HACKERS] Support for REINDEX CONCURRENTLY

2013-01-23 Thread Gavin Flower
On 24/01/13 07:45, Alvaro Herrera wrote: Andres Freund escribió: I somewhat dislike the fact that CONCURRENTLY isn't really concurrent here (for the listeners: swapping the indexes acquires exlusive locks) , but I don't see any other naming being better. REINDEX ALMOST CONCURRENTLY?

Re: [HACKERS] Re: [COMMITTERS] pgsql: In docs, change a few cases of not important to unimportant.

2012-08-18 Thread Gavin Flower
On 17/08/12 03:45, Bruce Momjian wrote: On Thu, Aug 16, 2012 at 10:38:09AM -0500, Kevin Grittner wrote: Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: On 16.08.2012 17:49, Bruce Momjian wrote: Heikki Linnakangas wrote: On 16.08.2012 17:36, Bruce Momjian wrote: In docs, change

Re: [HACKERS] temporal support patch

2012-08-21 Thread Gavin Flower
On 22/08/12 02:16, Kevin Grittner wrote: Jeff Davis pg...@j-davis.com wrote: On Mon, 2012-08-20 at 19:32 -0500, Kevin Grittner wrote: Josh Berkus j...@agliodbs.com wrote: This is sounding like a completely runaway spec on what should be a simple feature. I hate to contribute to scope

Re: [HACKERS] Audit Logs WAS: temporal support patch

2012-08-22 Thread Gavin Flower
On 22/08/12 10:56, Kevin Grittner wrote: Josh Berkus j...@agliodbs.com wrote: First, note the change in topic. This whole discussion has gone rather far afield from Miroslav's original submission, which was for temporal tables, which is NOT the same thing as audit logs, although the use

Re: [HACKERS] MySQL search query is not executing in Postgres DB

2012-08-29 Thread Gavin Flower
On 29/08/12 23:34, Robert Haas wrote: On Wed, Aug 29, 2012 at 12:27 AM, Tom Lane t...@sss.pgh.pa.us wrote: To put some concreteness into what so far has been a pretty hand-wavy discussion, I experimented with the attached patch. I'm not sure that it exactly corresponds to what you proposed, but

Re: [HACKERS] Configuration include directory

2012-09-24 Thread Gavin Flower
On 25/09/12 02:41, Heikki Linnakangas wrote: On 24.09.2012 17:24, Tom Lane wrote: Heikki Linnakangashlinnakan...@vmware.com writes: This seems pretty much ready to commit. One tiny detail that I'd like to clarify: the docs say: Multiple files within an include directory are ordered by an

Re: [HACKERS] system_information.triggers truncate triggers

2012-09-26 Thread Gavin Flower
On 27/09/12 02:59, Christopher Browne wrote: On Wed, Sep 26, 2012 at 10:02 AM, Tom Lane t...@sss.pgh.pa.us wrote: Daniel Farina dan...@heroku.com writes: On Tue, Sep 25, 2012 at 10:55 PM, Jaime Casanova ja...@2ndquadrant.com wrote: The definition of information_schema.triggers contains this:

Re: [HACKERS] Improving psql \ds

2012-10-08 Thread Gavin Flower
On 09/10/12 03:53, Robert Haas wrote: On Mon, Oct 8, 2012 at 3:49 AM, Julien Tachoires jul...@gmail.com wrote: 2012/10/8 Tom Lane t...@sss.pgh.pa.us: Julien Tachoires jul...@gmail.com writes: About \ds behaviour, I think to add 2 columns : - 'LastValue' - 'Increment' That would make the

Re: [HACKERS] Truncate if exists

2012-10-09 Thread Gavin Flower
On 10/10/12 09:35, Peter Eisentraut wrote: On 10/9/12 5:09 AM, Simon Riggs wrote: Anyone want to check for any other missing IF EXISTS capability in other DDL? TRUNCATE is not really DDL. If we allow TRUNCATE IF EXISTS, what is stopping someone from requesting DELETE IF EXISTS or INSERT IF

Re: [HACKERS] Logical to physical page mapping

2012-10-27 Thread Gavin Flower
On 28/10/12 07:41, Heikki Linnakangas wrote: On 27.10.2012 16:43, Tom Lane wrote: Jan Wieckjanwi...@yahoo.com writes: The reason why we need full_page_writes is that we need to guard against torn pages or partial writes. So what if smgr would manage a mapping between logical page numbers and

Re: [HACKERS] Inadequate thought about buffer locking during hot standby replay

2012-11-13 Thread Gavin Flower
On 14/11/12 04:32, Merlin Moncure wrote: On Tue, Nov 13, 2012 at 9:03 AM, Tom Lane t...@sss.pgh.pa.us wrote: Ok. It won't help all that much on 9.0, though. Well, it won't help GIST much, but the actually-reported-from-the-field case is in btree, and it does fix that. It occurs to me that if

Re: [HACKERS] [GENERAL] Creating temp tables inside read only transactions

2011-07-10 Thread Gavin Flower
On 08/07/11 18:21, Darren Duncan wrote: Jeff Davis wrote: On Thu, 2011-07-07 at 20:56 -0700, Darren Duncan wrote: When you create a temporary table, PostgreSQL needs to add rows in pg_class, pg_attribute, and probably other system catalogs. So there are writes, which aren't possible in a

Re: [HACKERS] json api WIP patch

2013-01-31 Thread Gavin Flower
On 01/02/13 13:26, Andrew Dunstan wrote: On 01/31/2013 07:16 PM, David E. Wheeler wrote: On Jan 31, 2013, at 2:20 PM, Andrew Dunstan and...@dunslane.net wrote: I'm happy to take opinions about this, and I expected some bikeshedding, but your reaction is contrary to everything others have

Re: [HACKERS] autovacuum not prioritising for-wraparound tables

2013-02-02 Thread Gavin Flower
On 03/02/13 15:08, Christopher Browne wrote: On Sat, Feb 2, 2013 at 2:54 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Feb 2, 2013 at 1:49 PM, Andres Freund and...@2ndquadrant.com wrote: You're right, this doesn't work superbly well, especially for insert-only tables... But imo the

Re: [HACKERS] proposal: ANSI SQL 2011 syntax for named parameters

2013-02-04 Thread Gavin Flower
On 04/02/13 21:55, Pavel Stehule wrote: 2013/1/2 Robert Haas robertmh...@gmail.com: On Fri, Dec 28, 2012 at 11:22 AM, Pavel Stehule pavel.steh...@gmail.com wrote: I am not sure, but maybe is time to introduce ANSI SQL syntax for functions' named parameters It is defined in ANSI SQL 2011

Re: [HACKERS] Considering Gerrit for CFs

2013-02-08 Thread Gavin Flower
I thought this might be of interest... http://blog.documentfoundation.org/2013/02/07/the-document-foundation-announces-libreoffice-4-0/ [...] Improved code contribution thanks to Gerrit: a web based code review system, facilitating the task for projects using Git version control system

Re: [HACKERS] Duplicate JSON Object Keys

2013-03-08 Thread Gavin Flower
Well I would much prefer to find out sooner rather than later that there is a problem, so I would much prefer know I've created a duplicate as soon as the system can detect it. In general, Postgresql appears much better at this than MySQL On 09/03/13 10:01, Alvaro Herrera wrote: Hannu

Re: [HACKERS] Duplicate JSON Object Keys

2013-03-13 Thread Gavin Flower
On 14/03/13 02:02, Andrew Dunstan wrote: On 03/13/2013 08:17 AM, Robert Haas wrote: On Fri, Mar 8, 2013 at 4:42 PM, Andrew Dunstan and...@dunslane.net wrote: So my order of preference for the options would be: 1. Have the JSON type collapse objects so the last instance of a key wins and is

Re: [HACKERS] adding support for zero-attribute unique/etc keys

2013-03-26 Thread Gavin Flower
On 27/03/13 06:14, Darren Duncan wrote: On 2013.03.26 1:40 AM, Albe Laurenz wrote: Darren Duncan wrote: So, determining if 2 rows are the same involves an iteration of dyadic logical AND over the predicates for each column comparison. Now logical AND has an identity value, which is TRUE,

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-02 Thread Gavin Flower
On 29/03/13 13:12, Brendan Jurd wrote: On 28 March 2013 20:34, Dean Rasheed dean.a.rash...@gmail.com wrote: Is the patch also going to allow empty arrays in higher dimensions where not just the last dimension is empty? It doesn't allow that at present. It seems as though, if it's allowing

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net wrote: On 04/02/2013 02:46 PM, Florian Pflug wrote: If we're going to break compatibility, we should IMHO get rid of non-zero lower bounds all together. My guess is that the number of affected

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 04:58, Pavel Stehule wrote: 2013/4/3 Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz On 04/04/13 03:02, Florian Pflug wrote: On Apr3, 2013, at 15:30 , Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:21, Pavel Stehule wrote: Pavel ALOGOL 60 was zero based by default, as I remember deliberately setting the lower bound to 1, I managed to avoid PASCAL and I only glanced at ADA.

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:30, Tom Lane wrote: Zero as the default lower bound is consistent with most languages (especially the common ones like C, C++, Java, Python), in fact I don't remember any language where that is not the case (ignoring SQL) - and I've written programs in about 20 languages.

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 05:36, David E. Wheeler wrote: On Apr 3, 2013, at 9:30 AM, Tom Lane t...@sss.pgh.pa.us wrote: Fortran ... Basic ... actually I'd have thought that zero was a minority position. Fashions change I guess. I say we turn the default lower bound up to 11. David In keeping with the

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 07:58, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: Anyhow, I think we should standardise on zero as the initial index to be as consistent as practicable. If you want to suggest a default of zero for the first subscript of an array in SQL, please don't

Re: [PATCH] Exorcise zero-dimensional arrays (Was: Re: [HACKERS] Should array_length() Return NULL)

2013-04-03 Thread Gavin Flower
On 04/04/13 11:55, Jim Nasby wrote: On 4/3/13 10:34 AM, Gavin Flower wrote: Maybe we should adopt the famous compromise of '0.5'? +0.5. ;P Far too positive for our grim world! How about '-0,5' instead? :-) I notice you call yourself a 'Data Architect' - never too sure If I should call

Re: [HACKERS] Back branches vs. gcc 4.8.0

2013-04-05 Thread Gavin Flower
On 06/04/13 11:14, Tom Lane wrote: After quite a bit of hair-pulling trying to install Fedora 19 Alpha, I've been able to reproduce the initdb-time failure that's currently being seen on buildfarm member anchovy, and was also complained of recently by an end user:

Re: [HACKERS] Back branches vs. gcc 4.8.0

2013-04-08 Thread Gavin Flower
On 09/04/13 08:41, Peter Eisentraut wrote: On 4/5/13 6:14 PM, Tom Lane wrote: Since gcc 4.8 is going to be on a lot of people's machines pretty soon, I think we need to do something to prevent it from breaking 8.4.x and 9.0.x. It looks like our choices are (1) teach configure to enable

Re: [HACKERS] introduction

2013-04-09 Thread Gavin Flower
On 10/04/13 09:40, Dickson S. Guedes wrote: 2013/4/9 Bert bier...@gmail.com: So I'll just monitor the mailing list a bit, pick some patches and test them. I think this is the best way to learn to know the code, and is probably helpful for everyone? Plus to that you can start reading some

Re: [HACKERS] pg_controldata gobbledygook

2013-04-26 Thread Gavin Flower
On 26/04/13 18:53, Daniel Farina wrote: On Thu, Apr 25, 2013 at 9:34 PM, Tom Lane t...@sss.pgh.pa.us wrote: Alvaro Herrera alvhe...@2ndquadrant.com writes: Tom Lane wrote: I think I've heard of scripts grepping the output of pg_controldata for this that or the other. Any rewording of the

Re: [HACKERS] libpq COPY handling

2013-04-26 Thread Gavin Flower
On 27/04/13 02:48, Tom Lane wrote: Robert Haas robertmh...@gmail.com writes: On Thu, Apr 25, 2013 at 1:56 PM, Tom Lane t...@sss.pgh.pa.us wrote: However, the documentation in libpq.sgml is a bit bogus too, because it counsels trying the PQputCopyEnd() call again, which will not work (since we

Re: [HACKERS] Graph datatype addition

2013-04-29 Thread Gavin Flower
On 30/04/13 12:33, Любен Каравелов wrote: - Цитат от Christopher Browne (cbbro...@gmail.com), на 29.04.2013 в 23:18 - The one place where I *could* see a special type having a contribution is for there to be a data type that can contain an arbitrary number of links. That means you

Re: [HACKERS] Documentation epub format

2013-05-01 Thread Gavin Flower
On 02/05/13 15:23, Peter Eisentraut wrote: On Wed, 2013-05-01 at 18:27 +0200, Fabien COELHO wrote: I must admit that there is a bit of a disappointement as far as the user experience is concerned: the generated file is barely usable on an iPad2 with the default iBooks reader, which was clearly

Re: [HACKERS] GSOC13 proposal - extend RETURNING syntax

2013-05-02 Thread Gavin Flower
On 03/05/13 04:52, David Fetter wrote: On Thu, May 02, 2013 at 06:28:53PM +0200, Andres Freund wrote: On 2013-05-02 12:23:19 -0400, Tom Lane wrote: Marko Tiikkaja ma...@joh.to writes: What I'm more interested in is: how can we make this feature work in PL/PgSQL where OLD means something

Re: [HACKERS] Documentation epub format

2013-05-02 Thread Gavin Flower
On 03/05/13 15:16, Peter Eisentraut wrote: On Wed, 2013-05-01 at 18:27 +0200, Fabien COELHO wrote: The table of contents too much detailed, so it is long and slow to scan, and there is no clear shortcut. Flipping pages in the documentation takes ages (well, close to one second or more if I flip

Re: [HACKERS] Documentation epub format

2013-05-04 Thread Gavin Flower
On 04/05/13 18:11, Fabien COELHO wrote: I don't think we should be governed by the silly behaviour of one epub reader. My ereader doesn't collapse the contents into one giant list. If ibooks is doing stuff badly, complain to Apple. Indeed that makes sense as the issue is specific to this

Re: [HACKERS] matview niceties: pick any two of these three

2013-05-04 Thread Gavin Flower
On 05/05/13 10:41, Kevin Grittner wrote: [...] removing unlogged matviews for 9.3 [...] So you are going to unlog the unlogged matviews from 9.3? :-) More seriously, I think this will result in a better solution for 9.4 - as it seems to me to be too rushed to fix it now Cheers, Gavin.

Re: [HACKERS] 9.3 release notes suggestions

2013-05-05 Thread Gavin Flower
On 05/05/13 17:35, Tom Lane wrote: Bruce Momjian br...@momjian.us writes: OK, so we can either use 4 hex digits minimum and have a fixed with on most platforms, extend it to 8 hex digits, or revert the entire fixed-width idea. I think we should lose the idea that it's fixed-width. 16-bit PIDs

Re: [HACKERS] SET work_mem = '1TB';

2013-05-21 Thread Gavin Flower
On 22/05/13 09:13, Simon Riggs wrote: I worked up a small patch to support Terabyte setting for memory. Which is OK, but it only works for 1TB, not for 2TB or above. Which highlights that since we measure things in kB, we have an inherent limit of 2047GB for our memory settings. It isn't beyond

Re: [HACKERS] Planning incompatibilities for Postgres 10.0

2013-05-27 Thread Gavin Flower
On 28/05/13 11:48, Craig Ringer wrote: On 05/27/2013 05:45 PM, Michael Paquier wrote: On Mon, May 27, 2013 at 2:01 PM, Craig Ringercr...@2ndquadrant.com wrote: On 05/25/2013 05:39 PM, Simon Riggs wrote: - Switching to single-major-version release numbering. The number of people who say

Re: [HACKERS] Parallell Optimizer

2013-06-11 Thread Gavin Flower
On 11/06/13 19:24, Hannu Krosing wrote: On 06/10/2013 10:37 PM, FredDaniPandoraAquiles wrote: Hi, I asked a while ago in this group about the possibility to implement a parallel planner in a multithread way, and the replies were that the proposed approach couldn't be

Re: [HACKERS] Improvement of checkpoint IO scheduler for stable transaction responses

2013-07-03 Thread Gavin Flower
On 04/07/13 01:31, Robert Haas wrote: On Wed, Jul 3, 2013 at 4:18 AM, KONDO Mitsumasa kondo.mitsum...@lab.ntt.co.jp wrote: I tested and changed segsize=0.25GB which is max partitioned table file size and default setting is 1GB in configure option (./configure --with-segsize=0.25). Because I

Re: [HACKERS] Personal note: taking some vacation time in Sep/Oct

2013-08-20 Thread Gavin Flower
On 20/08/13 15:26, Tom Lane wrote: I will be taking a long (and long-overdue) vacation from Sep 10 to Oct 20. I expect to have email access, but won't be doing much more than minimally keeping up with my inbox. This means I'll be pretty much AWOL for the September commitfest :-(. That's

Re: [HACKERS] INSERT...ON DUPLICATE KEY IGNORE

2013-09-04 Thread Gavin Flower
On 05/09/13 08:26, Robert Haas wrote: On Sat, Aug 31, 2013 at 2:34 PM, Andres Freund and...@2ndquadrant.com wrote: After some thinking I don't think any solution primarily based on holding page level locks across other index operations is going to scale ok. I'd like to chime in with a large +1

Re: [HACKERS] [PERFORM] encouraging index-only scans

2013-09-05 Thread Gavin Flower
On 06/09/13 13:10, Robert Haas wrote: On Thu, Sep 5, 2013 at 8:14 PM, Bruce Momjian br...@momjian.us wrote: Actually, I now realize it is more complex than that, and worse. There are several questions to study to understand when pg_class.relallvisible is updated (which is used to determine if

Re: [HACKERS] Commitfest II CLosed

2013-10-21 Thread Gavin Flower
On 22/10/13 02:56, Heikki Linnakangas wrote: On 21.10.2013 16:15, Peter Eisentraut wrote: On 10/21/13 1:31 AM, Andres Freund wrote: The point of the CF is exactly that all patches get at least one good round of review. Moving unreviewed patches to the next CF will let them just suffer the

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

2013-10-21 Thread Gavin Flower
On 22/10/13 00:17, KONDO Mitsumasa wrote: (2013/10/18 22:21), Andrew Dunstan wrote: If we're going to extend pg_stat_statements, even more than min and max I'd like to see the standard deviation in execution time. OK. I do! I am making some other patches, please wait more! Regards, --

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

2013-10-21 Thread Gavin Flower
On 22/10/13 09:01, Tom Lane wrote: Gavin Flower gavinflo...@archidevsys.co.nz writes: If we're going to extend pg_stat_statements, even more than min and max I'd like to see the standard deviation in execution time. How about the 'median', often a lot more useful than the 'arithmetic mean

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

2013-10-21 Thread Gavin Flower
On 22/10/13 13:26, Ants Aasma wrote: On Tue, Oct 22, 2013 at 1:09 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Gavin Flower wrote: One way it could be done, but even this would consume far too much storage and processing power (hence totally impractical), would be to 'simply' store

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

2013-10-21 Thread Gavin Flower
On 22/10/13 13:26, Ants Aasma wrote: On Tue, Oct 22, 2013 at 1:09 AM, Alvaro Herrera alvhe...@2ndquadrant.com wrote: Gavin Flower wrote: One way it could be done, but even this would consume far too much storage and processing power (hence totally impractical), would be to 'simply' store

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

2013-10-22 Thread Gavin Flower
On 22/10/13 22:56, Dimitri Fontaine wrote: Tom Lane t...@sss.pgh.pa.us writes: Hm. It's been a long time since college statistics, but doesn't the entire concept of standard deviation depend on the assumption that the underlying distribution is more-or-less normal (Gaussian)? Is there a I

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

2013-10-23 Thread Gavin Flower
On 24/10/13 10:34, Marc Mamin wrote: Oscillating plan changes may fit multimodal but I don't feel that's typical. My experience has been it's either an extremely rare plan difference or it's a shift from one plan to another over time. After all, all of avg, min, max and stdev are only

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

2013-10-23 Thread Gavin Flower
On 24/10/13 11:26, Peter Geoghegan wrote: On Wed, Oct 23, 2013 at 2:57 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: Looks definitely bimodal in the log version, very clear! Yes, I feel that having a 32 log binary binned histogram (as Alvaro Herrera suggested) would be very useful

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

2013-10-23 Thread Gavin Flower
On 24/10/13 12:00, Gavin Flower wrote: On 24/10/13 11:26, Peter Geoghegan wrote: On Wed, Oct 23, 2013 at 2:57 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: Looks definitely bimodal in the log version, very clear! Yes, I feel that having a 32 log binary binned histogram (as Alvaro

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

2013-10-23 Thread Gavin Flower
On 24/10/13 12:14, Jeff Janes wrote: On Wed, Oct 23, 2013 at 4:00 PM, Gavin Flower gavinflo...@archidevsys.co.nz mailto:gavinflo...@archidevsys.co.nz wrote: On 24/10/13 11:26, Peter Geoghegan wrote: On Wed, Oct 23, 2013 at 2:57 PM, Gavin Flower gavinflo

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

2013-10-23 Thread Gavin Flower
On 24/10/13 12:24, Peter Geoghegan wrote: On Wed, Oct 23, 2013 at 4:14 PM, Jeff Janes jeff.ja...@gmail.com wrote: The last bucket would be limited to 8ms x = 16 ms. If you find something 16ms, then you have to rescale *before* you increment any of the buckets. Once you do, there is now room

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

2013-10-23 Thread Gavin Flower
On 24/10/13 12:46, Josh Berkus wrote: On 10/23/2013 01:26 PM, Peter Geoghegan wrote: So fixing that problem would go a long way towards resolving these concerns. It would also probably have the benefit of making it possible for query texts to be arbitrarily long - we'd be storing them in files

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

2013-10-23 Thread Gavin Flower
On 24/10/13 12:58, Peter Geoghegan wrote: On Wed, Oct 23, 2013 at 4:48 PM, Gavin Flower gavinflo...@archidevsys.co.nz wrote: 32 int64 buckets is only 256 bytes, so a thousand histograms would be less than a quarter of a MB. Any machine that busy, would likely have many GB's of RAM. I have 32

Re: [HACKERS] Fast insertion indexes: why no developments

2013-10-30 Thread Gavin Flower
On 31/10/13 06:46, Jeff Janes wrote: On Wed, Oct 30, 2013 at 9:54 AM, Leonardo Francalanci m_li...@yahoo.it mailto:m_li...@yahoo.it wrote: Jeff Janes wrote The index insertions should be fast until the size of the active part of the indexes being inserted into exceeds

Re: [HACKERS] logical column order and physical column order

2013-11-03 Thread Gavin Flower
On 03/11/13 20:37, David Rowley wrote: I've just been looking at how alignment of columns in tuples can make the tuple larger than needed. I created 2 tables... None of which are very real world, but I was hunting for the extremes here... The first table contained an int primary key and

Re: [HACKERS] Fast insertion indexes: why no developments

2013-11-04 Thread Gavin Flower
On 05/11/13 05:35, Robert Haas wrote: On Mon, Nov 4, 2013 at 11:32 AM, Andres Freund and...@2ndquadrant.com wrote: I think doing this outside of s_b will make stuff rather hard for physical replication and crash recovery since we either will need to flush the whole buffer at checkpoints - which

Re: [HACKERS] hail the CFM

2013-11-13 Thread Gavin Flower
On 14/11/13 02:45, Peter Eisentraut wrote: The commit fest manager mace has been passed on to me[*]. More to follow. [*] Actually, I found it behind the dumpster in the alley. Did you take care not to touch it with bare skin properly sterilize it? As a used mace, may pick up blood from

Re: [HACKERS] additional json functionality

2013-11-13 Thread Gavin Flower
On 14/11/13 11:33, Andrew Dunstan wrote: On 11/13/2013 04:58 PM, Merlin Moncure wrote: On Wed, Nov 13, 2013 at 1:25 PM, Andrew Dunstan and...@dunslane.net wrote: On 11/13/2013 11:37 AM, Merlin Moncure wrote: Yes. and I think this is one of the major advantages of the json API vs hstore: you

Re: [HACKERS] additional json functionality

2013-11-17 Thread Gavin Flower
On 18/11/13 09:02, David E. Wheeler wrote: On Nov 16, 2013, at 2:04 PM, Hannu Krosing ha...@2ndquadrant.com wrote: It’s still input and output as JSON, though. Yes, because JavaScript Object Notation *is* a serialization format (aka Notation) for converting JavaScript Objects to text format

Re: [HACKERS] additional json functionality

2013-11-17 Thread Gavin Flower
On 18/11/13 09:45, David Johnston wrote: David E. Wheeler-3 wrote I like JSONB because: 1. The B means binary 2. The B means second 3. It's short 4. See also BYTEA. json_strict : Not sure about the bytea reference off-hand... I was pondering jsons which meets the short property just fine

Re: [HACKERS] additional json functionality

2013-11-17 Thread Gavin Flower
On 18/11/13 14:51, David E. Wheeler wrote: On Nov 17, 2013, at 5:49 PM, Josh Berkus j...@agliodbs.com wrote: Jstore isn't the worst name suggestion I've heard on this thread. The reason I prefer JSONB though, is that a new user looking for a place to put JSON data will clearly realize that

Re: [HACKERS] additional json functionality

2013-11-19 Thread Gavin Flower
On 20/11/13 05:14, Robert Haas wrote: On Thu, Nov 14, 2013 at 2:54 PM, Hannu Krosing ha...@2ndquadrant.com wrote: I am sure you could also devise an json encoding scheme where white space is significant ;) I don't even have to think hard. If you want your JSON to be human-readable, it's

Re: [HACKERS] New option for pg_basebackup, to specify a different directory for pg_xlog

2013-11-20 Thread Gavin Flower
On 20/11/13 23:43, Haribabu kommi wrote: On 19 November 2013 19:12 Fujii Masao wrote: On Tue, Nov 19, 2013 at 9:14 PM, Haribabu kommi haribabu.ko...@huawei.com wrote: On 18 November 2013 23:30 Fujii Masao wrote: On Tue, Nov 19, 2013 at 12:01 AM, Haribabu kommi haribabu.ko...@huawei.com wrote:

Re: [HACKERS] ANALYZE sampling is too good

2013-12-07 Thread Gavin Flower
On 08/12/13 10:27, Greg Stark wrote: On Sat, Dec 7, 2013 at 8:25 PM, Josh Berkus j...@agliodbs.com wrote: The only approach which makes sense is to base it on a % of the table. In fact, pretty much every paper which has examined statistics estimation for database tables has determined that any

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 06:22, Tom Lane wrote: I wrote: Hm. You can only take N rows from a block if there actually are at least N rows in the block. So the sampling rule I suppose you are using is select up to N rows from each sampled block --- and that is going to favor the contents of blocks

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 06:22, Tom Lane wrote: I wrote: Hm. You can only take N rows from a block if there actually are at least N rows in the block. So the sampling rule I suppose you are using is select up to N rows from each sampled block --- and that is going to favor the contents of blocks

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 07:22, Gavin Flower wrote: On 12/12/13 06:22, Tom Lane wrote: I wrote: Hm. You can only take N rows from a block if there actually are at least N rows in the block. So the sampling rule I suppose you are using is select up to N rows from each sampled block --- and that is going

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 08:14, Gavin Flower wrote: On 12/12/13 07:22, Gavin Flower wrote: On 12/12/13 06:22, Tom Lane wrote: I wrote: Hm. You can only take N rows from a block if there actually are at least N rows in the block. So the sampling rule I suppose you are using is select up to N rows from

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 08:31, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: For example, assume 1000 rows of 200 bytes and 1000 rows of 20 bytes, using 400 byte pages. In the pathologically worst case, assuming maximum packing density and no page has both types: the large rows

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 08:39, Gavin Flower wrote: On 12/12/13 08:31, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: For example, assume 1000 rows of 200 bytes and 1000 rows of 20 bytes, using 400 byte pages. In the pathologically worst case, assuming maximum packing density

Re: [HACKERS] ANALYZE sampling is too good

2013-12-11 Thread Gavin Flower
On 12/12/13 09:12, Gavin Flower wrote: On 12/12/13 08:39, Gavin Flower wrote: On 12/12/13 08:31, Kevin Grittner wrote: Gavin Flower gavinflo...@archidevsys.co.nz wrote: For example, assume 1000 rows of 200 bytes and 1000 rows of 20 bytes, using 400 byte pages. In the pathologically worst

Re: [HACKERS] SSL: better default ciphersuite

2013-12-17 Thread Gavin Flower
On 18/12/13 05:26, Bruce Momjian wrote: On Tue, Dec 17, 2013 at 09:51:30AM -0500, Robert Haas wrote: On Sun, Dec 15, 2013 at 5:10 PM, James Cloos cl...@jhcloos.com wrote: For reference, see: https://wiki.mozilla.org/Security/Server_Side_TLS for the currently suggested suite for TLS

Re: [HACKERS] [PATCH] SQL assertions prototype

2013-12-17 Thread Gavin Flower
On 18/12/13 10:48, Andrew Dunstan wrote: On 12/17/2013 04:42 PM, Kevin Grittner wrote: Josh Berkus j...@agliodbs.com wrote: On 11/15/2013 05:41 AM, Heikki Linnakangas wrote: A fundamental problem with this is that it needs to handle isolation reliable, so that the assertion cannot be

Re: [HACKERS] gaussian distribution pgbench

2013-12-19 Thread Gavin Flower
On 20/12/13 09:36, Peter Geoghegan wrote: On Thu, Nov 21, 2013 at 9:13 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: So what I'd actually like to see is \setgaussian, for use in custom scripts. +1. I'd really like to be able to run a benchmark with a Gaussian and uniform distribution

Re: [HACKERS] make_interval ??

2013-12-20 Thread Gavin Flower
On 21/12/13 06:29, Josh Berkus wrote: Pavel, So constructor should to look like: CREATE OR REPLACE FUNCTION make_interval(years int DEFAULT 0, months int DEFAULT 0, ...) and usage: SELECT make_interval(years := 2) SELECT make_interval(days := 14) Is there a interest for this (or similar)

Re: [HACKERS] make_interval ??

2013-12-20 Thread Gavin Flower
On 21/12/13 13:40, Josh Berkus wrote: On 12/20/2013 03:09 PM, Gavin Flower wrote: What about leap years? What about them? some years have 365 days others have 366, so how any days in an interval of 2 years?, 4 years? -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Gavin Flower
On 10/01/14 12:41, David Fetter wrote: [..] David (who is among that tiny minority who believe that arrays should be indexed from 0.5 as a compromise ;) Clearly we should use 1/e as the starting index, where 'e' is Euler's constant 2.718... :-) (Much more mathematically profound!) Cheers,

Re: [HACKERS] Disallow arrays with non-standard lower bounds

2014-01-09 Thread Gavin Flower
On 10/01/14 12:55, Peter Geoghegan wrote: On Thu, Jan 9, 2014 at 3:41 PM, David Fetter da...@fetter.org wrote: We have dropped support, as you put it, for bigger and harder-hitting mistakes than this. Anybody whose code has this kind of silliness in it will be in other kinds of trouble, too.

Re: [HACKERS] plpgsql.consistent_into

2014-01-12 Thread Gavin Flower
On 13/01/14 11:44, Florian Pflug wrote: On Jan12, 2014, at 22:37 , Pavel Stehule pavel.steh...@gmail.com wrote: There is GUC for variable_conflict already too. In this case I would to enable this functionality everywhere (it is tool how to simply eliminate some kind of strange bugs) so it

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

2014-01-13 Thread Gavin Flower
On 14/01/14 14:29, Tom Lane wrote: [...] (2) the float and numeric variants should be implemented under nondefault names (I'm thinking FAST_SUM(), but bikeshed away). People who need extra speed and don't mind the slightly different results can alter their queries to use these variants. One

Re: [HACKERS] [Lsf-pc] Linux kernel impact on PostgreSQL performance

2014-01-14 Thread Gavin Flower
On 14/01/14 14:09, Dave Chinner wrote: On Mon, Jan 13, 2014 at 09:29:02PM +, Greg Stark wrote: On Mon, Jan 13, 2014 at 9:12 PM, Andres Freund and...@2ndquadrant.com wrote: [...] The more ambitious and interesting direction is to let Postgres tell the kernel what it needs to know to manage

Re: [HACKERS] Fix comment typo in /src/backend/command/cluster.c

2014-01-27 Thread Gavin Flower
On 28/01/14 16:33, Andrew Dunstan wrote: On 01/27/2014 10:24 PM, Sawada Masahiko wrote: Hi all, Attached patch fixes the typo which is in src/backend/command/cluster.c. Are you sure that's a typo? iff is usually short hand for if and only if. cheers andrew Certainly, that is how

Re: [HACKERS] [COMMITTERS] pgsql: Include planning time in EXPLAIN ANALYZE output.

2014-02-02 Thread Gavin Flower
On 03/02/14 09:44, Peter Geoghegan wrote: On Sun, Feb 2, 2014 at 8:13 AM, Tom Lane t...@sss.pgh.pa.us wrote: Perhaps s/Total runtime/Execution time/ ? +1 If the planning was ever made into a parallel process, then 'elapsed time' would be less than the 'processor time'. So what does

Re: [HACKERS] Performance Improvement by reducing WAL for Update Operation

2014-02-05 Thread Gavin Flower
On 06/02/14 16:59, Robert Haas wrote: On Wed, Feb 5, 2014 at 6:43 AM, Heikki Linnakangas hlinnakan...@vmware.com wrote: So, I came up with the attached worst case test, modified from your latest test suite. unpatched: testname | wal_generated | duration

Re: [HACKERS] Viability of text HISTORY/INSTALL/regression README files (was Re: [COMMITTERS] pgsql: Document a few more regression test hazards.)

2014-02-07 Thread Gavin Flower
On 08/02/14 19:05, Tom Lane wrote: Peter Eisentraut pete...@gmx.net writes: On 2/3/14, 8:48 PM, Tom Lane wrote: That's a very fair question. It's a reasonable bet that pretty much nobody actually looks at the text versions of either HISTORY or regress_README anymore. It's conceivable that

Re: [HACKERS] Auto-tuning work_mem and maintenance_work_mem

2014-02-16 Thread Gavin Flower
On 17/02/14 15:26, Robert Haas wrote: On Thu, Feb 13, 2014 at 3:34 PM, Bruce Momjian br...@momjian.us wrote: On Fri, Oct 11, 2013 at 03:39:51PM -0700, Kevin Grittner wrote: Josh Berkus j...@agliodbs.com wrote: On 10/11/2013 01:11 PM, Bruce Momjian wrote: In summary, I think we need to: *

  1   2   3   >