On Thu, 27 Oct 2022 at 21:07, Justin Pryzby <pry...@telsasoft.com> wrote: > > On Thu, Oct 27, 2022 at 10:31:31AM +0100, Simon Riggs wrote: > > Allows both ANALYZE and vacuum of toast tables, but not VACUUM FULL. > > Maybe I misunderstood what you meant: you said "not VACUUM FULL", but > with your patch, that works: > > postgres=# begin; VACUUM FULL pg_class; commit; > BEGIN > VACUUM > COMMIT > > Actually, I've thought before that it was bit weird that CLUSTER can be > run within a transaction, but VACUUM FULL cannot (even though it does a > CLUSTER behind the scenes). VACUUM FULL can process multiple relations, > whereas CLUSTER can't, but it seems nice to allow vacuum full for the > case of a single relation. > > I haven't checked the rest of the patch, but +1 for allowing VACUUM FULL > within a user txn.
My intention was to prevent that. I am certainly quite uneasy about changing anything related to CLUSTER/VF, since they are old, complex and bug prone. So for now, I will block VF, as was my original intent. I will be guided by what others think... so you may yet get your wish. > Maybe the error message needs to be qualified "...when multiple > relations are specified". > > ERROR: VACUUM cannot run inside a transaction block Hmm, that is standard wording based on the statement type, but I can set a CONTEXT message also. Will update accordingly. Thanks for your input. -- Simon Riggs http://www.EnterpriseDB.com/