From: | Gurjeet Singh <gurjeet(at)singh(dot)im> |
---|---|
To: | Josh Kupershmidt <schmiddy(at)gmail(dot)com> |
Cc: | PGSQL Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Proposing pg_hibernate |
Date: | 2014-06-02 21:49:37 |
Message-ID: | CABwTF4XGbpgwmkKt6ezSFVnpF11KmAg5m969twkGoDhnPj-QLA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, May 30, 2014 at 5:33 PM, Josh Kupershmidt <schmiddy(at)gmail(dot)com> wrote:
> On Tue, May 27, 2014 at 10:01 PM, Gurjeet Singh <gurjeet(at)singh(dot)im> 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 '<integer>.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/
Attachment | Content-Type | Size |
---|---|---|
pg_hibernator.v2.tgz | application/x-gzip | 13.1 KB |
From | Date | Subject | |
---|---|---|---|
Next Message | Michael Paquier | 2014-06-02 22:22:13 | Re: pg_stat directory and pg_stat_statements |
Previous Message | Tom Lane | 2014-06-02 18:47:57 | Re: Re-create dependent views on ALTER TABLE ALTER COLUMN ... TYPE? |