From: Dimitri Fontaine <dfontaine@hi-media.com>
To: pgsql-performance@postgresql.org
Cc: Greg Smith <gsmith@gregsmith.com>
Subject: Re: Benchmark Data requested --- pgloader CE design ideas
Date: Wed, 6 Feb 2008 20:59:04 +0100
Message-ID: <200802062059.07174.dfontaine@hi-media.com> (raw)
In-Reply-To: <200802061837.41911.dfontaine@hi-media.com>
References: <1202150236.4252.521.camel@ebony.site>
<Pine.GSO.4.64.0802061041230.15780@westnet.com>
<200802061837.41911.dfontaine@hi-media.com>
Le Wednesday 06 February 2008 18:37:41 Dimitri Fontaine, vous avez écrit :
> Le mercredi 06 février 2008, Greg Smith a écrit :
> > If I'm loading a TB file, odds are good I can split that into 4 or more
> > vertical pieces (say rows 1-25%, 25-50%, 50-75%, 75-100%), start 4
> > loaders at once, and get way more than 1 disk worth of throughput
> > reading.
>
> pgloader already supports starting at any input file line number, and limit
> itself to any number of reads:
In fact, the -F option works by having pgloader read the given number of lines
but skip processing them, which is not at all what Greg is talking about here
I think.
Plus, I think it would be easier for me to code some stat() then lseek() then
read() into the pgloader readers machinery than to change the code
architecture to support a separate thread for the file reader.
Greg, what would you think of a pgloader which will separate file reading
based on file size as given by stat (os.stat(file)[ST_SIZE]) and number of
threads: we split into as many pieces as section_threads section config
value.
This behaviour won't be available for sections where type = text and
field_count(*) is given, cause in this case I don't see how pgloader could
reliably recognize a new logical line beginning and start processing here.
In other cases, a logical line is a physical line, so we start after first
newline met from given lseek start position, and continue reading after the
last lseek position until a newline.
*:http://pgloader.projects.postgresql.org/#_text_format_configuration_parameters
Comments?
--
dim
Attachments:
signature.asc (application/pgp-signature, 188B) download
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: dfontaine@hi-media.com, gsmith@gregsmith.com
Subject: Re: Benchmark Data requested --- pgloader CE design ideas
In-Reply-To: <200802062059.07174.dfontaine@hi-media.com>
References: <1202150236.4252.521.camel@ebony.site> <Pine.GSO.4.64.0802061041230.15780@westnet.com> <200802061837.41911.dfontaine@hi-media.com> <200802062059.07174.dfontaine@hi-media.com>
* 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