Re:PostgreSQL's fsync surprise
by trentnelson on Thursday May 03, 2018 @06:54PM
(#16990759)
So, basically, we need the NT-style, completion-oriented, inherently-asynchronous I/O model? ;-) (Amen!)
[ Parent
| on HN ]
Re:PostgreSQL's fsync surprise
by davidgould on Thursday May 03, 2018 @08:46PM
(#16991314)
You misspelled VMS as NT. And actually VMS borrowed the IO model from RSX-11.
Async QIO style IO is all good clean fun, until someone writes something like:
fml(...) {
char buf[1024];
sys$qio(QIO_READ, buf, sizeof(buf));
return;
}
main() {
fml();
do_stuff(); //surprise package delivered into stack here!
}
Re:PostgreSQL's fsync surprise
by cryptonector on Friday May 04, 2018 @12:16PM
(#16995740)
Yes. Every system call that can block should take an event queue argument. If you want the system call to block then the C library's stub should wait for it for you.