Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-25 Thread Dev Kumkar
On Fri, Nov 21, 2014 at 1:14 AM, Alvaro Herrera alvhe...@2ndquadrant.com
wrote:


 If there are foreign keys on the tables, the system internally runs some
 SELECT FOR KEY SHARE queries on the referenced tables (the ones
 containing the primary or unique keys).  You can get some multixacts
 that way too.

 --
 Álvaro Herrerahttp://www.2ndQuadrant.com/
 PostgreSQL Development, 24x7 Support, Training  Services


Thanks !

If I recollect correct, then is the cleanup of pg_multixact/members fixed
in 9.3.5 release?

Regards...


[GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Dev Kumkar
Hellos,

How to manually increase pg_multixact members and offsets?

Does a transaction waiting for exclusive lock or shared lock result into
entry being created in pg_multixact?

Excerpt of multixact.c:
/*-
2  *
3  * multixact.c
4  * PostgreSQL multi-transaction-log manager
5  *
6  * The pg_multixact manager is a pg_clog-like manager that stores an
array of
7  * MultiXactMember for each MultiXactId. It is a fundamental part of the
8  * shared-row-lock implementation.

Regards...


Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Alvaro Herrera
Dev Kumkar wrote:
 Hellos,
 
 How to manually increase pg_multixact members and offsets?

Search for burnmulti in the archives, which is a contrib module to
test pg_multixact.

 Does a transaction waiting for exclusive lock or shared lock result into
 entry being created in pg_multixact?

Merely waiting does not, but more than one lock being acquired on a
tuple does cause a multixact to be created.  Try SELECT FOR SHARE on two
transactions on the same tuple.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training  Services


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


Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Dev Kumkar
On Thu, Nov 20, 2014 at 11:15 PM, Alvaro Herrera alvhe...@2ndquadrant.com
wrote:

 Search for burnmulti in the archives, which is a contrib module to
 test pg_multixact.

Thanks, got some links. Will give a try and get back.

 Merely waiting does not, but more than one lock being acquired on a
 tuple does cause a multixact to be created.  Try SELECT FOR SHARE on two
 transactions on the same tuple.

Sure.
Also what if there are only inserts/updates which transaction have and
there are no explicit select queries?

Regards...


Re: [GENERAL] Transactions to create pg_multixact members and offsets

2014-11-20 Thread Alvaro Herrera
Dev Kumkar wrote:
 On Thu, Nov 20, 2014 at 11:15 PM, Alvaro Herrera alvhe...@2ndquadrant.com
 wrote:

  Merely waiting does not, but more than one lock being acquired on a
  tuple does cause a multixact to be created.  Try SELECT FOR SHARE on two
  transactions on the same tuple.

 Sure.
 Also what if there are only inserts/updates which transaction have and
 there are no explicit select queries?

If there are foreign keys on the tables, the system internally runs some
SELECT FOR KEY SHARE queries on the referenced tables (the ones
containing the primary or unique keys).  You can get some multixacts
that way too.

-- 
Álvaro Herrerahttp://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Training  Services


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