From: Tom Lane <tgl@sss.pgh.pa.us>
To: Jon Nelson <jnelson+pgsql@jamponi.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: odd postgresql performance (excessive lseek)
Date: Tue, 19 Oct 2010 10:36:09 -0400
Message-ID: <10133.1287498969@sss.pgh.pa.us> (raw)
In-Reply-To: <AANLkTin3qV-dPeu771VLGmbiPPpeHz2oT=0t6CPtaSeS@mail.gmail.com>
References: <AANLkTikS8ptnCVJK+6u-Z3Xh8WMKdgq+T+trdxt3xgYB@mail.gmail.com>
<AANLkTin3qV-dPeu771VLGmbiPPpeHz2oT=0t6CPtaSeS@mail.gmail.com>
Jon Nelson <jnelson+pgsql@jamponi.net> writes:
> This is another situation where using pread would have saved a lot of
> time and sped things up a bit, but failing that, keeping track of the
> file position ourselves and only lseek'ing when necessary would also
> help.
No, it wouldn't; you don't have the slightest idea what's going on
there. Those lseeks are for the purpose of detecting the current EOF
location, ie, finding out whether some other backend has extended the
file recently. We could get rid of them, but only at the cost of
putting in some other communication mechanism instead.
regards, tom lane
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: tgl@sss.pgh.pa.us, jnelson+pgsql@jamponi.net
Subject: Re: odd postgresql performance (excessive lseek)
In-Reply-To: <10133.1287498969@sss.pgh.pa.us>
* 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