From: | Simon Riggs <simon(at)2ndQuadrant(dot)com> |
---|---|
To: | Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> |
Cc: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Fast promotion, loose ends |
Date: | 2013-04-24 08:23:26 |
Message-ID: | CA+U5nMLuU1JVvKaEzs10TvWVp0zb3XP+GXq9WX5jWj+GywsbCA@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On 24 April 2013 09:10, Heikki Linnakangas <hlinnakangas(at)vmware(dot)com> wrote:
> Regarding the change in pg_ctl:
>
>> /*
>> - * Use two different kinds of promotion file so we can understand
>> - * the difference between smart and fast promotion.
>> + * For 9.3 onwards, use fast promotion as the default option.
>> + * Promotion with a full checkpoint is still possible by writing
>> + * a file called "promote", e.g.
>> + * snprintf(promote_file, MAXPGPATH, "%s/promote", pg_data);
>> */
>> - if (shutdown_mode >= FAST_MODE)
>> - snprintf(promote_file, MAXPGPATH, "%s/fast_promote",
>> pg_data);
>> - else
>> - snprintf(promote_file, MAXPGPATH, "%s/promote", pg_data);
>> + snprintf(promote_file, MAXPGPATH, "%s/fast_promote", pg_data);
>
>
> Should there be a version check there? I guess we've never guaranteed a
> newer pg_ctl to work with an older server version, but it seems likely that
> someone would try to do that, especially with "pg_ctl promote". With the
> above change, creating $DATADIR/fast_promote in a 9.2 server's data dir will
> do nothing. I'd suggest that we keep the filename unchanged, "promote", and
> only change the behavior in the server side, so that it performs fast
> promotion. If you want to have a "slow" promote file, we can call that
> "slow_promote" or "checkpoint_then_promote" or something.
pg_ctl already checks versions, so I don't see the point.
--
Simon Riggs http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training & Services
From | Date | Subject | |
---|---|---|---|
Next Message | Heikki Linnakangas | 2013-04-24 08:32:46 | Re: Fast promotion, loose ends |
Previous Message | Heikki Linnakangas | 2013-04-24 08:10:26 | Re: Fast promotion, loose ends |