Bruce Momjian <pgman@candle.pha.pa.us> writes:
> People are using COPY into the same table at the same time?
Yes --- we had a message from someone who was doing that (and running
into unrelated performance issues) just last week.
> My vote is to update pg_class. The VACUUM takes much more time than the
> update, and we are only updating the pg_class row, right?
What? What does VACUUM have to do with this?
The reason this is a significant issue is that the first COPY could be
inside a transaction, in which case the lock will persist until that
transaction commits, which could be awhile.
> Can't we just start a new transaction and update the pg_class row,
> that way we don't have to open it for writing during the copy.
No, we cannot; requiring COPY to happen outside a transaction block is
not acceptable.
regards, tom lane