Re: [HACKERS] sequence locking

2011-09-21 Thread Merlin Moncure
On Wed, Sep 21, 2011 at 12:03 PM, Kevin Grittner wrote: > Merlin Moncure wrote: >> On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner >> wrote: >>> Andres Freund wrote: >>> - Its impossible to emulate proper locking yourself because locking is not allowed for sequences >>> Any argu

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund 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 exclusive one wou

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:24:55 Tom Lane wrote: > "Kevin Grittner" writes: > > Andres Freund 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 i

Re: [HACKERS] sequence locking

2011-09-21 Thread Tom Lane
"Kevin Grittner" writes: > Andres Freund 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 think that it used to be allowed, it'

Re: [HACKERS] sequence locking

2011-09-21 Thread Andres Freund
On Wednesday 21 Sep 2011 19:03:17 Kevin Grittner wrote: > Merlin Moncure wrote: > > On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner > > > > wrote: > >> Andres Freund wrote: > >>> - Its impossible to emulate proper locking yourself because > >>> locking is not allowed for sequences > >>> > >>>

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Merlin Moncure wrote: > On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner > wrote: >> Andres Freund 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 Merlin Moncure
On Wed, Sep 21, 2011 at 11:51 AM, Kevin Grittner wrote: > Andres Freund 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

Re: [HACKERS] sequence locking

2011-09-21 Thread Kevin Grittner
Andres Freund 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 table just to u

[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 do