Re: BUG #15631: Generated as identity field in a temporary table withon commit drop corrupts system catalogs
От | Peter Eisentraut |
---|---|
Тема | Re: BUG #15631: Generated as identity field in a temporary table withon commit drop corrupts system catalogs |
Дата | |
Msg-id | 043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com обсуждение исходный текст |
Ответ на | Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs (Tom Lane <tgl@sss.pgh.pa.us>) |
Ответы |
Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs
|
Список | pgsql-bugs |
On 11/02/2019 21:33, Tom Lane wrote: > I don't have time to probe further right now, but I believe what is > wrong is that we're missing a CommandCounterIncrement call after the > sequence is created, or at least after its internal dependency on the > table column is created. When the transaction commits immediately, > dependency.c fails to see the internal dependency entry and so it > doesn't remove the sequence. Wrapped in a transaction, there's a > CCI somewhere and all is well. Right. I think it would be good to put a CommandCounterIncrement() at the top of PreCommit_on_commit_actions(). That ensures that the dependency code always see the latest state. > That bollixes later attempts to clean out the temp > namespace, since deletion tries to recurse to the missing table. Should there be some warnings when this happens? -- Peter Eisentraut http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services
В списке pgsql-bugs по дате отправления: