[HACKERS] SQL:2011 features

2012-01-02 Thread Simon Riggs
Are there any features in SQL:2011 that we should be considering for 9.2? We seem quite close on temporal stuff, so maybe just a little syntax work? Not sure and not planning anything myself, just checking. --  Simon Riggs   http://www.2ndQuadrant.com/  PostgreSQL Development,

Re: [HACKERS] sorting operators in pg_dump

2012-01-02 Thread Dimitri Fontaine
Peter Eisentraut pete...@gmx.net writes: order, say, prefix, postfix, infix. (It might be surprising that something like this is necessary, but it happens. ip4r for example contains operators with different fixnesses (fixities?).) I think it's called “arity” :) Regards, -- Dimitri

Re: [HACKERS] [RFC] grants vs. inherited tables

2012-01-02 Thread Dimitri Fontaine
Marko Kreen mark...@gmail.com writes: I tried to generalize a function that creates partitions for a table and found out it's impossible to do it for grants. Basically, what I want is a child table that takes it's grants from parent table. IMHO quite reasonable request. But I don't see a

[HACKERS] patch: ALTER TABLE IF EXISTS

2012-01-02 Thread Pavel Stehule
Hello this is relative simple patch that add possibility to skip noexisting tables. It is necessary for silent cleaning when dump is loaded. Regards Pavel Stehule *** ./doc/src/sgml/ref/alter_table.sgml.orig 2011-12-01 22:47:20.0 +0100 --- ./doc/src/sgml/ref/alter_table.sgml 2012-01-02

Re: [HACKERS] patch: ALTER TABLE IF EXISTS

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 1:11 PM, Pavel Stehule pavel.steh...@gmail.com wrote: this is relative simple patch that add possibility to skip noexisting tables. It is necessary for silent cleaning when dump is loaded. Agreed, nice simple and uncontentious patch. All good apart from two minor

Re: [HACKERS] patch: ALTER TABLE IF EXISTS

2012-01-02 Thread Tomas Vondra
On 2 Leden 2012, 14:11, Pavel Stehule wrote: Hello this is relative simple patch that add possibility to skip noexisting tables. It is necessary for silent cleaning when dump is loaded. Just a curious question - what use case is solved by this? Under what circumstances you get an ALTER TABLE

Re: [HACKERS] patch: ALTER TABLE IF EXISTS

2012-01-02 Thread Pavel Stehule
Hello 2012/1/2 Tomas Vondra t...@fuzzy.cz: On 2 Leden 2012, 14:11, Pavel Stehule wrote: Hello this is relative simple patch that add possibility to skip noexisting tables. It is necessary for silent cleaning when dump is loaded. Just a curious question - what use case is solved by this?

Re: [HACKERS] controlling the location of server-side SSL files

