From: | Peter Eisentraut <peter_e(at)gmx(dot)net> |
---|---|
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-14 16:18:16 |
Message-ID: | 48F4C648.6010100@gmx.net |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | 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.
From | Date | Subject | |
---|---|---|---|
Next Message | Hannu Krosing | 2008-10-14 16:19:07 | Re: Window Functions |
Previous Message | Dave Page | 2008-10-14 16:13:09 | Re: 8.3 .4 + Vista + MingW + initdb = ACCESS_DENIED |