sequence locking

From: Andres Freund <andres(at)anarazel(dot)de>
To: PG Hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: sequence locking
Date: 2011-09-21 15:15:41
Message-ID: 201109211715.41709.andres@anarazel.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

I find the current behaviour of locking of sequences rather problematic.
Multiple things:

- First and foremost I find it highly dangerous that "ALTER SEQUENCE ..." is
for the biggest part not transactional. I think about the only transaction
part is the name, owner and schema.
Sure, its documented, but ...

The cited reasons for wanting that behaviour look a bit bogus to me? Why
should concurrency be important when doing an ALTER SEQUENCE?

- Its impossible to emulate proper locking yourself because locking is not
allowed for sequences

The first one looks rather hard to solve to me with my passing knowledge of
the sequence, but probably worthy of a TODO entry.

The second one looks easier. Any arguments against allowing it again? It seems
to have been allowed in prehistoric times.

Greetings,

Andres

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Florian Pflug 2011-09-21 15:20:10 Re: Range Types - typo + NULL string constructor
Previous Message Andrew Dunstan 2011-09-21 15:03:15 Re: Inlining comparators as a performance optimisation