Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?
От | Peter Eisentraut |
---|---|
Тема | Re: CLUSTER, REINDEX, VACUUM in "read only" transaction? |
Дата | |
Msg-id | 48F4C648.6010100@gmx.net обсуждение исходный текст |
Ответ на | CLUSTER, REINDEX, VACUUM in "read only" transaction? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?
|
Список | pgsql-hackers |
Tom Lane wrote: > So I was looking for other omissions in utility.c, and I noticed that > check_xact_readonly() doesn't reject CLUSTER, REINDEX, or VACUUM. > Now the notion of "read only" that we're trying to enforce is pretty > weak (I think it's effectively "no writes to non-temp tables"). > But I can't see that CLUSTER is a read-only operation even under the > weakest definitions, and I'm not seeing the rationale for REINDEX or > VACUUM here either. I think the way the SQL standard meant the read-only flag is that the transaction doesn't change the structure of or the data in the database as seen by the next guy. So all of these commands are OK, I think. A theoretical use case is that you should be able to do the maximum set of useful work in read-only mode on a Slony-I slave. No I haven't checked what Slony does with these three commands, so let me have it. :-) Other definitions might be OK, but I can't see one offhand that is based on the current behavior but disallows these three commands. "No disk writes" or "no big locks" is probably not what the SQL standard meant.
В списке pgsql-hackers по дате отправления: