Re: Significance of backend_xmin in pg_stat_activity view

Поиск
Список
Период
Сортировка
От postgann2020 s
Тема Re: Significance of backend_xmin in pg_stat_activity view
Дата
Msg-id CANynezOr0mqqw3z8HkJWei2H_EU39nhmt_3gqUVUTWwG+G_iow@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Significance of backend_xmin in pg_stat_activity view  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-admin
Thank you for the clarification. 

On Tue, Apr 7, 2020, 11:57 AM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2020-04-06 at 23:11 +0530, postgann2020 s wrote:
> Could someone please explain what is the significance of backend_xmin in pg_stat_activity view.
>
> Is xmin same as backend_xmin?

It is the backend's xmin horizon.

That means that it is the oldest transaction ID whose effects may not be
visible to the transaction running in the backend.

Since transaction IDs are stored in each row to determine its visibility,
the minimum of the "backend_xmin" of all backends determines the cut-off
point beyond which all backends will agree on the visibility of tuples.

This is for example relevant for VACUUM: it cannot remove any dead tuples
that contain a transaction ID that is not older than any backend's
"backend_xmin" (unless the tuple is "frozen", but that leads too far).

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

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

Предыдущее
От: Donato Marrazzo
Дата:
Сообщение: Re: How to get more than 2^32 BLOBs
Следующее
От: postgann2020 s
Дата:
Сообщение: Need help to resolve plprofiler error "Exception: No profiling data found"