From: | Nulik Nol <nuliknol(at)gmail(dot)com> |
---|---|
To: | pgsql-hackers(at)postgresql(dot)org |
Subject: | fsyncing data to disk |
Date: | 2011-09-09 18:15:40 |
Message-ID: | CAHO6xe8SO7TGqAEFcbhN8CyC0mPZ2ZmBdEyasJ8i5ozp_ZUzZA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi,
this is not exactly a Postgresql question, but an input from hackers
list like this would be invaluable for me.
I am coding my own database engine, and I decided to do not implement
transaction engine because it implies too much code.
But to achieve the Durability of ACID I need a 100% reliable write to
disk. By design no record in my DB will be larger than 512 bytes, so I
am using the page size of 512 bytes, that matches the size of the disk
block, so every write() I will execute with the following fdatasync()
call will be 100% written, is that correct? It won't make a 300 byte
write if I tell it to write 512 and the power goes off or will it? I
am going to use the whole partition device for the DB (like /dev/sda1)
, so no filesystem code will be used. Also I am using asynchronous IO
(the aio_read and aio_write) and I don't know if they can be combined
with the fdatasync() syscall?
Will appreciate your comments
Regards
--
==================================
The power of zero is infinite
From | Date | Subject | |
---|---|---|---|
Next Message | Kevin Grittner | 2011-09-09 18:38:08 | Re: Patch to improve reliability of postgresql on linux nfs |
Previous Message | Noah Misch | 2011-09-09 17:44:05 | Re: Patch to improve reliability of postgresql on linux nfs |