Re: Nested transactions
От
Alvaro Herrera
Тема
Re: Nested transactions
Дата
Msg-id
20040617015842.GB5925@dcc.uchile.cl
Ответ на
Re: Nested transactions (Bruce Momjian)
Список
Дерево обсуждения
Nested transactions Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Nested transactions Simon Riggs <simon@2ndquadrant.com>
Re: Nested transactions Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Nested transactions Simon Riggs <simon@2ndquadrant.com>
Re: Nested transactions Barry Lind <blind@xythos.com>
Re: Nested transactions Bruce Momjian <pgman@candle.pha.pa.us>
Re: Nested transactions Tom Lane <tgl@sss.pgh.pa.us>
Re: Nested transactions Barry Lind <blind@xythos.com>
Re: Nested transactions Oliver Jowett <oliver@opencloud.com>
Re: Nested transactions Tom Lane <tgl@sss.pgh.pa.us>
Re: Nested transactions Barry Lind <blind@xythos.com>
Re: Nested transactions Bruce Momjian <pgman@candle.pha.pa.us>
Re: Nested transactions Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Nested transactions Christopher Kings-Lynne <chriskl@familyhealth.com.au>
Re: Nested transactions Alvaro Herrera <alvherre@dcc.uchile.cl>
Re: Nested transactions Bruce Momjian <pgman@candle.pha.pa.us>
Re: Nested transactions Tom Lane <tgl@sss.pgh.pa.us>
Re: Nested transactions Bruce Momjian <pgman@candle.pha.pa.us>
Re: Nested transactions Bruce Momjian <pgman@candle.pha.pa.us>
On Wed, Jun 16, 2004 at 09:36:33PM -0400, Bruce Momjian wrote: > And consider this case: > > BEGIN; > ... > SAVEPOINT x; > SELECT func_call(); > SELECT func_call(); > COMMIT; > > Now if func_call has a savepoint, it is really nested because it can't > know whether the savepoint X will be used to roll back, so its status is > dependent on the status of X. Now, if we used savepoints in func_call, > what happens in the second function call when we define a savepoint with > the same name? Hm, that's a good question. What happens if you define two savepoints with the same name? According to SQL2003, the previous savepoint "is destroyed", but it's not clear to me whether this means rolling back all of its changes or just forgetting it. What's clear is that you can roll back only to the latest one. Also, in SQL2003 there can be multiple "savepoint levels". I think for a first implementation it would be fine if we had only one level. It would, wouldn't it? -- Alvaro Herrera () "Estoy de acuerdo contigo en que la verdad absoluta no existe... El problema es que la mentira sí existe y tu estás mintiendo" (G. Lama)
В списке pgsql-patches по дате отправления