On Tue, Feb 12, 2019 at 09:27:50AM -0500, Tom Lane wrote: > Hm, I'd be more inclined to find where the sequence creation is happening > and add a CCI at the end, because that comports better with the general > plan for inserting CCIs. There may be other issues of this same sort with > doing-X-just-after-identity-sequence-creation if you don't fix it that > way.
Agreed. I don't think that it is the correct logic to put an after-the-fact CCI just before executing any drop or truncate actions. It should happen after the creation of the new object so as it becomes correctly visible within the transaction. -- Michael