Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY
От | Marc Cousin |
---|---|
Тема | Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY |
Дата | |
Msg-id | 201011171600.47254.cousinmarc@gmail.com обсуждение исходный текст |
Ответ на | Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY (Jaime Casanova <jaime@2ndquadrant.com>) |
Ответы |
Re: Review: rollback sequence reset for TRUNCATE ... RESTART IDENTITY
|
Список | pgsql-hackers |
The Wednesday 17 November 2010 15:50:36, Jaime Casanova wrote : > On Wed, Nov 17, 2010 at 8:13 AM, Marc Cousin <cousinmarc@gmail.com> wrote: > > - Does the feature work as advertised? > > > > Yes. It works consistently, isn't fooled by savepoints or multiple > > serials in a table, or concurrent transactions > > i haven't tested this nor readed the patch but i wondering what > happens in the presence of a prepared transaction (2PC), did you try > with concurrent transactions with different serialization levels? I haven't tested with 2PC. I didn't check with different isolations levels either. I just verified that locking was happening as it should : truncate is blocked by a transaction already locking the table with an AccessShareLock and vice- versa. And that Rollbacking and rollbacking to savepoint restores the sequence to the correct state : the sequence isn't restored to its value at the savepoint, but at its last value before the truncate. I don't see a special test-case with different isolation levels or 2PC. What do you have in mind ?
В списке pgsql-hackers по дате отправления: