File IO - why does PG do things in pages? - Mailing list pgsql-hackers

From Dan Eloff
Subject File IO - why does PG do things in pages?
Date
Msg-id 4817b6fc0911261314m37c8e56eh5678f81105847af9@mail.gmail.com
Whole thread Raw
Responses Re: File IO - why does PG do things in pages?
Re: File IO - why does PG do things in pages?
List pgsql-hackers
Hi Hackers,

I've familiarized myself a little with the architecture of postgresql,
largely because it's interesting. There's one thing I can't quite
figure out though, and it seems that there's no better group of people
in the world to ask about it.

At the lower levels in PG, reading from the disk into cache, and
writing from the cache to the disk is always done in pages.

Why does PG work this way? Is it any slower to write whole pages
rather than just the region of the page that changed? Conversely, is
it faster? From what I think I know of operating systems, reading
should bring the whole page into the os buffers anyway, so reading the
whole page instead of just part of it isn't much more expensive.
Perhaps writing works similarly?

Thanks,
-Dan


pgsql-hackers by date:

Previous
From: Jeff Davis
Date:
Subject: Documentation broken due to typo
Next
From: Tom Lane
Date:
Subject: Re: Documentation broken due to typo