Re: Fast promotion, loose ends
От | Heikki Linnakangas |
---|---|
Тема | Re: Fast promotion, loose ends |
Дата | |
Msg-id | 517798AE.30203@vmware.com обсуждение исходный текст |
Ответ на | Re: Fast promotion, loose ends (Simon Riggs <simon@2ndQuadrant.com>) |
Ответы |
Re: Fast promotion, loose ends
|
Список | pgsql-hackers |
On 24.04.2013 11:23, Simon Riggs wrote: > 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. The point is, if you do "pgsql93/bin/pg_ctl -D $92DATADIR promote", it will create fast_promote file and return success. But it won't actually promote the server. I think that's bad. If pg_ctl already has a check against that, fine, but I don't think it does. Please make sure you test that before applying. - Heikki
В списке pgsql-hackers по дате отправления: