Re: Proposing pg_hibernate

Поиск
Список
Период
Сортировка
Искать
От
Gurjeet Singh
Тема
Re: Proposing pg_hibernate
Дата
Msg-id
CABwTF4XGbpgwmkKt6ezSFVnpF11KmAg5m969twkGoDhnPj-QLA@mail.gmail.com
Ответ на
Re: Proposing pg_hibernate (Josh Kupershmidt)
Список
Дерево обсуждения
Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Cédric Villemain <cedric@2ndquadrant.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Andres Freund <andres@2ndquadrant.com>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Andres Freund <andres@2ndquadrant.com>
Re: Proposing pg_hibernate Jim Nasby <jim@nasby.net>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Andres Freund <andres@2ndquadrant.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Robert Haas <robertmhaas@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate "MauMau" <maumau307@gmail.com>
Re: Proposing pg_hibernate "MauMau" <maumau307@gmail.com>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Amit Kapila <amit.kapila16@gmail.com>
Re: Proposing pg_hibernate Kevin Grittner <kgrittn@ymail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
Re: Proposing pg_hibernate Josh Kupershmidt <schmiddy@gmail.com>
Re: Proposing pg_hibernate Gurjeet Singh <gurjeet@singh.im>
On Fri, May 30, 2014 at 5:33 PM, Josh Kupershmidt  wrote:
> On Tue, May 27, 2014 at 10:01 PM, Gurjeet Singh  wrote:
>
>> When the Postgres server is being stopped/shut down, the `Buffer
>> Saver` scans the
>> shared-buffers of Postgres, and stores the unique block identifiers of
>> each cached
>> block to the disk. This information is saved under the `$PGDATA/pg_hibernator/`
>> directory. For each of the database whose blocks are resident in shared buffers,
>> one file is created; for eg.: `$PGDATA/pg_hibernator/2.postgres.save`.
>
> This file-naming convention seems a bit fragile. For example, on my
> filesystem (HFS) if I create a database named "foo / bar", I'll get a
> complaint like:
>
> ERROR:  could not open "pg_hibernator/5.foo / bar.save": No such file
> or directory
>
> during shutdown.

Thanks for the report. I have reworked the file naming, and now the
save-file name is simply '.save', so the name of a database
does not affect the file name on disk. Instead, the null-terminated
database name is now written in the file, and read back for use when
restoring the buffers.

Attached is the new version of pg_hibernator, with updated code and README.

Just a heads up for anyone who might have read/reviewed previous
version's code, there's some unrelated trivial code and Makefile
changes as well in this version, which can be easily spotted by a
`diff -r`.

Best regards,
-- 
Gurjeet Singh http://gurjeet.singh.im/

EDB www.EnterpriseDB.com
В списке pgsql-hackers по дате отправления
От: Hai Qian
Дата:
От: Michael Paquier
Дата:
FAQ