Re: Force explicit transactions on insert / update

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

 



Jesper Krogh <jesper@xxxxxxxx> wrote:
 
> Is there any way I can force explicit use of transactions on 
> insert/updates?
> 
> I do have users sitting on the system, that may forget to code it
> that way and it would be nice to be able to force the database to
> just kick them out if it didn't happen.
 
Not that I can think of, unless you pass the queries through some
proxy which enforces the rule.  Generally, a statement outside of an
explicit transaction block starts its own transaction for just that
statement, just as if the statement were wrapped in BEGIN/COMMIT. 
You could maybe get glimpses of such statements by periodically
looking at pg_stat_activity for statements which have the same
timestamp for xact_start and query_start.
 
-Kevin

-- 
Sent via pgsql-admin mailing list (pgsql-admin@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-admin


[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