Re: PostgreSQL is extremely slow on Windows - Mailing list pgsql-performance

From Tom Lane
Subject Re: PostgreSQL is extremely slow on Windows
Date
Msg-id 23063.1109199401@sss.pgh.pa.us
Whole thread Raw
In response to Re: PostgreSQL is extremely slow on Windows  (Neil Conway <neilc@samurai.com>)
List pgsql-performance
Neil Conway <neilc@samurai.com> writes:
> There is a TODO item about allowing the delaying of WAL writes. If we
> maintain the WAL invariant (that is, a WAL record describing a change
> must hit disk before the change itself does) but simply don't flush the
> WAL at transaction commit, we should be able to get better performance
> without the risk of database corruption (so we would need to keep pages
> modified by the committed transaction pinned in memory until the WAL has
> been flushed, which might be done on a periodic basis).

That interlock already exists, in the form of the bufmgr LSN logic.

I think this "feature" might be as simple as

            XLogFlush(recptr);

becomes

            /* Must flush if we are deleting files... */
            if (PerCommitFlush || nrels > 0)
                XLogFlush(recptr);

in RecordTransactionCommit.

            regards, tom lane

pgsql-performance by date:

Previous
From: Neil Conway
Date:
Subject: Re: PostgreSQL is extremely slow on Windows
Next
From: Christopher Browne
Date:
Subject: Re: Peformance Tuning Opterons/ Hard Disk Layout