Re: What's the XID?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Andrew Sullivan <ajs@xxxxxxxxxxxxxxx> 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.

			regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to majordomo@xxxxxxxxxxxxxx so that your
       message can get through to the mailing list cleanly

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux