| From: | Mark Wong <markwkm(at)gmail(dot)com> |
|---|---|
| To: | pgsql-hackers(at)postgresql(dot)org |
| Subject: | fix use of posix_fadvise in xlog.c |
| Date: | 2010-06-10 03:47:26 |
| Message-ID: | AANLkTin_PXWiqMOMS5-vRFXKUc6047T5QFboQqKsyHn4@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
Hi all,
I wanted to propose a fix for to xlog.c regarding the use of
posix_fadvise() for 9.1 (unless someone feels it's ok for 9.0).
Currently posix_fadvise() is used right before a log file is closed so
it's effectively not doing anything, when posix_fadvise is to be
called. This patch moves the posix_fadvise() call into 3 other
locations within XLogFileInit() where a file handle is returned. The
first case is where an existing open file handle is returned. The
next case is when a file is to be zeroed out. The third case is
returning a file handle, which may be the file that was just zeroed
out.
Does this look ok?
Regards,
Mark
| Attachment | Content-Type | Size |
|---|---|---|
| 0001-Fix-use-of-posix_fadvise-in-xlog.patch | application/octet-stream | 3.0 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Fujii Masao | 2010-06-10 06:14:25 | Re: Streaming Replication: Checkpoint_segment and wal_keep_segments on standby |
| Previous Message | Joshua Tolley | 2010-06-10 03:10:54 | Re: [PATCH] Add _PG_init to PL language handler documentation |