Re: Undetected Deadlock

Поиск
Список
Период
Сортировка
От Michael Harris
Тема Re: Undetected Deadlock
Дата
Msg-id CADofcAVRwzHnkvY9W370Qm9xiRJ0ttrvSkMK_DSx15TDyT=SVA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Undetected Deadlock  (Michael Lewis <mlewis@entrata.com>)
Ответы Re: Undetected Deadlock  (Michael Lewis <mlewis@entrata.com>)
Список pgsql-general
> I must be missing something. You mentioned dropping a partition, so is there an actual need for the delete? Could you
detachconcurrently and then drop the table or delete rows if needed?
 

The DELETE is part of a transaction performing data loading. Our
application allows data to be overwritten. Before using a COPY to
actually store the new data, we do a DELETE to make sure there are no
existing records. We tested a number of sequences and found that the
most efficient is to perform a DELETE first, even though in most cases
there is nothing to delete, and then do the COPY (rather than for
example checking if it exists first and then deleting it).

The DROP is part of a separate transaction that is doing the data
expiry. Note that it is not dropping the same partition; old
partitions get dropped, new data is loaded into newer partitions.

Cheers
Mike



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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: PostgreSQL Management and monitoring tool
Следующее
От: Michael Lewis
Дата:
Сообщение: Re: Undetected Deadlock