Re: [HACKERS] RFC: Making TRUNCATE more MVCC-safe

2012-03-03 Thread Simon Riggs
On Sat, Feb 11, 2012 at 4:46 AM, Noah Misch n...@leadboat.com wrote: But I have to admit I'm intrigued by the idea of extending this to other cases, if there's a reasonable way to do that.  For example, if we could fix things up so that we don't see a table at all if it was created after we

Re: [HACKERS] COPY with hints, rebirth

2012-03-03 Thread Simon Riggs
On Fri, Mar 2, 2012 at 8:58 PM, Noah Misch n...@leadboat.com wrote: On Fri, Mar 02, 2012 at 08:46:45AM +, Simon Riggs wrote: On Thu, Mar 1, 2012 at 8:49 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com wrote: It's still broken: [BEGIN;TRUNCATE;SAVEPOINT;COPY;ROLLBACK TO] So

Re: [HACKERS] review: CHECK FUNCTION statement

2012-03-03 Thread Petr Jelínek
On 03/03/2012 02:24 AM, Alvaro Herrera wrote: question: how attached you are to the current return format for CHECK FUNCTION? check function f1(); CHECK FUNCTION - In function: 'f1()'

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Dimitri Fontaine
Robert Haas robertmh...@gmail.com writes:       CREATE COMMAND TRIGGER name ... properties ...;       DROP COMMAND TRIGGER name; full stop.  If you want to run the same trigger function on some more commands, add another trigger name. +1 +1. I suggested the same thing a while back.

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Thom Brown
On 3 March 2012 13:45, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Robert Haas robertmh...@gmail.com writes:       CREATE COMMAND TRIGGER name ... properties ...;       DROP COMMAND TRIGGER name; full stop.  If you want to run the same trigger function on some more commands, add another

Re: [HACKERS] [v9.2] Add GUC sepgsql.client_label

2012-03-03 Thread Yeb Havinga
On 2012-02-24 17:25, Yeb Havinga wrote: On 2012-02-23 12:17, Kohei KaiGai wrote: 2012/2/20 Yeb Havingayebhavi...@gmail.com: On 2012-02-05 10:09, Kohei KaiGai wrote: The attached part-1 patch moves related routines from hooks.c to label.c because of references to static variables. The part-2

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: And having tried building it, it appears to fail. Sorry about that, my compiler here was happy building the source (and I had been doing make clean install along the way) and make installcheck passed, here. Now fixed on my github's branch, including docs. I'll

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Dimitri Fontaine
Thom Brown t...@linux.com writes: problem. It was the DROP COMMAND TRIGGER statement that garnered comment, as it makes more sense to drop the entire trigger than individual commands for that trigger. What you're saying here is that a single command could have more than one command attached

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Thom Brown
On 3 March 2012 14:26, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: And having tried building it, it appears to fail. Sorry about that, my compiler here was happy building the source (and I had been doing make clean install along the way) and make

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Thom Brown
On 3 March 2012 14:34, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Thom Brown t...@linux.com writes: problem.  It was the DROP COMMAND TRIGGER statement that garnered comment, as it makes more sense to drop the entire trigger than individual commands for that trigger. What you're saying

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Kevin Grittner
Thom Brown wrote: Dimitri Fontaine wrote: Thom Brown writes: problem. It was the DROP COMMAND TRIGGER statement that garnered comment, as it makes more sense to drop the entire trigger than individual commands for that trigger. What you're saying here is that a single command could have

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Thom Brown
On 3 March 2012 16:12, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Thom Brown  wrote: Dimitri Fontaine  wrote: Thom Brown  writes: problem. It was the DROP COMMAND TRIGGER statement that garnered comment, as it makes more sense to drop the entire trigger than individual commands for

Re: [HACKERS] Collect frequency statistics for arrays

2012-03-03 Thread Tom Lane
... BTW, could you explain exactly how that Fill histogram by hashtab loop works? It's way too magic for my taste, and does in fact have bugs in the currently submitted patch. I've reworked it to this: /* Fill histogram by hashtab. */ delta = analyzed_rows - 1;

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Kevin Grittner
Thom Brown wrote: Don't you mean shouldn't need to specify more than the trigger name? You are right, that's what I meant to say. -Kevin -- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription:

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Dimitri Fontaine
Kevin Grittner kevin.gritt...@wicourts.gov writes: Right. What I thought I was agreeing with was the notion that you should need to specify more than the trigger name to drop the trigger. Rather like how you can create a trigger AFTER INSERT OR UPDATE OR DELETE, but you don't need to specify

