Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Simon Riggs
On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a SELECT statement is complete when in a transaction block? *Any* lock acquired by user

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Atri Sharma
On Tue, Mar 11, 2014 at 10:56 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a SELECT

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Simon Riggs
On 11 March 2014 17:29, Atri Sharma atri.j...@gmail.com wrote: On Tue, Mar 11, 2014 at 10:56 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Atri Sharma
On Tue, Mar 11, 2014 at 11:07 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 17:29, Atri Sharma atri.j...@gmail.com wrote: On Tue, Mar 11, 2014 at 10:56 PM, Simon Riggs si...@2ndquadrant.com wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-11 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 On 03/11/2014 12:26 PM, Simon Riggs wrote: On 11 March 2014 03:41, Tom Lane t...@sss.pgh.pa.us wrote: Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a

[HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-10 Thread Joe Conway
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a SELECT statement is complete when in a transaction block? E.g.: 8- create table t1 (); begin; select * from t1; select

Re: [HACKERS] Why is AccessShareLock held until end of transaction?

2014-03-10 Thread Tom Lane
Joe Conway m...@joeconway.com writes: I am probably missing something obvious, but why does the AccessShareLock remain held on a table after a SELECT statement is complete when in a transaction block? *Any* lock acquired by user command is held till end of transaction; AccessShareLock isn't