From: | Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> |
---|---|
To: | Kevin Grittner <kgrittn(at)ymail(dot)com> |
Cc: | Pg Hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: truncating pg_multixact/members |
Date: | 2013-12-29 01:08:30 |
Message-ID: | 20131229010830.GR22570@eldon.alvh.no-ip.org |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Kevin Grittner wrote:
> Alvaro Herrera <alvherre(at)2ndquadrant(dot)com> wrote:
>
> > 1. slru.c doesn't consider file names longer than 4 hexadecimal chars.
>
> > Fixing (1) is simple: we can have each SLRU user declare how many digits
> > to have in file names. All existing users but pg_multixact/members
> > should declare 4 digits; that one should declare 5. That way, the
> > correct number of zeroes are allocated at the start point and we get
> > nice, equal-width file names. Eventually, predicate.c can change to
> > wider file names and get rid of some strange code it has to deal with
> > overrun.
>
> That would be nice.
>
> There would be the issue of how to deal with pg_upgrade, though. If
> I remember correctly, there is no strong reason not to blow away
> any existing files in the pg_serial subdirectory at startup (the
> way NOTIFY code does), and at one point I had code to do that. I
> think we took that code out because the files would be deleted
> "soon enough" anyway. Barring objection, deleting them at startup
> seems like a sane way to handle pg_upgrade issues when we do
> increase the filename size.
Agreed. It's easy to have the files deleted at startup now that the
truncation stuff uses a callback. There is already a callback that's
used to delete all files, so you won't need to write any code to make it
behave that way.
FWIW for pg_multixact/members during pg_upgrade from 9.3 to 9.4 we will
need to rename existing files, prepending a zero to each file whose name
is four chars in length.
--
Álvaro Herrera http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2013-12-29 01:20:59 | Re: trailing comment ghost-timing |
Previous Message | Tom Lane | 2013-12-29 00:41:49 | Re: [BUG FIX] Version number expressed in octal form by mistake |