On 24 April 2013 09:10, Heikki Linnakangas <hlinnakangas@vmware.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