| From: | Peter Eisentraut <peter(dot)eisentraut(at)2ndquadrant(dot)com> | 
|---|---|
| To: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, dnsl48(at)gmail(dot)com | 
| Cc: | pgsql-bugs(at)lists(dot)postgresql(dot)org | 
| Subject: | Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs | 
| Date: | 2019-02-12 14:00:34 | 
| Message-ID: | 043b0c10-5a27-b9ff-7451-b8a2ca9327b1@2ndquadrant.com | 
| Views: | Whole Thread | Raw Message | Download mbox | Resend email | 
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tom Lane | 2019-02-12 14:27:50 | Re: BUG #15631: Generated as identity field in a temporary table with on commit drop corrupts system catalogs | 
| Previous Message | Ramanarayana | 2019-02-12 13:54:20 | Re: BUG #15548: Unaccent does not remove combining diacritical characters |