Re: Long running query causing XID limit breach

Поиск
Список
Период
Сортировка
От yudhi s
Тема Re: Long running query causing XID limit breach
Дата
Msg-id CAEzWdqc9gwq0KwqkaZJ9hVH4bhP_RdKPVWsqzA=a8cOh_Njj=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Long running query causing XID limit breach  (sud <suds1434@gmail.com>)
Список pgsql-general

On Thu, May 23, 2024 at 11:42 AM sud <suds1434@gmail.com> wrote:

Calculation Rationale
Daily XID Usage: Approximately 4 billion rows per day implies high XID consumption.
Buffer Time: At 1 billion XIDs, you would still have 1 billion XIDs remaining, giving you roughly 12 hours to address the issue if your system consumes 200 million XIDs per hour.




OP mentioned that initially the number of business transactions is around 500million but the rows inserted across many tables are ~4-5billion in total per day. So doesn't it mean that the XID consumption will happen based on the transactions rather on the number of rows basis. Say for example ~4billion rows may be loaded using a batch size of ~1000 using bulk load, so that will be ~4million txn so it should use ~4million XID but not 4 billion XID usage. And thus making the transactions process in batches rather than row by row minimizes the XID usage. Correct? 

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

Предыдущее
От: "Peter J. Holzer"
Дата:
Сообщение: expected authentication request from server, but received H
Следующее
От: Laurenz Albe
Дата:
Сообщение: Re: Long running query causing XID limit breach