From: | Cédric Villemain <cedric(dot)villemain(dot)debian(at)gmail(dot)com> |
---|---|
To: | Magnus Hagander <magnus(at)hagander(dot)net> |
Cc: | Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Streaming base backups |
Date: | 2011-01-07 00:47:39 |
Message-ID: | AANLkTikS1TogLYewGYrHs+mfmwxFMhAEUMJZMk1AQJPg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
2011/1/5 Magnus Hagander <magnus(at)hagander(dot)net>:
> On Wed, Jan 5, 2011 at 22:58, Dimitri Fontaine <dimitri(at)2ndquadrant(dot)fr> wrote:
>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>> * Stefan mentiond it might be useful to put some
>>> posix_fadvise(POSIX_FADV_DONTNEED)
>>> in the process that streams all the files out. Seems useful, as long as that
>>> doesn't kick them out of the cache *completely*, for other backends as well.
>>> Do we know if that is the case?
>>
>> Maybe have a look at pgfincore to only tag DONTNEED for blocks that are
>> not already in SHM?
>
> I think that's way more complex than we want to go here.
>
DONTNEED will remove the block from OS buffer everytime.
It should not be that hard to implement a snapshot(it needs mincore())
and to restore previous state. I don't know how basebackup is
performed exactly...so perhaps I am wrong.
posix_fadvise support is already in postgresql core...we can start by
just doing a snapshot of the files before starting, or at some point
in the basebackup, it will need only 256kB per GB of data...
--
Cédric Villemain 2ndQuadrant
http://2ndQuadrant.fr/ PostgreSQL : Expertise, Formation et Support
From | Date | Subject | |
---|---|---|---|
Next Message | Simon Riggs | 2011-01-07 00:54:15 | Re: Something fishy about the current Makefiles |
Previous Message | Tom Lane | 2011-01-07 00:31:20 | Re: Fixing GIN for empty/null/full-scan cases |