Re: CLUSTER, REINDEX, VACUUM in "read only" transaction? - Mailing list pgsql-hackers

From Simon Riggs
Subject Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?
Date
Msg-id 1223909405.7007.421.camel@ebony.2ndQuadrant
Whole thread Raw
In response to CLUSTER, REINDEX, VACUUM in "read only" transaction?  (Tom Lane <tgl@sss.pgh.pa.us>)
List pgsql-hackers
On Fri, 2008-10-10 at 09:41 -0400, 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 you should add a few more to the list.

* LISTEN, UNLISTEN, NOTIFY
* nextval()
* ANALYZE
* CHECKPOINT
* GRANT, REVOKE, REASSIGN
* DISCARD ALL should not run UnlistenAll

These are all gaps I will have to plug for Hot Standby, and in fact
wrote code this morning for some of those before I saw this post.

(Yes, I went through every command).

If you're gonna do it, do it soon please, so I know not to bother any
further.

-- Simon Riggs           www.2ndQuadrant.comPostgreSQL Training, Services and Support



pgsql-hackers by date:

Previous
From: Heikki Linnakangas
Date:
Subject: Re: TODO item: adding VERBOSE option to CLUSTER [with patch]
Next
From: Heikki Linnakangas
Date:
Subject: Re: pg_upgrade: convert on read is dead end