From: reg_pg_stefanz@perfexpert.ch
To: Vijaykumar Jain <vjain@opentable.com>
To: pgsql-general@lists.postgresql.org
Subject: Re: xmin and very high number of concurrent transactions
Date: Wed, 13 Mar 2019 07:09:58 +0100
Message-ID: <36aeac1a-2f70-3e75-68a4-89e174d28646@perfexpert.ch> (raw)
In-Reply-To: <CAE7uO5hEyOdCGw02j6JqJzZAje2b20kzFco9h3Lwia3ahfivtw@mail.gmail.com>
References: <CAE7uO5hEyOdCGw02j6JqJzZAje2b20kzFco9h3Lwia3ahfivtw@mail.gmail.com>
I may have misunderstood the documentation or your question, but I had
the understanding that xmin is not updated, but is only set on insert
(but yes, also for update, but updates are also inserts for Postgres as
updates are executed as delete/insert)
from https://www.postgresql.org/docs/10/ddl-system-columns.html
> xmin
> The identity (transaction ID) of the inserting transaction for this
row version. (A row version is an individual state of > row; each update
of a row creates a new row version for the same logical row.)
therfore I assume, there are no actual updates of xmin values
Stefan
On 12.03.2019 20:19, Vijaykumar Jain wrote:
> I was asked this question in one of my demos, and it was interesting one.
>
> we update xmin for new inserts with the current txid.
> now in a very high concurrent scenario where there are more than 2000
> concurrent users trying to insert new data,
> will updating xmin value be a bottleneck?
>
> i know we should use pooling solutions to reduce concurrent
> connections but given we have enough resources to take care of
> spawning a new process for a new connection,
>
> Regards,
> Vijay
>
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-general@postgresql.org
Cc: reg_pg_stefanz@perfexpert.ch, vjain@opentable.com
Subject: Re: xmin and very high number of concurrent transactions
In-Reply-To: <36aeac1a-2f70-3e75-68a4-89e174d28646@perfexpert.ch>
References: <CAE7uO5hEyOdCGw02j6JqJzZAje2b20kzFco9h3Lwia3ahfivtw@mail.gmail.com> <36aeac1a-2f70-3e75-68a4-89e174d28646@perfexpert.ch>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox