From: | Don Baccus <dhogaza(at)pacifier(dot)com> |
---|---|
To: | pgsql-hackers(at)postgreSQL(dot)org |
Subject: | fsynch of pg_log write.. |
Date: | 1999-06-24 18:59:17 |
Message-ID: | 3.0.1.32.19990624115917.00ece260@mail.pacifier.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
After the discussion about implementing a flag that
would selectively disable fsynch on the pg_log file,
I visited xact.c and tried a little test.
The code in RecordTransactionCommit looks essentially like
(ignoring stuff related to leaks)
FlushBufferPool /* flush and fsync the data blocks */
TransactionIdCommit /* log the fact that the transaction's done */
FlushBufferPool /* flush and fsync pg_log and whatever else
has changed during this brief period of time */
I just added a couple of lines of code that saves
disableFsync and sets it true before the second call
to FlushBufferPool, restoring it to its original state
afterwards.
Running without "-F", my disk is blessedly silent when
I access my web pages that hit the database several times
with read-only selects used to customize the presentation
to the user.
Cool!
So...does it sound like I'm doing the right thing?
- Don Baccus, Portland OR <dhogaza(at)pacifier(dot)com>
Nature photos, on-line guides, and other goodies at
http://donb.photo.net
From | Date | Subject | |
---|---|---|---|
Next Message | Edmund Mergl | 1999-06-24 19:07:15 | Re: [HACKERS] Perl 5 Interface on 6.5 and lo_creat/lo_open problem |
Previous Message | Brian P Millett | 1999-06-24 16:23:32 | PATCH for pgconnection.h |