Re: Is stats update during COPY IN really a good idea?

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Is stats update during COPY IN really a good idea?
Дата
Msg-id 29501.990467664@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: Is stats update during COPY IN really a good idea?  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
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


В списке pgsql-hackers по дате отправления:

Предыдущее
От: teg@redhat.com (Trond Eivind Glomsrød)
Дата:
Сообщение: Re: Using 7.1rc1 under RH 6.2
Следующее
От: "Mikheev, Vadim"
Дата:
Сообщение: RE: Plans for solving the VACUUM problem