Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags

Поиск
Список
Период
Сортировка
От Amit Kapila
Тема Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags
Дата
Msg-id CAA4eK1+EdYN6GmgX9b4nGpo_Yvi-SVvTPOe2OynX-sf5qoMiAQ@mail.gmail.com
обсуждение исходный текст
Ответ на Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags  ("Seki, Eiji" <seki.eiji@jp.fujitsu.com>)
Ответы Re: [HACKERS] Proposal: GetOldestXminExtend for ignoring arbitraryvacuum flags  (Haribabu Kommi <kommi.haribabu@gmail.com>)
Список pgsql-hackers
On Wed, Feb 15, 2017 at 12:03 PM, Seki, Eiji <seki.eiji@jp.fujitsu.com> wrote:
> Amit Kapila wrote:
>> How will you decide just based on oldest xmin whether the tuple is visible or not?  How will you take decisions
abouttuples which have xmax set? 
>
> In our use case, GetOldestXmin is used by an original maintainer process[es] to an original control table[s]. The
tablecan be concurrently read or inserted in any transactions. However, rows in the table can be deleted (set xmax)
onlyby 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.
>

Oh, this is a very specific case for which such an API can be useful.
Earlier, I have seen that people proposing some kind of hooks which
can be used for their specific purpose but exposing an API or changing
the signature of an API sound bit awkward.  Consider tomorrow someone
decides to change this API for some reason, it might become difficult
to decide because we can't find it's usage.

--
With Regards,
Amit Kapila.
EnterpriseDB: http://www.enterprisedb.com



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

Предыдущее
От: Michael Paquier
Дата:
Сообщение: Re: [HACKERS] SCRAM authentication, take three
Следующее
От: Robert Haas
Дата:
Сообщение: Re: [HACKERS] Parallel Index Scans