Re: [GENERAL] large inserts and fsync

2008-09-06 Thread Aaron Burnett
--Original Message- From: Greg Smith [mailto:[EMAIL PROTECTED] Sent: Sat 9/6/2008 4:45 AM To: Tom Lane Cc: Aaron Burnett; Sam Mason; pgsql-general@postgresql.org Subject: Re: [GENERAL] large inserts and fsync On Fri, 5 Sep 2008, Tom Lane wrote: > The trouble with turning fsync off is that a

Re: [GENERAL] large inserts and fsync

2008-09-06 Thread Greg Smith
On Fri, 5 Sep 2008, Tom Lane wrote: The trouble with turning fsync off is that a system crash midway through the import might leave you with a corrupt database. If you're willing to start over from initdb then okay, but if you are importing into a database that already contains valuable data, I

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Tom Lane
Aaron Burnett <[EMAIL PROTECTED]> writes: > On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: >> Have you tried bundling all the INSERT statements into a single >> transaction? > Yes, the developer already made sure of that and I verified. Hmm, in that case the penalty probably comes fro

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Alan Hodgson
> > > Have you tried bundling all the INSERT statements into a single > > > transaction? > > > > Yes, the developer already made sure of that and I verified. I would verify that again, because fsync shouldn't make much of a difference in that circumstance. I might not do all 16 million in one tra

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Sam Mason
On Fri, Sep 05, 2008 at 11:19:13AM -0400, Aaron Burnett wrote: > On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: > > On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: > >> For an upcoming release there is a 16 million row insert that on our test > >> cluster takes about 2.5

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Aaron Burnett
Yes, the developer already made sure of that and I verified. On 9/5/08 11:10 AM, "Sam Mason" <[EMAIL PROTECTED]> wrote: > On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: >> For an upcoming release there is a 16 million row insert that on our test >> cluster takes about 2.5 hours

Re: [GENERAL] large inserts and fsync

2008-09-05 Thread Sam Mason
On Fri, Sep 05, 2008 at 09:16:41AM -0400, Aaron Burnett wrote: > For an upcoming release there is a 16 million row insert that on our test > cluster takes about 2.5 hours to complete with all indices dropped > beforehand. > > If I turn off fsync, it completes in under 10 minutes. Have you tried b

[GENERAL] large inserts and fsync

2008-09-05 Thread Aaron Burnett
Forgive me if this is a many-times rehashed topic. I¹m very new to postgresql, most of my background is in Oracle. Running postgres 8.2.5 with one master and three slaves (using slony) For an upcoming release there is a 16 million row insert that on our test cluster takes about 2.5 hours to comp