Thread: vacuumdb error
Hi, I've noticed I can't run vacuumdb with ALL FULL VERBOSE and FREEZE. The error returned is: vacuumdb: vacuuming of database "killingcupid.co.uk" failed: ERROR: syntax error at or near "FREEZE" LINE 1: VACUUM FULL VERBOSE FREEZE; The commands I used are: vacuumdb -afFv vacuumdb --all --full --freeze --verbose I've tried moving the switches round to put them in the order specified in the documentation, just in case it had any effect on the order of the keywords, but it doesn't.=A0 I can run this manually in psql using: VACUUM FULL FREEZE VERBOSE; This is either a bug in vacuumdb with it not using the correct order, or postgres shouldn't be paying attention to the order of the keywords.=A0 In any case, it doesn't work.=A0 I've searched the postgres FAQs, TODO and mailing list archives, but can't find a mention of this. Thanks Thom
2009/10/16 Thom Brown <thombrown@gmail.com>: > Hi, > > I've noticed I can't run vacuumdb with ALL FULL VERBOSE and FREEZE. > > The error returned is: > > vacuumdb: vacuuming of database "killingcupid.co.uk" failed: ERROR: > syntax error at or near "FREEZE" > LINE 1: VACUUM FULL VERBOSE FREEZE; > > The commands I used are: > > vacuumdb -afFv > vacuumdb --all --full --freeze --verbose > > I've tried moving the switches round to put them in the order > specified in the documentation, just in case it had any effect on the > order of the keywords, but it doesn't.=A0 I can run this manually in > psql using: > > VACUUM FULL FREEZE VERBOSE; > > This is either a bug in vacuumdb with it not using the correct order, > or postgres shouldn't be paying attention to the order of the > keywords.=A0 In any case, it doesn't work.=A0 I've searched the postgres > FAQs, TODO and mailing list archives, but can't find a mention of > this. > > Thanks > > Thom > I should also mention this is using PostgreSQL 8.4.1 and vacuumdb is dated 2009-09-03. The error also still occurs if I remove FULL from the command. Thom
Thom Brown wrote: > This is either a bug in vacuumdb with it not using the correct order, > or postgres shouldn't be paying attention to the order of the > keywords. In any case, it doesn't work. I've searched the postgres > FAQs, TODO and mailing list archives, but can't find a mention of > this. Thanks, fixed. We had the same bug with FREEZE and ANALYZE combination, which was fixed in April, but the order between FREEZE and VERBOSE was still incorrect. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
2009/10/16 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>: > Thom Brown wrote: >> This is either a bug in vacuumdb with it not using the correct order, >> or postgres shouldn't be paying attention to the order of the >> keywords. =A0In any case, it doesn't work. =A0I've searched the postgres >> FAQs, TODO and mailing list archives, but can't find a mention of >> this. > > Thanks, fixed. We had the same bug with FREEZE and ANALYZE combination, > which was fixed in April, but the order between FREEZE and VERBOSE was > still incorrect. > > -- > =A0Heikki Linnakangas > =A0EnterpriseDB =A0 http://www.enterprisedb.com > Thanks Heikki. You probably already know, but remember to prevent it using FREEZE at all for 8.5+ as according to the documentation it's being deprecated. Thom
Thom Brown wrote: > Thanks Heikki. You probably already know, but remember to prevent it > using FREEZE at all for 8.5+ as according to the documentation it's > being deprecated. It's been documented as deprecated since 8.2, in favor of the vacuum_freeze_max_age option. However, it's still widely used in the field, and there's no immediate reason to remove it, so I don't think we're actually going to remove it in the foreseeable future. -- Heikki Linnakangas EnterpriseDB http://www.enterprisedb.com
2009/10/16 Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>: > Thom Brown wrote: >> Thanks Heikki. =A0You probably already know, but remember to prevent it >> using FREEZE at all for 8.5+ as according to the documentation it's >> being deprecated. > > It's been documented as deprecated since 8.2, in favor of the > vacuum_freeze_max_age option. However, it's still widely used in the > field, and there's no immediate reason to remove it, so I don't think > we're actually going to remove it in the foreseeable future. > > -- > =A0Heikki Linnakangas > =A0EnterpriseDB =A0 http://www.enterprisedb.com > Sorry, I mean the actual keyword will be removed meaning it would error if used as an option, although whether it'll be in 8.5 I don't actually know. Thom
On Fri, Oct 16, 2009 at 6:39 AM, Heikki Linnakangas <heikki.linnakangas@enterprisedb.com> wrote: > Thom Brown wrote: >> This is either a bug in vacuumdb with it not using the correct order, >> or postgres shouldn't be paying attention to the order of the >> keywords. =A0In any case, it doesn't work. =A0I've searched the postgres >> FAQs, TODO and mailing list archives, but can't find a mention of >> this. > > Thanks, fixed. We had the same bug with FREEZE and ANALYZE combination, > which was fixed in April, but the order between FREEZE and VERBOSE was > still incorrect. The fact that this is order-sensitive is just a trap for the unwary anyway. I wonder if we ought to implement a flexible options syntax like we did for EXPLAIN and COPY, though since I don't know of any new options that are needed here maybe it's not worth it. ...Robert
2009/10/16 Robert Haas <robertmhaas@gmail.com>: > The fact that this is order-sensitive is just a trap for the unwary > anyway. =A0I wonder if we ought to implement a flexible options syntax > like we did for EXPLAIN and COPY, though since I don't know of any new > options that are needed here maybe it's not worth it. > > ...Robert > I'd personally prefer options that could be used in any order as it means you only have to remember the keywords, not also the order of them as specified in the documentation. As long as the order doesn't affect the functioning of the command, I don't see the harm. It just makes it easier to use. Thom