agora inbox for pgus-general@postgresql.orghelp / color / mirror / Atom feed
journaled FS and and WAL 2+ messages / 2 participants [nested] [flat]
* journaled FS and and WAL @ 2016-10-14 11:22 t.dalpozzo@gmail.com <t.dalpozzo@gmail.com> 2016-10-19 17:47 ` Re: journaled FS and and WAL Bruce Momjian <bruce@momjian.us> 0 siblings, 1 reply; 2+ messages in thread From: t.dalpozzo@gmail.com @ 2016-10-14 11:22 UTC (permalink / raw) To: pgus-general Hi, two question related to the WAL. 1) I read in the doc that journaled FS is not important as WAL is journaling itself. But who garantees that the WAL is written correctly? I know that it's sequential and a partial update of WAL can be discarded after a restart. But am I sure that without a journaled FS, if there is a crash during the WAL update, nothing already updated in the WAL before my commit can get corrupted? 2) Let's suppose that I have one database, one table of 100000 rows, each 256 bytes. Now, in a single SQL commit, I update row 10, row 30000 and row 80000. How much should I expect the WAL increase by? (supposing no WAL segments will be deleted). I could guess 8192x3 but I'm not sure Regards Pupillo -- Sent via pgus-general mailing list (pgus-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgus-general ^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: journaled FS and and WAL 2016-10-14 11:22 journaled FS and and WAL t.dalpozzo@gmail.com <t.dalpozzo@gmail.com> @ 2016-10-19 17:47 ` Bruce Momjian <bruce@momjian.us> 0 siblings, 0 replies; 2+ messages in thread From: Bruce Momjian @ 2016-10-19 17:47 UTC (permalink / raw) To: t.dalpozzo@gmail.com <t.dalpozzo@gmail.com>; +Cc: pgus-general On Fri, Oct 14, 2016 at 01:22:55PM +0200, t.dalpozzo@gmail.com wrote: > Hi, > two question related to the WAL. > > 1) I read in the doc that journaled FS is not important as WAL is journaling > itself. But who garantees that the WAL is written correctly? I know that > it's sequential and a partial update of WAL can be discarded after a > restart. But am I sure that without a journaled FS, if there is a crash > during the WAL update, nothing already updated in the WAL before my commit > can get corrupted? We fsync the WAL so we don't need the file system to also log it. The big win for turning off journaling is for non-WAL files, which are already logged by WAL. > 2) Let's suppose that I have one database, one table of 100000 rows, each > 256 bytes. Now, in a single SQL commit, I update row 10, row 30000 and row > 80000. How much should I expect the WAL increase by? (supposing no WAL > segments will be deleted). I could guess 8192x3 but I'm not sure Probably accurate, though we only WAL log the new rows, not the entire page, except if it is the first page modification after a checkpoint, so it gets complicated. -- Bruce Momjian <bruce@momjian.us> http://momjian.us EnterpriseDB http://enterprisedb.com + As you are, so once was I. As I am, so you will be. + + Ancient Roman grave inscription + -- Sent via pgus-general mailing list (pgus-general@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgus-general ^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2016-10-19 17:47 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2016-10-14 11:22 journaled FS and and WAL t.dalpozzo@gmail.com <t.dalpozzo@gmail.com> 2016-10-19 17:47 ` Bruce Momjian <bruce@momjian.us>
This inbox is served by agora; see mirroring instructions for how to clone and mirror all data and code used for this inbox