Re: Where in the source code does postgres write to disk?

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Mike Levine <michael(dot)levine(at)yale(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Where in the source code does postgres write to disk?
Date: 2013-04-22 13:24:41
Message-ID: CAHyXU0ySuvBSrtNAG78HBY7-Zg=_FG_Ua4A=g81XUcNEf8GAag@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On Fri, Apr 19, 2013 at 11:26 PM, Mike Levine <michael(dot)levine(at)yale(dot)edu> wrote:
> According to
> http://www.postgresql.org/docs/9.2/static/storage-file-layout.html
>
> "When a table or index exceeds 1 GB, it is divided into gigabyte-sized
> segments. The first segment's file name is the same as the filenode;
> subsequent segments are named filenode.1, filenode.2, etc."
>
> I was wondering where in the source code this is dealt with. I have been
> searching for the last few hours but have had no luck
>
>
> Any help guiding me to the location in the source code where postgres writes
> the buffer to disk would be greatly appreciated.

postgres disk writing mostly happens in md.c. reason why you probably
had trouble finding it is that disk i/o (as with memory allocation) is
hidden behind a function pointer interface.

merlin

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Daniel Cristian Cruz 2013-04-22 14:06:45 Re: Memory usage after upgrade to 9.2.4
Previous Message Rafał Pietrak 2013-04-22 13:15:17 using text search