Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Luke Lonergan
Myron, First, this sounds really good! On 4/8/06 9:54 PM, "Myron Scott" <[EMAIL PROTECTED]> wrote: > I added a little hack to the buffer > code to force > pages read into the buffer to stay at the back of the free buffer list > until the master > thread has had a chance to use it. This is the

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Myron Scott
Gregory Maxwell wrote: We should consider true parallel execution and overlapping execution with I/O as distinct cases. For example, one case made in this thread involved bursty performance with seqscans presumably because the I/O was stalling while processing was being performed. In general th

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Christopher Kings-Lynne
I need a rownum column, like Oracle. I have searched the mailing lists and I don't see a satisfactory solution, so I was wondering write a UDF to implement it, the requirements are: +1 I would _love_ to see rownums in PostgreSQL :) Chris ---(end of broadcast)-

Re: [HACKERS] Get explain output of postgresql in Tables

2006-04-08 Thread Bruce Momjian
Jim C. Nasby wrote: > On Fri, Mar 24, 2006 at 07:54:09AM +0900, Satoshi Nagayasu wrote: > > Jim C. Nasby wrote: > > > Structure for the human-consumable output or for something that would be > > > machine-parsed? ISTM it would be best to keep the current output as-is, > > > and provide some other m

[HACKERS] "Fat" binaries for OS X (was Re: [GENERAL] Postgres Library natively available for Mac OSX Intel?)

2006-04-08 Thread Tom Lane
Philipp Ott <[EMAIL PROTECTED]> writes: > Currently 8.1.3 compiles and runs just fine on OSX 10.4.6 + XCode > 2.2.1, but generates binaries just for the current host architecture. > Now when I add -arch i386 -arch ppc to CFLAGS and LDFLAGS for > configure, then it compiles everything just fin

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Luke Lonergan
Greg, On 4/8/06 5:43 PM, "Gregory Maxwell" <[EMAIL PROTECTED]> wrote: > For example, one case made in this thread involved bursty performance > with seqscans presumably because the I/O was stalling while processing > was being performed. In general this can be avoided without parallel > executio

Re: [HACKERS] FOUND not set by EXECUTE?

2006-04-08 Thread David Wheeler
On Apr 8, 2006, at 14:38, Tom Lane wrote: It *is* documented: the manual lists the statements that affect FOUND, and EXECUTE is not among them. Whether it should be is another question, but that's a definition disagreement (a/k/a enhancement proposal) not a bug. I think that: a. It should be

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Gregory Maxwell
On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote: > This is exactly the bit of optimism I was questioning. We've already > been sweating blood trying to reduce multiprocessor contention on data > structures in which collisions ought to be avoidable (ie, buffer arrays > where you hope not everyone is

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Jonah H. Harris
On 4/8/06, David Fetter <[EMAIL PROTECTED]> wrote: > Sadly, ANSI did just that. Thanks for pointing that out... I'd been using LIMIT/OFFSET for so long, I totally forgot about the standard :( -- Jonah H. Harris, Database Internals Architect EnterpriseDB Corporation 732.331.1324

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Jonah H. Harris
On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote: > passing large volumes of data between different processes is going > to incur quite a lot of locking overhead, pipeline stalls for cache line > transfers, etc, etc, because heavy contention for the transfer buffer is > simply not going to be avoidabl

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread David Fetter
On Sat, Apr 08, 2006 at 02:02:53PM -0400, Jan Wieck wrote: > Someone correct me if I'm wrong, but I was allways under the impression > that Oracle's ROWNUM is a thing attached to a row in the final result > set, whatever (possibly random) order that happens to have. Now a) this > is something th

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Tom Lane
"Jonah H. Harris" <[EMAIL PROTECTED]> writes: > On 4/8/06, Markus Schiltknecht <[EMAIL PROTECTED]> wrote: >> Ehm.. which additional I/O cost? Or do you count inter-process >> communication to I/O? > Inter-process will add a minimal amount, but if it's done correctly, > you'll still end up ahead.

Re: [HACKERS] FOUND not set by EXECUTE?

2006-04-08 Thread Tom Lane
David Wheeler <[EMAIL PROTECTED]> writes: > Note that FOUND is false, but the ROW_COUNT fetched by GET > DIAGNOSTICS is set to 1. So shouldn't FOUND be true? Or does it just > not work with EXECUTE and need to be documented as such? Or am I just > missing something obvious? It *is* documente

Re: [HACKERS] Summer of Code -- mentors needed as well

2006-04-08 Thread Simon Riggs
On Sat, 2006-04-08 at 12:54 -0700, Josh Berkus wrote: > As well as projects and students, we also will need mentors for Summer of > Code > projects. I'm not sure exactly what time commitment being a mentor involves, > but I imagine that it's at least a couple dozen hours over the summer. > V

[HACKERS] FOUND not set by EXECUTE?

2006-04-08 Thread David Wheeler
I had expected the FOUND PL/pgSQL variable to be set by an UPDATE statement executed by an EXECUTE statement, but it doesn't appear to work: try=# drop table try; DROP TABLE try=# CREATE TABLE try ( try(# id integer try(# ); CREATE TABLE try=# INSERT INTO try VALUES (1); INSERT 0 1 try=# CR

[HACKERS] Summer of Code -- mentors needed as well

2006-04-08 Thread Josh Berkus
Folks, As well as projects and students, we also will need mentors for Summer of Code projects. I'm not sure exactly what time commitment being a mentor involves, but I imagine that it's at least a couple dozen hours over the summer. Volunteers, please contact me. Note that we can have corpo

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Jonah H. Harris
On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote: > A function implemented as per Michael's example would not give the > results that I think people would expect for > > SELECT rownum(), * FROM foo ORDER BY whatever; > Yep, the query would have to be rewritten similar to Oracle's: SELECT row

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Tom Lane
Jan Wieck <[EMAIL PROTECTED]> writes: > My humble guess is that c) is also the reason why the ANSI didn't find a > ROWNUM desirable. I've never understood what the conceptual model is for Oracle's rownum. Where along the SQL operational pipeline (FROM / WHERE / GROUP BY / aggregate / compute outp

Re: [HACKERS] ERROR: record type has not been registered on CVS head

2006-04-08 Thread Tom Lane
Stefan Kaltenbrunner <[EMAIL PROTECTED]> writes: > While trying to help somebody on IRC with slow queries against > information_schema i stumbled across the following EXPLAIN buglet (much > reduced from the original one and does not make a lot of sense therefore): > foo=# explain SELECT * FROM inf

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Jonah H. Harris
On 4/8/06, Jan Wieck <[EMAIL PROTECTED]> wrote: > Someone correct me if I'm wrong, but I was allways under the impression > that Oracle's ROWNUM is a thing attached to a row in the final result > set, whatever (possibly random) order that happens to have. Now a) this > is something that IMHO belong

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn)

2006-04-08 Thread Jan Wieck
Someone correct me if I'm wrong, but I was allways under the impression that Oracle's ROWNUM is a thing attached to a row in the final result set, whatever (possibly random) order that happens to have. Now a) this is something that IMHO belongs into the client or stored procedure code, b) if I

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Jonah H. Harris
On 4/8/06, Markus Schiltknecht <[EMAIL PROTECTED]> wrote: > ACK. As long as processes, signals and shared memory are used this could > be as portable as PostgreSQL is now. This is certainly the case. > Ehm.. which additional I/O cost? Or do you count inter-process > communication to I/O? Inter-p

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Markus Schiltknecht
Hi, On Sat, 2006-04-08 at 13:16 -0400, Jonah H. Harris wrote: > On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote: > > ... but I'm failing to follow where it says that parallel processing > > will fix that. All I can foresee in that direction is extra data > > transfer costs, bought at the price of p

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn) ?

2006-04-08 Thread Michael Fuhr
On Sat, Apr 08, 2006 at 12:46:06PM -0400, Tom Lane wrote: > Juan Manuel Diaz Lara <[EMAIL PROTECTED]> writes: > > I need a rownum column, like Oracle. I have searched the mailing lists > > and I don't see a satisfactory solution, so I was wondering write a > > UDF to implement it, the requirements

Re: [HACKERS] Support Parallel Query Execution in Executor

2006-04-08 Thread Jonah H. Harris
On 4/8/06, Tom Lane <[EMAIL PROTECTED]> wrote: > ... but I'm failing to follow where it says that parallel processing > will fix that. All I can foresee in that direction is extra data > transfer costs, bought at the price of portability and locking headaches. I don't think it's any less portable

Re: [HACKERS] How to implement oracle like rownum(function or seudocolumn) ?

2006-04-08 Thread Tom Lane
Juan Manuel Diaz Lara <[EMAIL PROTECTED]> writes: > I need a rownum column, like Oracle. I have searched the mailing lists and I > don't see a satisfactory solution, so I was wondering write a UDF to > implement it, the requirements are: Try keeping a counter in fcinfo->flinfo->fn_extra. > 3.

[HACKERS] How to implement oracle like rownum(function or seudocolumn) ?

2006-04-08 Thread Juan Manuel Diaz Lara
I need a rownum column, like Oracle. I have searched the mailing lists and I don't see a satisfactory solution, so I was wondering write a UDF to implement it, the requirements are:   1. Need to preserve state between calls to the function (the rowcount). Maybe using a MemoryContext with a lifesp