Re: How to generate unique invoice numbers for each day

From: Thomas Kellerer <spam_eater(at)gmx(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: Re: How to generate unique invoice numbers for each day
Date: 2011-01-16 23:04:27
Message-ID: igvthr$g5b$1@dough.gmane.org
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Tomas Vondra wrote on 16.01.2011 23:41:
> Yes, locking may in some cases lead to deadlocks, that's true. For
> example creating several invoices (for different days) in a single
> transaction may lead to a deadlock. But that's a feature, not a bug.

Hmm, a single transaction cannot deadlock itself as far as I know.
A deadlock can only happen between two different transactions (T1 locks R1, waits for R2, T2 locks R2 waits for R1)

Regards
Thomas

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Steve Litt 2011-01-16 23:20:24 Re: Crosstab query on huge amount of values
Previous Message Tomas Vondra 2011-01-16 22:41:39 Re: How to generate unique invoice numbers for each day