[Info-ingres] Deadlock on a sequence

Alex Hanshaw Alex.Hanshaw at actian.com
Tue Mar 6 13:30:50 UTC 2018


Hi Roy

You can certainly deadlock on a sequence and a table across to sessions accessing them in the reverse order. Is that what you meant?

Alex

S1:
create sequence myseq \g
create table test as select reltid from iirelation \p\g
commit; \g
update test set reltid = reltid + 1 \g

S2:
SELECT myseq.nextval AS mynextval; \g

S1:
SELECT myseq.nextval AS mynextval;\g

S2:
update test set reltid = reltid + 1 \g

S2 drops out with deadlock. Using "set lock_trace" you can see the locks taken by the nextval statements.

From: info-ingres-bounces at lists.planetingres.org <info-ingres-bounces at lists.planetingres.org> On Behalf Of Roy Hann
Sent: 06 March 2018 11:49
To: info-ingres at lists.planetingres.org
Subject: [Info-ingres] Deadlock on a sequence

Is it possible to get a resource deadlock on a sequence? For example:

SELECT myseq.nextval AS mynextval;

If it is, how could one go about inducing a deadlock?

--Roy
_______________________________________________
Info-ingres mailing list
Info-ingres at lists.planetingres.org<mailto:Info-ingres at lists.planetingres.org>
http://lists.planetingres.org/mailman/listinfo/info-ingres<http://lists.planetingres.org/mailman/listinfo/info-ingres>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.planetingres.org/pipermail/info-ingres/attachments/20180306/d6fcbca0/attachment.html>


More information about the Info-ingres mailing list