Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Richard Huxton
Steinar H. Gunderson wrote: Hi, We're having problems with our PostgreSQL server using forever for simple queries, even when there's little load -- or rather, the transactions seem to take forever to commit. We're using 8.1 (yay!) on a single Opteron, with WAL on the system two-disk (software)

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Steinar H. Gunderson
On Thu, Nov 10, 2005 at 02:14:30PM +, Richard Huxton wrote: You're beyond my area of expertise, but I do know that someone's going to ask what filesystem this is (ext2/xfs/etc). Ah, yes, I forgot -- it's ext3. We're considering simply moving the WAL onto a separate partition (with

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Michael Stone
On Thu, Nov 10, 2005 at 03:25:35PM +0100, Steinar H. Gunderson wrote: Ah, yes, I forgot -- it's ext3. We're considering simply moving the WAL onto a separate partition (with data=writeback and noatime) if that can help us any. There's no reason to use a journaled filesystem for the wal. Use

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Scott Marlowe
On Thu, 2005-11-10 at 08:43, Michael Stone wrote: On Thu, Nov 10, 2005 at 03:25:35PM +0100, Steinar H. Gunderson wrote: Ah, yes, I forgot -- it's ext3. We're considering simply moving the WAL onto a separate partition (with data=writeback and noatime) if that can help us any. There's no

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Michael Stone
On Thu, Nov 10, 2005 at 09:52:38AM -0600, Scott Marlowe wrote: Not from what I understood. Ext2 can't guarantee that your data will even be there in any form after a crash. It can if you sync the data. (Which is the whole point of the WAL.) I believe only metadata journaling is needed

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: On Thu, 2005-11-10 at 08:43, Michael Stone wrote: There's no reason to use a journaled filesystem for the wal. Use ext2 in preference to ext3. Not from what I understood. Ext2 can't guarantee that your data will even be there in any form after a

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Scott Marlowe
On Thu, 2005-11-10 at 10:39, Tom Lane wrote: Scott Marlowe [EMAIL PROTECTED] writes: On Thu, 2005-11-10 at 08:43, Michael Stone wrote: There's no reason to use a journaled filesystem for the wal. Use ext2 in preference to ext3. Not from what I understood. Ext2 can't guarantee that your

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread mark
On Thu, Nov 10, 2005 at 11:39:34AM -0500, Tom Lane wrote: No, Mike is right: for WAL you shouldn't need any journaling. This is because we zero out *and fsync* an entire WAL file before we ever consider putting live WAL data in it. During live use of a WAL file, its metadata is not changing.

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Tom Lane
Scott Marlowe [EMAIL PROTECTED] writes: Thanks for the clarification! Nice to know I can setup an ext2 partition for my WAL files then. Is this in the docs anywhere? Don't think so ... want to write something up? Hard part is to figure out where to put it ...

Re: [PERFORM] WAL sync behaviour

2005-11-10 Thread Steinar H. Gunderson
On Thu, Nov 10, 2005 at 12:44:15PM -0500, Tom Lane wrote: Don't think so ... want to write something up? Hard part is to figure out where to put it ... To be honest, I think we could use a newbie's guide to PostgreSQL performance tuning. I've seen rather good guides for query tuning, and