On Thu, 13 Jul 2000, Tom Lane wrote:
> Stephan Szabo <sszabo@megazone23.bigpanda.com> writes:
> > While working with alter table add constraint, I realized we
> > get these messages if a second session blocks on the lock the
> > alter table is getting.
>
> It's coming from the relcache code, which sees that the table
> definition has been altered when the ref count on the relcache
> entry is > 0. This is unfortunately the wrong thing, because
Okay... I found the code that was giving the message, but wasn't
sure if there was a way around it that one was expected to use.
It had worried me since that meant that using an alter on a
table that might be in use would do bad things, and I didn't want
to let it through if there was some local thing in my routine
that would easily fix it.
Of course, I also really only noticed it when I ran the two really
close together or the alter table inside a transaction.