On Mon, Feb 20, 2017 at 4:04 PM, Rushabh Lathia
> My colleague Rahila reported compilation issue with
> the patch. Issue was only coming with we do the clean
> build on the branch.
> Fixed the same into latest version of patch.
Few assorted comments:
+ <entry>Waiting during
buffile read operation.</entry>
Operation name and definition are not matching.
+FilePrefetch(File file, off_t offset, int amount, uint32 wait_event_info)
#if defined(USE_POSIX_FADVISE) && defined(POSIX_FADV_WILLNEED)
@@ -1527,8 +1527,10 @@ FilePrefetch(File file, off_t offset, int amount)
if (returnCode < 0)
returnCode = posix_fadvise(VfdCache[file].fd, offset, amount,
AFAIK, this call is non-blocking and will just initiate a read, so do
you think we should record wait event for such a call.
- written = FileWrite(src->vfd, waldata_start, len);
+ written = FileWrite(src->vfd, waldata_start, len,
if (written != len)
@@ -957,7 +960,7 @@ logical_end_heap_rewrite(RewriteState state)
while ((src = (RewriteMappingFile *) hash_seq_search(&seq_status)) != NULL)
- if (FileSync(src->vfd) != 0)
+ if (FileSync(src->vfd, WAIT_EVENT_SYNC_REWRITE_DATA_BLOCK) != 0)
Do we want to consider recording wait event for both write and sync?
It seems to me OS level writes are relatively cheap and sync calls are
expensive, so shouldn't we just log for sync calls? I could see the
similar usage at multiple places in the patch.
Sent via pgsql-hackers mailing list (email@example.com)
To make changes to your subscription: