sequence locking - Mailing list pgsql-hackers

From Andres Freund
Subject sequence locking
Date
Msg-id 201109211715.41709.andres@anarazel.de
Whole thread Raw
Responses Re: sequence locking
List 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


pgsql-hackers by date:

Previous
From: Andrew Dunstan
Date:
Subject: Re: Inlining comparators as a performance optimisation
Next
From: Florian Pflug
Date:
Subject: Re: Range Types - typo + NULL string constructor