| From: | "Mikheev, Vadim" <vmikheev(at)SECTORBASE(dot)COM> | 
|---|---|
| To: | "'pgsql-hackers(at)hub(dot)org'" <pgsql-hackers(at)hub(dot)org> | 
| Subject: | Re: SetQuerySnapshot() for utility statements | 
| Date: | 2000-10-19 11:20:11 | 
| Message-ID: | 8F4C99C66D04D4118F580090272A7A23018D74@SECTORBASE1 | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | pgsql-hackers | 
> I notice that ProcessUtility() calls SetQuerySnapshot() for FETCH
> and COPY TO statements, and nothing else.
>
> Seems to me this is very broken.  Isn't a query snapshot needed for
> any utility command that might do database accesses?
Not needed. We don't support multi-versioning for schema operations.
More of that, sometimes it would be better to read *dirty* data from
system tables - so, no snapshot required.
What is really, hm, not good is that first SetQuerySnapshot defines
serializable snapshot for *all* transactions, even for ones with read
committed isolevel: in the times of 6.5 I thought about ability to switch
between isolevels inside single xaction - this is not required by standard
and *bad* for system: just remember that vacuum doesn't clean up deleted
tuples if there is some transaction *potentially* interested in them. For
read
committed xactions must be no serializable snapshot defined and
MyProc->xmin must be updated when *each*  top-level query begins.
Vadim
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Mikheev, Vadim | 2000-10-19 11:23:50 | Re: time stops within transaction | 
| Previous Message | Vince Vielhaber | 2000-10-19 09:56:27 | Re: Re: pg_dump docs |