[HACKERS] sequence locking

2011-09-21 Thread Andres Freund
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

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed in prehistoric times. It would be nice to allow it. I've had to create a dummy

Re: [HACKERS] sequence locking

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:03:17 Kevin Grittner wrote: Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because

Re: [HACKERS] sequence locking

2011-09-21 Thread Tom Lane
Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It seems to have been allowed in prehistoric times. If you

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:24:55 Tom Lane wrote: Kevin Grittner kevin.gritt...@wicourts.gov writes: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking yourself because locking is not allowed for sequences Any arguments against allowing it again? It

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund and...@anarazel.de wrote: On Wednesday 21 Sep 2011 19:24:55 Tom Lane wrote: One question is what you think the lock means. I believe for example that taking a non-exclusive regular table lock on a sequence would not prevent other sessions from doing nextval(); even an

Re: [HACKERS] sequence locking

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 12:03 PM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Merlin Moncure mmonc...@gmail.com wrote: On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner kevin.gritt...@wicourts.gov wrote: Andres Freund and...@anarazel.de wrote: - Its impossible to emulate proper locking