Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?

From: Simon Riggs <simon(at)2ndQuadrant(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgreSQL(dot)org
Subject: Re: CLUSTER, REINDEX, VACUUM in "read only" transaction?
Date: 2008-10-13 14:50:04
Message-ID: 1223909405.7007.421.camel@ebony.2ndQuadrant
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: 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.com
PostgreSQL Training, Services and Support

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Heikki Linnakangas 2008-10-13 15:29:56 Re: pg_upgrade: convert on read is dead end
Previous Message Heikki Linnakangas 2008-10-13 14:33:34 Re: TODO item: adding VERBOSE option to CLUSTER [with patch]