[Info-ingres] The lock escalation that shouldn't?

Martin Bowes martin.bowes at ndph.ox.ac.uk
Mon Dec 4 12:44:14 UTC 2017


Hi All,

I have system_maxlocks set to 50.

I have a query which is going to insert an estimated 3132 pages into a table. Actual is

Why isn't it initiating with a lock at table level? It takes an IX lock at table level but then starts locking at page level before the inevitable escalation. And thus filling my errlog with lock escalation messages.

8443          ]: Mon Dec  4 12:41:17 2017 E_DM9063_LK_TABLE_MAXLOCKS    Current logical lock count ( 51 ) on resource lb in database bowtest exceeds the specified maximum ( 50 ). Escalating to table level lock.
METRO_NDPH_OX_AC_U::[42013             , 4437      ,  00007fe95b4b1580, dm0p.c:28443          ]: PQuery:  INSERT INTO lb ( usubjid, lbtestcd, lbtest, lbcat, lborres, lborresu, lbstresc, lbstresn, lbstresu, lbdtc, lbendtc, appttype_id, apptnum ) SELECT 'SR' + varchar(a.pt_id), 'WBC', 'White blood cells', 'HEMATOLOGY', b.white, '1000/uL x 100', b.white / 100, b.white / 100, '1000/uL', date_trunc('day', a.datetime), date_trunc('day', a.datetime), a.appttype_id, a.apptnum FROM blood b join appt a on b.appt_id = a.appt_id WHERE b.white is not null

Martin Bowes
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20171204/7ef9214f/attachment.html>


More information about the Info-ingres mailing list