From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Robert Haas <robertmhaas(at)gmail(dot)com> |
Cc: | Andres Freund <andres(at)2ndquadrant(dot)com>, "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Changeset Extraction v7.1 |
Date: | 2014-01-23 21:27:16 |
Message-ID: | 20140123212716.GV10723@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
> I wonder if it wouldn't be better to get rid of the subdirectories for
> the individual slots, and just have a file pg_replslot/$SLOTNAME, or
> not. I know there are later patches that need subdirectories for
> their own private data, but they could just create
> pg_replslot/$SLOTNAME.dir and put whatever in it they like, without
> really implicating this code that much. The advantage of that is that
> there would be fewer intermediate states. The slot exists if the file
> exists, and not if it doesn't. You still need half-alive and
> half-dead until the fsync finishes, but you don't need to worry about
> tracking both the state of the directory and the state of the file.
Why do we need directories at all? I know there might be subsidiary
files to store stuff in separate files, but maybe we can just name files
using the slot name (or a transformation thereof) as a prefix. It
shouldn't be difficult to remove the right files whenever there's a
need, and not having to worry about a directory that might need a
separate fsync might make things easier.
On the other hand, there might still be a need to fsync the parent
directory, so maybe there is not that much gain.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Alvaro Herrera | 2014-01-23 21:34:15 | Re: [bug fix] pg_ctl always uses the same event source |
Previous Message | Tom Lane | 2014-01-23 21:25:35 | Re: [bug fix] pg_ctl always uses the same event source |