<html><body><div style="color:#000; background-color:#fff; font-family:times new roman, new york, times, serif;font-size:12pt"><div><span>Steve</span></div><div><br><span></span></div><div><span>Thanks to reply</span></div><div><br></div><div>This is for the process with pid 25021<br></div><div><br><span></span></div><div><br><span></span></div><div><span>Without joining and using the following query I see the tablenames (the 14 first lines)<br></span></div><div><br><span></span></div><div><span>biopacs_production=# select locktype, relation::regclass as relname,mode,granted from pg_locks where transaction is not null and pid=25021 order by relname limit 14;<br> locktype |
relname | mode | granted<br>----------+------------------------------------------------------------------------------+-----------------+---------<br> relation | pg_class | AccessShareLock | t<br> relation |
pg_namespace | AccessShareLock | t<br> relation | pg_class_oid_index | AccessShareLock | t<br> relation |
_sysrep._unittesting_key_seq | AccessShareLock | t<br> relation | _sysrep.sequence_test | AccessShareLock | t<br> relation |
globaldata."Address_AddressID_seq" | AccessShareLock | t<br> relation | globaldata."AnonymizationRuleAssociation_AnonymizationRuleAssociationID_seq" | AccessShareLock | t<br> relation | globaldata."AnonymizationRule_AnonymizationRuleID_seq" | AccessShareLock | t<br> relation | globaldata."Attachment_AttachmentID_seq" | AccessShareLock |
t<br> relation | globaldata."AuditAddress_ID_seq" | AccessShareLock | t<br> relation | globaldata."AuditAnonymizationRule_ID_seq" | AccessShareLock | t<br> relation | globaldata."AuditAnonymizationRuleAssociation_ID_seq" | AccessShareLock | t<br> relation |
globaldata."AuditAttachment_ID_seq" | AccessShareLock | t<br> relation | globaldata."AuditAttachmentLocation_ID_seq" | AccessShareLock | t<br>(14 rows)<br></span></div><div><br><span></span></div><div><span></span></div><div><br></div> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div style="font-family: times new roman, new york, times, serif; font-size: 12pt;"> <div dir="ltr"> <font face="Arial" size="2"> <hr size="1"> <b><span
style="font-weight:bold;">De :</span></b> Steve Singer <ssinger@ca.afilias.info><br> <b><span style="font-weight: bold;">À :</span></b> David TECHER <davidtecher@yahoo.fr> <br><b><span style="font-weight: bold;">Cc :</span></b> Slony Hackers <slony1-hackers@lists.slony.info> <br> <b><span style="font-weight: bold;">Envoyé le :</span></b> Mercredi 4 avril 2012 17h25<br> <b><span style="font-weight: bold;">Objet :</span></b> Re: [Slony1-hackers] CreateEvent and Lokcs on replicated objects<br> </font> </div> <br>On 12-04-04 06:25 AM, David TECHER wrote:<br>> Hi<br><br><br>I can't think of an obvious reason why a generic SYNC event would get a <br>lock on all of your tables. I don't think the SYNC event looks at <br>replicated tables .<br><br>What transactions are holding the locks? You should be able to see this <br>in your pg_locks output (joining back to pg_class to get the tablenames <br>from the
oids)<br><br><br><br><br><br><br>><br>> I am using Slony 1.2.22<br>><br>> I've noticed that when a CreateEvent occurs<br>><br>> biopacs_production=# select * from pg_stat_activity where procpid=25021;<br>> datid | datname | procpid | usesysid | usename | current_query | waiting<br>> | query_start | backend_start | client_addr | client_port<br>> -------+--------------------+---------+----------+--------------+----------------------------------------------------------------+---------+----------------------------------+----------------------------------+-------------+-------------<br>> 16387 | biopacs_production | 25021 | 10 | enterprisedb | select<br>> "_biocluster".createEvent('_biocluster', 'SYNC', NULL); | f | 04-APR-12<br>> 06:22:24.804654 -04:00 | 01-APR-12 06:53:33.363283 -04:00 | 127.0.1.1 |<br>> 42050<br>> (1 row)<br>><br>><br>> Then by querying pg_locks I've noticed that there is a
'AccessSharelock'<br>> on all replicated objects (tables and sequences).<br>><br>> It is normal?<br>><br>> Since our database used intensive CPU (high load) I asked myself if it<br>> could explained my issue.<br>><br>> Thanks for letting me know.<br>><br>> Kind regards.<br>><br>> David.<br>><br>><br>><br>> _______________________________________________<br>> Slony1-hackers mailing list<br>> <a ymailto="mailto:Slony1-hackers@lists.slony.info" href="mailto:Slony1-hackers@lists.slony.info">Slony1-hackers@lists.slony.info</a><br>> <a href="http://lists.slony.info/mailman/listinfo/slony1-hackers" target="_blank">http://lists.slony.info/mailman/listinfo/slony1-hackers</a><br><br><br><br> </div> </div> </div></body></html>