"Qingqing Zhou" <[EMAIL PROTECTED]> writes: > I raise this problem because (1) I want to add a stat number for xlog > write/sync; (2) Considering we may have a background xlog writer (discussed > long time before), the stats may become pointless for local process.
The bgwriter is already capable of pushing xlog data to disk --- it must do so to guarantee the invariant that xlog hits disk before data-file change. I think it could do with some tweaking to make it more probable that the bgwriter issues such writes rather than a regular backend, but it can happen now. And even without the bgwriter, xlog data your process created could be forced to disk by some other backend if the other backend wants to commit before you do. I'm not entirely sure that the getrusage stats ever meant a lot for Postgres; they're certainly a pretty incomplete view of what's going on now. regards, tom lane ---------------------------(end of broadcast)--------------------------- TIP 6: explain analyze is your friend