Re: [HACKERS] review: CHECK FUNCTION statement

2012-03-03 Thread Alvaro Herrera
Excerpts from Petr Jelínek's message of sáb mar 03 10:26:04 -0300 2012: On 03/03/2012 02:24 AM, Alvaro Herrera wrote: question: how attached you are to the current return format for CHECK FUNCTION? check function f1(); CHECK FUNCTION

Re: [HACKERS] COPY with hints, rebirth

2012-03-03 Thread Simon Riggs
On Sat, Mar 3, 2012 at 1:14 PM, Simon Riggs si...@2ndquadrant.com wrote: On Fri, Mar 2, 2012 at 8:58 PM, Noah Misch n...@leadboat.com wrote: On Fri, Mar 02, 2012 at 08:46:45AM +, Simon Riggs wrote: On Thu, Mar 1, 2012 at 8:49 PM, Heikki Linnakangas heikki.linnakan...@enterprisedb.com

Re: [HACKERS] Command Triggers, patch v11

2012-03-03 Thread Thom Brown
On 3 March 2012 19:25, Dimitri Fontaine dimi...@2ndquadrant.fr wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Right.  What I thought I was agreeing with was the notion that you should need to specify more than the trigger name to drop the trigger.  Rather like how you can create a

[HACKERS] Patch: improve selectivity estimation for IN/NOT IN

2012-03-03 Thread Daniele Varrazzo
Hello, the attached patch improves the array selectivity estimation for = ANY and ALL, hence for the IN/NOT IN operators, to avoid the shortcoming described in http://archives.postgresql.org/pgsql-performance/2012-03/msg6.php. Cheers, -- Daniele From

Re: [HACKERS] review: CHECK FUNCTION statement

2012-03-03 Thread Alvaro Herrera
Excerpts from Pavel Stehule's message of sáb mar 03 02:25:52 -0300 2012: Hello It wasn't all that difficult -- see below.  While at this, I have a question: how attached you are to the current return format for CHECK FUNCTION? TupleDescr is created by language creator. This ensure

Re: [HACKERS] COPY with hints, rebirth

2012-03-03 Thread Simon Riggs
On Fri, Mar 2, 2012 at 11:15 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Simon Riggs si...@2ndquadrant.com wrote: I like Marti's idea. At present, making his idea work could easily mean checksums sink, so not sure whether to attempt to make that work in detail. For my part,

[HACKERS] tuplesort memory usage: grow_memtuples

2012-03-03 Thread Jeff Janes
When sorting small tuples, the memtuples array can use a substantial fraction of the total per-tuple memory used. (In the case of pass by value, it is all of it) The way it grows leads to sub-optimal memory usage. In one case, if it can grow by 1.999 x, but not by 2 x, we just give up and use

Re: [HACKERS] COPY with hints, rebirth

2012-03-03 Thread Kevin Grittner
Simon Riggs wrote: Kevin Grittner wrote: Simon Riggs wrote: I like Marti's idea. At present, making his idea work could easily mean checksums sink For my part, improving bulk load performance and TRUNCATE transactional semantics would trump checksums It doesn't look like it needs

[HACKERS] poll: CHECK TRIGGER?

2012-03-03 Thread Alvaro Herrera
Hi, Pavel's patch for CHECK FUNCTION is adding another command besides that one, which is CHECK TRIGGER. The idea behind this is that you give it the relation to which the trigger is attached in addition to the trigger name, and it checks the function being called by that trigger. IMHO having

Re: [HACKERS] review: CHECK FUNCTION statement

2012-03-03 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of sáb mar 03 16:54:19 -0300 2012: Excerpts from Pavel Stehule's message of sáb mar 03 02:25:52 -0300 2012: 3. THE ARE NOT CARET - this is really important I am not sure about the caret thingy -- mainly because I don't think it works all that well. I

Re: [HACKERS] Memory usage during sorting

2012-03-03 Thread Jeff Janes
On Sun, Feb 26, 2012 at 7:20 PM, Robert Haas robertmh...@gmail.com wrote: On Sat, Feb 25, 2012 at 4:31 PM, Jeff Janes jeff.ja...@gmail.com wrote: I'm not sure about the conclusion, but given this discussion, I'm inclined to mark this Returned with Feedback. OK, thanks.  Does anyone have

Re: [HACKERS] review: CHECK FUNCTION statement

2012-03-03 Thread Alvaro Herrera
Excerpts from Alvaro Herrera's message of sáb mar 03 17:56:23 -0300 2012: Excerpts from Alvaro Herrera's message of sáb mar 03 16:54:19 -0300 2012: Excerpts from Pavel Stehule's message of sáb mar 03 02:25:52 -0300 2012: 3. THE ARE NOT CARET - this is really important I am not sure

Re: [HACKERS] archive_keepalive_command

2012-03-03 Thread Jeff Janes
On Sun, Jan 15, 2012 at 5:52 PM, Simon Riggs si...@2ndquadrant.com wrote: On Fri, Dec 16, 2011 at 3:01 PM, Simon Riggs si...@2ndquadrant.com wrote: archive_command and restore_command describe how to ship WAL files to/from an archive. When there is nothing to ship, we delay sending WAL files.

Re: [HACKERS] Collect frequency statistics for arrays

2012-03-03 Thread Tom Lane
Alexander Korotkov aekorot...@gmail.com writes: [ array statistics patch ] I've committed this after a fair amount of editorialization. There are still some loose ends to deal with, but I felt it was ready to go into the tree for wider testing. The main thing I changed that wasn't in the

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-03 Thread Tom Lane
Alvaro Herrera alvhe...@alvh.no-ip.org writes: Pavel's patch for CHECK FUNCTION is adding another command besides that one, which is CHECK TRIGGER. The idea behind this is that you give it the relation to which the trigger is attached in addition to the trigger name, and it checks the

Re: [HACKERS] poll: CHECK TRIGGER?

2012-03-03 Thread Alvaro Herrera
Excerpts from Tom Lane's message of sáb mar 03 23:00:26 -0300 2012: Alvaro Herrera alvhe...@alvh.no-ip.org writes: Pavel's patch for CHECK FUNCTION is adding another command besides that one, which is CHECK TRIGGER. The idea behind this is that you give it the relation to which the

Re: [HACKERS] RFC: Making TRUNCATE more MVCC-safe

2012-03-03 Thread Marti Raudsepp
On Sat, Mar 3, 2012 at 14:53, Simon Riggs si...@2ndquadrant.com wrote: Thanks Noah for drawing attention to this thread. I hadn't been watching. As you say, this work would allow me to freeze rows at load time and avoid the overhead of hint bit setting, which avoids performance issues from

Re: [HACKERS] Patch: improve selectivity estimation for IN/NOT IN

2012-03-03 Thread Tom Lane
Daniele Varrazzo daniele.varra...@gmail.com writes: the attached patch improves the array selectivity estimation for = ANY and ALL, hence for the IN/NOT IN operators, to avoid the shortcoming described in http://archives.postgresql.org/pgsql-performance/2012-03/msg6.php. In connection

Re: [HACKERS] Patch: improve selectivity estimation for IN/NOT IN

2012-03-03 Thread Daniele Varrazzo
On Sun, Mar 4, 2012 at 2:38 AM, Tom Lane t...@sss.pgh.pa.us wrote: Daniele Varrazzo daniele.varra...@gmail.com writes: the attached patch improves the array selectivity estimation for = ANY and ALL, hence for the IN/NOT IN operators, to avoid the shortcoming described in

Re: [HACKERS] Parameterized-path cost comparisons need some work

2012-03-03 Thread Tom Lane
Robert Haas robertmh...@gmail.com writes: On Wed, Feb 29, 2012 at 6:01 PM, Tom Lane t...@sss.pgh.pa.us wrote: (... thinks some more ...) No, that doesn't get us there, because that doesn't establish that a more-parameterized path produces fewer rows than some path that requires less

[HACKERS] Our regex vs. POSIX on longest match

2012-03-03 Thread Brendan Jurd
Hello folks, I am in the process of accelerating down the rabbit hole of regex internals. Something that came up during my reading, is that a POSIX compliant regex engine ought to always prefer the longest possible match, when multiple matches are possible beginning from the same location in the

Re: [HACKERS] Our regex vs. POSIX on longest match

2012-03-03 Thread Tom Lane
Brendan Jurd dire...@gmail.com writes: I am in the process of accelerating down the rabbit hole of regex internals. Something that came up during my reading, is that a POSIX compliant regex engine ought to always prefer the longest possible match, when multiple matches are possible beginning