pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Hannu Krosing <hannu@skype.net>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Neil Conway <neilc@samurai.com>
Cc: Zoltan Boszormenyi <zboszor@dunaweb.hu>
Cc: Andrew Dunstan <andrew@dunslane.net>
Cc: Mark Woodward <pgsql@mohawksoft.com>
Cc: Jim C. Nasby <jnasby@pervasive.com>
Cc: pgsql-hackers@postgresql.org
Subject: Re: [PERFORM] psql -A (unaligned format) eats too much
Date: Tue, 06 Jun 2006 15:30:12 +0300
Message-ID: <1149597013.3818.7.camel@localhost.localdomain> (raw)
In-Reply-To: <21820.1149531024@sss.pgh.pa.us>
References: <44835834.2020309@dunaweb.hu>
	<44835F86.5040008@dunaweb.hu>
	<20060605152258.GT53487@pervasive.com>
	<20512.1149521250@sss.pgh.pa.us>
	<20060605155349.GU53487@pervasive.com>
	<20813.1149523235@sss.pgh.pa.us>
	<18006.24.91.171.78.1149526092.squirrel@mail.mohawksoft.com>
	<44845E86.3080001@dunslane.net>
	<4484672B.8080606@dunaweb.hu>
	<1149529945.5577.5.camel@localhost>
	<21820.1149531024@sss.pgh.pa.us>

Ühel kenal päeval, E, 2006-06-05 kell 14:10, kirjutas Tom Lane:
> Neil Conway <neilc@samurai.com> writes:
> > On Mon, 2006-06-05 at 19:17 +0200, Zoltan Boszormenyi wrote:
> >> The general case cannot be applied for all particular cases.
> >> E.g. you cannot use cursors from shell scripts
> 
> > This could be fixed by adding an option to psql to transparently produce
> > SELECT result sets via a cursor.

I think this is an excellent idea. 

psql --cursor --fetchby 10000 -c "select ..." | myprogram

> Note of course that such a thing would push the incomplete-result
> problem further upstream.   For instance in (hypothetical --cursor
> switch)
> 	psql --cursor -c "select ..." | myprogram
> there would be no very good way for myprogram to find out that it'd
> been sent an incomplete result due to error partway through the SELECT.

would it not learn about it at the point of error ?

even without --cursor there is still no very good way to find out when
something else goes wrong, like the result inside libpq taking up all
memory and so psql runs out of memory on formatting some longer lines.


-- 
----------------
Hannu Krosing
Database Architect
Skype Technologies OÜ
Akadeemia tee 21 F, Tallinn, 12618, Estonia

Skype me:  callto:hkrosing
Get Skype for free:  http://www.skype.com





view thread (12+ messages)  latest in thread

Message-ID: <1149597013.3818.7.camel@localhost.localdomain>
Permalink:  ../1149597013.3818.7.camel@localhost.localdomain/
Also on:    postgresql.org/message-id/1149597013.3818.7.camel@localhost.localdomain

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: hannu@skype.net, tgl@sss.pgh.pa.us, neilc@samurai.com, zboszor@dunaweb.hu, andrew@dunslane.net, pgsql@mohawksoft.com, jnasby@pervasive.com, pgsql-hackers@postgresql.org
  Subject: Re: [PERFORM] psql -A (unaligned format) eats too much
  In-Reply-To: <1149597013.3818.7.camel@localhost.localdomain>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox