Re: [HACKERS] pg_stat_statements: calls under-estimation propagation

2013-09-30 Thread Daniel Farina
On Sun, Sep 29, 2013 at 10:25 AM, Sameer Thakur samthaku...@gmail.com wrote: Yes i was. Just saw a warning when pg_stat_statements is loaded that valid values for pg_stat_statements.max is between 100 and 2147483647. Not sure why though. I remember hacking that out for testing sake. I can

Re: [HACKERS] Bugfix and new feature for PGXS

2013-09-30 Thread Cédric Villemain
Le lundi 30 septembre 2013 00:10:09 Andrew Dunstan a écrit : On 09/29/2013 07:09 PM, Andrew Dunstan wrote: On 09/03/2013 04:04 AM, Cédric Villemain wrote: Simple one, attached. I didn't document USE_VPATH, not sure how to explain that clearly. Just a remember that the doc is written

Re: [HACKERS] appendStringInfo vs appendStringInfoString

2013-09-30 Thread David Rowley
On Sat, Sep 28, 2013 at 9:44 PM, David Rowley dgrowle...@gmail.com wrote: I did some benchmarking earlier in the week for the new patch which was just commited to allow formatting in the log_line_prefix string. In version 0.4 of the patch there was some performance regression as I was doing

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Gilles Darold
Le 30/09/2013 05:43, Alvaro Herrera a écrit : Gilles Darold escribió: +else if (strcmp(param, numericlocale) == 0) +{ +if (popt-topt.numericLocale) +puts(_(Locale-adjusted numeric output (numericlocale) is on.)); +else +

Re: [HACKERS] Compression of full-page-writes

2013-09-30 Thread KONDO Mitsumasa
(2013/09/30 13:55), Amit Kapila wrote: On Mon, Sep 30, 2013 at 10:04 AM, Fujii Masao masao.fu...@gmail.com wrote: Yep, please! It's really helpful! OK! I test with single instance and synchronous replication constitution. By the way, you posted patch which is sync_file_range() WAL writing

Re: [HACKERS] proposal: lob conversion functionality

2013-09-30 Thread Heikki Linnakangas
On 12.08.2013 21:08, Pavel Stehule wrote: 2013/8/10 Tom Lanet...@sss.pgh.pa.us: Pavel Stehulepavel.steh...@gmail.com writes: I found so there are no simple API for working with LO from PL without access to file system. What? See lo_open(), loread(), lowrite(), etc. yes, so there are

Re: [HACKERS] proposal: lob conversion functionality

2013-09-30 Thread Pavel Stehule
2013/9/30 Heikki Linnakangas hlinnakan...@vmware.com On 12.08.2013 21:08, Pavel Stehule wrote: 2013/8/10 Tom Lanet...@sss.pgh.pa.us: Pavel Stehulepavel.stehule@gmail.**com pavel.steh...@gmail.com writes: I found so there are no simple API for working with LO from PL without access to

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Ian Lawrence Barwick
Hi 2013/9/30 Gilles Darold gilles.dar...@dalibo.com: (...) That's right, here is the patch modified with just a little change with your suggestion: if (popt-topt.numericLocale) printf(_(Locale-adjusted numeric output (%s) is on.\n), param);

Re: [HACKERS] Minmax indexes

2013-09-30 Thread Heikki Linnakangas
On 27.09.2013 21:43, Greg Stark wrote: On Fri, Sep 27, 2013 at 7:22 PM, Jim Nasbyj...@nasby.net wrote: Yeah, we obviously kept things simpler when adding forks in order to get the feature out the door. There's improvements that need to be made. But IMHO that's not reason to automatically

Re: [HACKERS] Minmax indexes

2013-09-30 Thread Heikki Linnakangas
What would it take to abstract the minmax indexes to allow maintaing a bounding box for points, instead of a plain min/max? Or for ranges. In other words, why is this restricted to b-tree operators? - Heikki -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make

Re: [HACKERS] pg_stat_statements: calls under-estimation propagation

2013-09-30 Thread Sameer Thakur
Also, for onlookers, I have changed this patch around to do the date-oriented stuff but want to look it over before stapling it up and sending it. If one cannot wait, one can look at https://github.com/fdr/postgres/tree/queryid. The squashed-version of that history contains a reasonable

Re: [HACKERS] [PATCH] pg_sleep(interval)

2013-09-30 Thread Vik Fearing
On 09/22/2013 02:17 PM, Fabien COELHO wrote: Hello, There is no pg_sleep(text) function and the cast is unknown-double precision. My mistake. As I understand it, pg_sleep('12') currently works and would not anymore once your patch is applied. That is the concern raised by Robert Haas.

Re: [HACKERS] record identical operator - Review

2013-09-30 Thread Kevin Grittner
Steve Singer st...@ssinger.info wrote: How about    To support matching of rows which include elements without a default B-tree operator class, the following operators are defined for composite type comparison: literal*=/, literal*lt;gt;/, literal*lt;/,

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-09-30 Thread Peter Eisentraut
On 9/27/13 3:00 PM, Merlin Moncure wrote: Attached is simplified patch that replaces the spinlock with a read barrier based on a suggestion made by Andres offlist. This patch doesn't apply. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your

Re: [HACKERS] Re: Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-09-30 Thread Heikki Linnakangas
On 29.09.2013 23:32, Nicholas White wrote: bms_add_member() is an accident waiting to happen I've attached a patch that makes it use repalloc as suggested You'll have to zero out the extended portion. I tried to demonstrate that by setting RANDOMIZE_ALLOCATED_MEMORY, but surprisingly

[HACKERS] Cmpact commits and changeset extraction

2013-09-30 Thread Andres Freund
Hi, Changeset extraction only works in the context of a single database but has to scan through xlog records from multiple databases. Most records are easy to skip because they contain the database in the relfilenode or are just not interesting for logical replication. The only exception are

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-30 Thread Robert Haas
On Fri, Sep 27, 2013 at 8:36 PM, Peter Geoghegan p...@heroku.com wrote: On Fri, Sep 27, 2013 at 5:36 AM, Robert Haas robertmh...@gmail.com wrote: I don't have another idea either. In fact, I'd go so far as to say that doing any third thing that's better than those two to any reasonable person

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Peter Eisentraut
Please remove the tabs from the SGML files. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-09-30 Thread Peter Eisentraut
On 9/28/13 3:05 AM, Amit Kapila wrote: Now as we have an agreement, I had updated patch for below left issues: Regression tests are failing. -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Re: Request for Patch Feedback: Lag Lead Window Functions Can Ignore Nulls

2013-09-30 Thread Alvaro Herrera
Nicholas White escribió: But even if we did decide to switch memory contexts on every call, it would still be much cleaner than this. I've removed all the bms_initalize code from the patch and am using this solution. As the partition memory is zero-initialised I just store a Bitmapset

Re: [HACKERS] Minmax indexes

2013-09-30 Thread David Fetter
On Mon, Sep 30, 2013 at 02:17:39PM +0300, Heikki Linnakangas wrote: What would it take to abstract the minmax indexes to allow maintaing a bounding box for points, instead of a plain min/max? Or for ranges. In other words, why is this restricted to b-tree operators? If I had to guess, I'd

Re: [HACKERS] Minmax indexes

2013-09-30 Thread Alvaro Herrera
David Fetter wrote: On Mon, Sep 30, 2013 at 02:17:39PM +0300, Heikki Linnakangas wrote: What would it take to abstract the minmax indexes to allow maintaing a bounding box for points, instead of a plain min/max? Or for ranges. In other words, why is this restricted to b-tree operators?

Re: [HACKERS] Wait free LW_SHARED acquisition

2013-09-30 Thread Bernd Helmle
--On 27. September 2013 09:57:07 +0200 Andres Freund and...@2ndquadrant.com wrote: Ok, was free: padding + 16 partitions: tps = 147884.648416 padding + 32 partitions: tps = 141777.841125 padding + 64 partitions: tps = 141561.539790 padding + 16 partitions + new lwlocks tps =

Re: [HACKERS] Wait free LW_SHARED acquisition

2013-09-30 Thread Andres Freund
Hi, On 2013-09-30 18:54:11 +0200, Bernd Helmle wrote: HEAD (default): tps = 181738.607247 (including connections establishing) tps = 182665.993063 (excluding connections establishing) HEAD (padding + 16 partitions + your lwlocks patch applied): tps = 269328.259833 (including

Re: [HACKERS] Minmax indexes

2013-09-30 Thread Heikki Linnakangas
On 30.09.2013 19:49, Alvaro Herrera wrote: David Fetter wrote: On Mon, Sep 30, 2013 at 02:17:39PM +0300, Heikki Linnakangas wrote: What would it take to abstract the minmax indexes to allow maintaing a bounding box for points, instead of a plain min/max? Or for ranges. In other words, why is

Re: [HACKERS] Cmpact commits and changeset extraction

2013-09-30 Thread Robert Haas
On Mon, Sep 30, 2013 at 10:50 AM, Andres Freund and...@2ndquadrant.com wrote: Changeset extraction only works in the context of a single database but has to scan through xlog records from multiple databases. Most records are easy to skip because they contain the database in the relfilenode or

Re: [HACKERS] pg_stat_statements: calls under-estimation propagation

2013-09-30 Thread Daniel Farina
On Sep 30, 2013 4:39 AM, Sameer Thakur samthaku...@gmail.com wrote: Also, for onlookers, I have changed this patch around to do the date-oriented stuff but want to look it over before stapling it up and sending it. If one cannot wait, one can look at

Re: ALTER SYSTEM SET command to change postgresql.conf parameters (RE: [HACKERS] Proposal for Allow postgresql.conf values to be changed via SQL [review])

2013-09-30 Thread Amit Kapila
On Mon, Sep 30, 2013 at 9:07 PM, Peter Eisentraut pete...@gmx.net wrote: On 9/28/13 3:05 AM, Amit Kapila wrote: Now as we have an agreement, I had updated patch for below left issues: Regression tests are failing. Thanks for informing. I am sorry for not running regression before sending

Re: [HACKERS] review: psql and pset without any arguments

2013-09-30 Thread Gilles Darold
Le 30/09/2013 17:35, Peter Eisentraut a écrit : Please remove the tabs from the SGML files. Done. I've also fixed the typo reported by Ian. Here is the attached v4 patch. Thanks a lot for your review. Regards, -- Gilles Darold Administrateur de bases de données http://dalibo.com -

Re: [HACKERS] pluggable compression support

2013-09-30 Thread Huchev
I've been following this issue these last few months. Having the latest and best compressors built-in is a fashionable features these days. And for good reasons. I'm quite amazed that this issue is still considered a legal risk. To put this in perspective, the *whole world* is using LZ4 by now.

Re: [HACKERS] Cmpact commits and changeset extraction

2013-09-30 Thread Andres Freund
On 2013-09-30 14:22:22 -0400, Robert Haas wrote: On Mon, Sep 30, 2013 at 10:50 AM, Andres Freund and...@2ndquadrant.com wrote: Changeset extraction only works in the context of a single database but has to scan through xlog records from multiple databases. Most records are easy to skip

Re: [HACKERS] logical changeset generation v6.1

2013-09-30 Thread Kevin Grittner
Andres Freund and...@2ndquadrant.com wrote: Attached you can find an updated version of the series taking in some of the review comments I don't know whether this is related to the previously-reported build problems, but when I apply each patch in turn, with make -j4 world make check-world

Re: [HACKERS] Patch for fast gin cache performance improvement

2013-09-30 Thread Ian Link
Hi Etsuro, Sorry for the delay but I have been very busy with work. I have been away from postgres for a while, so I will need a little time to review the code and make sure I give you an informed response. I'll get back to you as soon as I am able. Thanks for understanding. Ian Link

Re: [HACKERS] Wait free LW_SHARED acquisition

2013-09-30 Thread Bernd Helmle
--On 30. September 2013 19:00:06 +0200 Andres Freund and...@2ndquadrant.com wrote: HEAD (default): tps = 181738.607247 (including connections establishing) tps = 182665.993063 (excluding connections establishing) HEAD (padding + 16 partitions + your lwlocks patch applied): tps =

Re: [HACKERS] pgbench - exclude pthread_create() from connection start timing

2013-09-30 Thread Noah Misch
On Thu, Sep 26, 2013 at 01:41:01PM +0200, Fabien COELHO wrote: I don't get it; why is taking the time just after pthread_create() more sane than taking it just before pthread_create()? Thread create time seems to be expensive as well, maybe up 0.1 seconds under some conditions (?). Under

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-30 Thread Peter Geoghegan
On Mon, Sep 30, 2013 at 8:32 AM, Robert Haas robertmh...@gmail.com wrote: I doubt that any change to HeapTupleSatisfiesMVCC() will be acceptable. This feature needs to restrain itself to behavior changes that only affect users of this feature, I think. I agree with the principle of what

Re: [HACKERS] dynamic shared memory

2013-09-30 Thread Noah Misch
On Tue, Sep 24, 2013 at 08:58:36AM +0530, Amit Kapila wrote: On Tue, Sep 24, 2013 at 12:32 AM, Noah Misch n...@leadboat.com wrote: I don't know whether writing it as binary will help or hurt that situation. If nothing else, binary gives you one less variation to think about when studying

Re: [HACKERS] [PERFORM] Cpu usage 100% on slave. s_lock problem.

2013-09-30 Thread Ants Aasma
On Sat, Sep 28, 2013 at 12:53 AM, Andres Freund and...@2ndquadrant.com wrote: What confuses me is that pg_read_barrier() is just a compiler barrier on x86[-64] in barrier.h. According to my knowledge it needs to be an lfence or the full barrier? The linked papers from Paul McKenney - which are

Re: [HACKERS] INSERT...ON DUPLICATE KEY LOCK FOR UPDATE

2013-09-30 Thread Peter Geoghegan
On Mon, Sep 30, 2013 at 3:45 PM, Peter Geoghegan p...@heroku.com wrote: If you think it's a bit odd that we lock every value while the user essentially has one constraint in mind when writing their DML, consider: I should add to that list: 4) Locking all the values at once is necessary for

Re: [HACKERS] Freezing without write I/O

2013-09-30 Thread Ants Aasma
Just found this in my drafts folder. Sorry for the late response. On Fri, Sep 20, 2013 at 3:32 PM, Robert Haas robertmh...@gmail.com wrote: I am entirely unconvinced that we need this. Some people use acquire + release fences, some people use read + write fences, and there are all

Re: [HACKERS] Suggestion: Issue warning when calling SET TRANSACTION outside transaction block

2013-09-30 Thread Bruce Momjian
On Sun, Sep 29, 2013 at 11:40:51AM +0530, Amit Kapila wrote: Shouldn't we do it for Set Constraints as well? Oh, very good point. I missed that one. Updated patch attached. I am glad you are seeing things I am not. :-) 1. The function set_config also needs similar functionality, else

Re: [HACKERS] record identical operator - Review

2013-09-30 Thread Bruce Momjian
On Fri, Sep 27, 2013 at 03:34:20PM -0700, Kevin Grittner wrote: The arguments for this patch are * We want the materialized view to return the same value as would be returned if the query were executed directly.  This not only means that the values should be the same according to a

Re: [HACKERS] Completing PL support for Event Triggers

2013-09-30 Thread Peter Eisentraut
Review of the PL/Tcl part: The functionality looks OK. There are some cosmetic issues. If those are addressed, I think this can be committed. In the documentation, Event Triggers - Event triggers. For the example in the documentation, please show the output, that is, what the trigger outputs.

[HACKERS] Documentation for SET var_name FROM CURRENT

2013-09-30 Thread Amit Kapila
While reading documentation for SET command, I observed that FROM CURRENT syntax and its description is missing from SET command's syntax page (http://www.postgresql.org/docs/devel/static/sql-set.html). Do you think that documentation should be updated for the same or is there any reason why it

Re: [HACKERS] Documentation for SET var_name FROM CURRENT

2013-09-30 Thread David Johnston
Amit Kapila-2 wrote While reading documentation for SET command, I observed that FROM CURRENT syntax and its description is missing from SET command's syntax page (http://www.postgresql.org/docs/devel/static/sql-set.html). Do you think that documentation should be updated for the same or is