2012-01-02 Thread Magnus Hagander
On Jan 2, 2012 5:33 AM, Peter Eisentraut pete...@gmx.net wrote: I think I would like to have a set of GUC parameters to control the location of the server-side SSL files. In a setup that has all the other configuration files under /etc, the SSL files ought to go there as well. (For

Re: [HACKERS] Review of VS 2010 support patches

2012-01-02 Thread Magnus Hagander
On Jan 2, 2012 12:02 AM, Andrew Dunstan and...@dunslane.net wrote: On 12/31/2011 06:10 PM, Brar Piening wrote: Brar Piening wrote: Andrew Dunstan wrote: Can you narrow down exactly what in that commit broke VS 2010? Are there any compiler warnings? I was able to nail down the problem.

Re: [HACKERS] alternate psql file locations

2012-01-02 Thread Andrew Dunstan
On 01/01/2012 04:05 PM, Andrew Dunstan wrote: On 12/31/2011 04:26 PM, Aidan Van Dyk wrote: On Sat, Dec 31, 2011 at 3:17 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Andrew Dunstan's message of sáb dic 31 12:52:02 -0300 2011: It's not a big thing, but I just found

Re: [HACKERS] patch: ALTER TABLE IF EXISTS

2012-01-02 Thread Pavel Stehule
Hello here is updated patch Regards Pavel 2012/1/2 Simon Riggs si...@2ndquadrant.com: On Mon, Jan 2, 2012 at 1:11 PM, Pavel Stehule pavel.steh...@gmail.com wrote: this is relative simple patch that add possibility to skip noexisting tables. It is necessary for silent cleaning when dump is

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Tue, Dec 20, 2011 at 4:34 PM, Tom Lane t...@sss.pgh.pa.us wrote: Noah Misch n...@leadboat.com writes: On Mon, Dec 19, 2011 at 11:13:57PM -0500, Tom Lane wrote: ... but this performance test seems to me to be entirely misguided, because it's testing a situation that isn't going to occur much

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Assuming that is the right approach, some timings Um ... timings of what? regards, tom lane -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Review of VS 2010 support patches

2012-01-02 Thread Andrew Dunstan
On 01/02/2012 09:51 AM, Magnus Hagander wrote: On Jan 2, 2012 12:02 AM, Andrew Dunstan and...@dunslane.net mailto:and...@dunslane.net wrote: On 12/31/2011 06:10 PM, Brar Piening wrote: Brar Piening wrote: Andrew Dunstan wrote: Can you narrow down exactly what in that commit broke

Re: [HACKERS] our buffer replacement strategy is kind of lame

2012-01-02 Thread Simon Riggs
On Sun, Aug 14, 2011 at 7:33 PM, Robert Haas robertmh...@gmail.com wrote: Simon is proposing to bound the really bad case where you flip through the entire ring multiple times before you find a buffer, and that may well be worth doing.  But I think even scanning 100 buffers every time you

Re: [HACKERS] our buffer replacement strategy is kind of lame

2012-01-02 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: Does anyone have a better idea for reducing BufFreelistLock contention? Something simple that will work for 9.2? Get rid of the freelist? Once shared buffers are full, it's just about useless anyway. But you'd need to think about the test cases that

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 5:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: Assuming that is the right approach, some timings Um ... timings of what? Apologies for being terse, no problem to give a full explanation. You suggested earlier that putting calls to

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Noah Misch
On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot, initialised at the start of each scan iff SnapshotNow is passed as the scan's snapshot. It's fairly brief but seems to do the trick. That's a neat trick. However, if you start

Re: [HACKERS] SQL:2011 features

2012-01-02 Thread Peter Eisentraut
On mån, 2012-01-02 at 09:33 +, Simon Riggs wrote: Are there any features in SQL:2011 that we should be considering for 9.2? We seem quite close on temporal stuff, so maybe just a little syntax work? I am aware of this piece on what's new in SQL:2011:

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot, initialised at the start of each scan iff SnapshotNow is passed as the scan's snapshot. It's fairly brief but

Re: [HACKERS] SQL:2011 features

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 6:47 PM, Peter Eisentraut pete...@gmx.net wrote: On mån, 2012-01-02 at 09:33 +, Simon Riggs wrote: Are there any features in SQL:2011 that we should be considering for 9.2? We seem quite close on temporal stuff, so maybe just a little syntax work? I am aware of

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot, That's a neat trick.  However, if you start a new SnapshotNow scan

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 5:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um ... timings of what? Apologies for being terse, no problem to give a full explanation. But you still didn't. I wanted to know what those numbers were and how they show that there's

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Noah Misch
On Mon, Jan 02, 2012 at 06:41:31PM +, Simon Riggs wrote: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot, initialised at the start of each scan iff

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Alvaro Herrera
Excerpts from Noah Misch's message of lun ene 02 16:25:25 -0300 2012: On Mon, Jan 02, 2012 at 06:41:31PM +, Simon Riggs wrote: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes

Re: [HACKERS] backup_label during crash recovery: do we know how to solve it?

2012-01-02 Thread Magnus Hagander
On Sun, Jan 1, 2012 at 23:09, Daniel Farina dan...@heroku.com wrote: On Sun, Jan 1, 2012 at 6:13 AM, Magnus Hagander mag...@hagander.net wrote: It also doesn't affect backups taken through pg_basebackup - but I guess you have good reasons for not being able to use that? Parallel

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Noah Misch
On Mon, Jan 02, 2012 at 04:33:28PM -0300, Alvaro Herrera wrote: Excerpts from Noah Misch's message of lun ene 02 16:25:25 -0300 2012: On Mon, Jan 02, 2012 at 06:41:31PM +, Simon Riggs wrote: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 7:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot,

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 7:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 5:17 PM, Tom Lane t...@sss.pgh.pa.us wrote: Um ... timings of what? Apologies for being terse, no problem to give a full explanation. But you still didn't.  I

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Alvaro Herrera
Excerpts from Noah Misch's message of lun ene 02 16:39:09 -0300 2012: On Mon, Jan 02, 2012 at 04:33:28PM -0300, Alvaro Herrera wrote: Uh, I thought detoasting had its own visibility test function .. I mean, otherwise, what is HeapTupleSatisfiesToast for? The SnapshotNow scan was

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 7:49 PM, Alvaro Herrera alvhe...@commandprompt.com wrote: Excerpts from Noah Misch's message of lun ene 02 16:39:09 -0300 2012: On Mon, Jan 02, 2012 at 04:33:28PM -0300, Alvaro Herrera wrote: Uh, I thought detoasting had its own visibility test function .. I mean,

Re: [HACKERS] our buffer replacement strategy is kind of lame

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 5:41 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: Does anyone have a better idea for reducing BufFreelistLock contention? Something simple that will work for 9.2? Get rid of the freelist?  Once shared buffers are full, it's just about

Re: [HACKERS] SQL:2011 features

2012-01-02 Thread Pavel Stehule
Hello 2012/1/2 Peter Eisentraut pete...@gmx.net: On mån, 2012-01-02 at 09:33 +, Simon Riggs wrote: Are there any features in SQL:2011 that we should be considering for 9.2? trim_array can be simply implemented for one dim array. I am not sure about semantic for multidim arrays. Regards

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Tom Lane
Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 7:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: But you still didn't.  I wanted to know what those numbers were and how they show that there's not a performance regression.  Presumably you meant that some were before and some after,

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 8:20 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 7:14 PM, Tom Lane t...@sss.pgh.pa.us wrote: But you still didn't.  I wanted to know what those numbers were and how they show that there's not a performance

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 7:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot,

[HACKERS] Re: [COMMITTERS] pgsql: pg_regress: Replace exit_nicely() with exit() plus atexit() hook

2012-01-02 Thread Peter Eisentraut
On mån, 2012-01-02 at 15:55 -0500, Andrew Dunstan wrote: On 01/02/2012 03:12 PM, Peter Eisentraut wrote: pg_regress: Replace exit_nicely() with exit() plus atexit() hook This appears to have broken the buildfarm. I think you mean it has caused the build to fail on some buildfarm

Re: [HACKERS] controlling the location of server-side SSL files

2012-01-02 Thread Peter Eisentraut
On mån, 2012-01-02 at 15:47 +0100, Magnus Hagander wrote: Were you thinking one option pointing to a directory or one option per file? One option per file: ssl_cert_file ssl_key_file ssl_ca_file ssl_crl_file This is very similar to the configuration of, for example, Apache, Dovecot, Postfix,

Re: [HACKERS] backup_label during crash recovery: do we know how to solve it?

2012-01-02 Thread Dimitri Fontaine
Magnus Hagander mag...@hagander.net writes: Well, that certainly goes to enough detail to agree that no, that can't be done with only minor modifications to pg_basebackup. Nor could it be done with your python program talking directly to the walsender backend and get around it that way. But

[HACKERS] Re: [COMMITTERS] pgsql: pg_regress: Replace exit_nicely() with exit() plus atexit() hook

2012-01-02 Thread Andrew Dunstan
On 01/02/2012 04:37 PM, Peter Eisentraut wrote: On mån, 2012-01-02 at 15:55 -0500, Andrew Dunstan wrote: On 01/02/2012 03:12 PM, Peter Eisentraut wrote: pg_regress: Replace exit_nicely() with exit() plus atexit() hook This appears to have broken the buildfarm. I think you mean it has

Re: [HACKERS] SQL:2011 features

2012-01-02 Thread David E. Wheeler
On Jan 2, 2012, at 10:47 AM, Peter Eisentraut wrote: * Named arguments in function calls: done since PG 9.0; and we're phasing out the = operator. We don’t support `=` for params yet, right? Still just `:=`? David -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 9:17 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Jan 2, 2012 at 7:13 PM, Tom Lane t...@sss.pgh.pa.us wrote: Simon Riggs si...@2ndquadrant.com writes: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +,

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Simon Riggs
On Mon, Jan 2, 2012 at 6:41 PM, Simon Riggs si...@2ndquadrant.com wrote: On Mon, Jan 2, 2012 at 6:06 PM, Noah Misch n...@leadboat.com wrote: On Mon, Jan 02, 2012 at 05:09:16PM +, Simon Riggs wrote: Attached patch makes SnapshotNow into an MVCC snapshot, initialised at the start of each

Re: [HACKERS] ALTER TABLE lock strength reduction patch is unsafe

2012-01-02 Thread Noah Misch
On Tue, Jan 03, 2012 at 01:18:41AM +, Simon Riggs wrote: Just for the record, yes we do run multiple catalog scans in some parts of the code. So I can see how we might trigger 4 nested scans, using cache replacement while scanning, so best assume more, with no guarantee of them being

Re: [HACKERS] controlling the location of server-side SSL files

2012-01-02 Thread Tom Lane
Peter Eisentraut pete...@gmx.net writes: On mån, 2012-01-02 at 15:47 +0100, Magnus Hagander wrote: Were you thinking one option pointing to a directory or one option per file? One option per file: That seems like serious overkill. Why not one option specifying the directory? What use-case

Re: [HACKERS] spinlocks on powerpc

2012-01-02 Thread Robert Haas
On Mon, Jan 2, 2012 at 12:03 AM, Tom Lane t...@sss.pgh.pa.us wrote: (It's depressing that these numbers have hardly moved since August --- at least on this test, the work that Robert's done has not made any difference.) Most of the scalability work that's been committed since August has really