Re: What's the XID?
От | Jeff Frost |
---|---|
Тема | Re: What's the XID? |
Дата | |
Msg-id | Pine.LNX.4.64.0712270823430.2757@glacier.frostconsultingllc.com обсуждение исходный текст |
Ответ на | Re: What's the XID? (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: What's the XID?
|
Список | pgsql-admin |
On Thu, 27 Dec 2007, Tom Lane wrote: > Andrew Sullivan <ajs@crankycanuck.ca> writes: >> On Wed, Dec 26, 2007 at 05:48:14PM -0800, ivan.hou wrote: >>> if i executed "select * from mydb" twice, the XID wil be increased by 2 > >> Yep. Whereas if you did > >> BEGIN; >> SELECT 1; >> SELECT 1; >> COMMIT; > >> the xid would be increased by 1. > > But note that as of 8.3, SELECT-only transactions won't acquire an > XID and hence won't advance the counter. So if you're thinking of > writing code that depends on that behavior, don't. > Tom, So, the new XID counter won't advance unless there's at least one INSERT/UPDATE/DELETE in the transaction? Does it also update for SELECTs that call a function which does some write activity? Is there a new counter (or old one that I don't know about) that keeps track of the SELECT-only transactions? -- Jeff Frost, Owner <jeff@frostconsultingllc.com> Frost Consulting, LLC http://www.frostconsultingllc.com/ Phone: 650-780-7908 FAX: 650-649-1954
В списке pgsql-admin по дате отправления: