Re: [PERFORM] 8.4 Performance improvements: was Re: Proposal of tunable fix for scalability of 8.4

2009-04-07 Thread Bruce Momjian
Bruce Momjian wrote: > Tom Lane wrote: > > Gregory Stark writes: > > > Tom Lane writes: > > >> Ugh. So apparently, we actually need to special-case Solaris to not > > >> believe that posix_fadvise works, or we'll waste cycles uselessly > > >> calling a do-nothing function. Thanks, Sun. > > > >

[PERFORM] determining the locks that will be held by a query

2009-04-07 Thread Brian Cox
I know that EXPLAIN will show the query plan. I know that pg_locks will show the locks currently held for activity transactions. Is there a way to determine what locks a query will hold when it is executed? Thanks, Brian -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Tom Lane
Merlin Moncure writes: > On Tue, Apr 7, 2009 at 11:18 AM, Matthew Wakeling wrote: >> What would be the syntax for putting a single row from a cursor into a >> variable? I have tried: >> >> FETCH INTO left left_cursor; > according to the docs, > http://www.postgresql.org/docs/8.3/interactive/plp

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Merlin Moncure
On Tue, Apr 7, 2009 at 11:18 AM, Matthew Wakeling wrote: > On Fri, 3 Apr 2009, Tom Lane wrote: >>> >>> ... alternatively is there a way to read two results streams >>> simultaneously? >> >> Use two cursors and FETCH from each as needed?  In recent releases you >> can even scroll backwards, which y

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Andrew Sullivan
On Tue, Apr 07, 2009 at 10:31:02PM +1200, Mark Kirkwood wrote: > > From my experience - gained from unwittingly being in the wrong place at > the wrong time and so being volunteered into helping people with Slony > failures - it seems to be quite possible to have nodes out of sync and > not be e

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Matthew Wakeling
On Tue, 7 Apr 2009, Tom Lane wrote: Matthew Wakeling writes: CREATE OR REPLACE FUNCTION overlap_gene_primer() RETURNS SETOF RECORD AS $$ DECLARE left location; retval RECORD; BEGIN DECLARE left_cursor NO SCROLL CURSOR FOR SELECT location FROM location, gene WHERE location.id = g

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Andrew Sullivan
On Mon, Apr 06, 2009 at 09:07:05PM -0700, Lists wrote: > Can you point me in the direction of the documentation for tuning it? I > don't see anything in the documentation for tuning for write load. No, exactly. As I said, it's a pain. The main thing you need to do is to make sure that your se

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Tom Lane
Matthew Wakeling writes: > CREATE OR REPLACE FUNCTION overlap_gene_primer() RETURNS SETOF RECORD AS $$ > DECLARE > left location; > retval RECORD; > BEGIN > DECLARE left_cursor NO SCROLL CURSOR FOR SELECT location FROM location, > gene WHERE location.id = gene.id ORDER BY objectid,

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread justin
Matthew Wakeling wrote: On Tue, 7 Apr 2009, justin wrote: What would be the syntax for putting a single row from a cursor into a variable? I have tried: FETCH INTO left left_cursor; which says syntax error, and left = FETCH left_cursor;

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Matthew Wakeling
On Tue, 7 Apr 2009, justin wrote: What would be the syntax for putting a single row from a cursor into a variable? I have tried: FETCH INTO left left_cursor; which says syntax error, and left = FETCH left_cursor; which gives the error 'ERROR: missing datatype declaration at or near "="' H

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread justin
Matthew Wakeling wrote: What would be the syntax for putting a single row from a cursor into a variable? I have tried: FETCH INTO left left_cursor; which says syntax error, and left = FETCH left_cursor; which gives the error 'ERROR: missing datatype declaration at or near "="' Matthew

Re: [PERFORM] plpgsql arrays

2009-04-07 Thread Matthew Wakeling
On Fri, 3 Apr 2009, Tom Lane wrote: ... alternatively is there a way to read two results streams simultaneously? Use two cursors and FETCH from each as needed? In recent releases you can even scroll backwards, which you're going to need to do to make a merge join work. What would be the synt

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Mark Kirkwood
Andrew Sullivan wrote: On Sun, Apr 05, 2009 at 11:36:33AM -0700, Lists wrote: *Slony-I* - I've used this in the past, but it's a huge pain to work with, caused serious performance issues under heavy load due to long running transactions (may not be the case anymore, it's been a while si

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Ivan Voras
Lists wrote: > I'm currently running 32bit FreeBSD so I can't really add more ram (PAE > doesn't work well under FreeBSD from what I've read) That's probably left-over from the time many drivers were not 64-bit friendly. I've yet to see a new configuration that doesn't work with PAE (also, the de

Re: [PERFORM] Best replication solution?

2009-04-07 Thread Dimitri Fontaine
On Monday 06 April 2009 14:35:30 Andrew Sullivan wrote: > > *SkyTools/Londiste* - Don't know anything special about it. > > I've been quite impressed by the usability. It's not quite as > flexible as Slony, but it has the same theory of operation. The > documentation is not as voluminous, althoug