Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags

From: "Seki, Eiji" <seki(dot)eiji(at)jp(dot)fujitsu(dot)com>
To: 'Amit Kapila' <amit(dot)kapila16(at)gmail(dot)com>
Cc: "pgsql-hackers(at)postgresql(dot)org" <pgsql-hackers(at)postgresql(dot)org>, "'Michael Paquier'" <michael(dot)paquier(at)gmail(dot)com>
Subject: Re: Proposal: GetOldestXminExtend for ignoring arbitrary vacuum flags
Date: 2017-02-15 06:33:29
Message-ID: A11BD0E1A40FAC479D740CEFA373E203396A5580@g01jpexmbkw05
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Amit Kapila wrote:
> How will you decide just based on oldest xmin whether the tuple is visible or not? How will you take decisions about tuples which have xmax set?

In our use case, GetOldestXmin is used by an original maintainer process[es] to an original control table[s]. The table can be concurrently read or inserted in any transactions. However, rows in the table can be deleted (set xmax) only by the maintainer process. Then, one control table can be processed by only one maintainer process at once.

So I do MVCC as following.

- The maintainer's transaction:
- If xmax is set, simply ignore the tuple.
- For other tuples, read tuples if GetOldestXmin() > xmin.
- Other transactions: Do ordinal MVCC using his XID.

Note: A control table relates to a normal table relation, so get oldest xmin as to the normal table.
--
Regards,
Eiji Seki
Fujitsu

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Michael Paquier 2017-02-15 07:14:49 Re: Partitioned tables and relfilenode
Previous Message Michael Paquier 2017-02-15 06:31:41 Re: [Bug fix] PQsendQuery occurs error when target_session_attrs is set to read-write