Обсуждение: What are multixactids?

Поиск
Список
Период
Сортировка

What are multixactids?

От
hubert depesz lubaczewski
Дата:
Hi,
when working on fixing the bug related to vacuum freeze, I found out
that there is something called "MultiXactId".

Searching docs showed that it is mentioned only once, in release notes
to 9.3.2:
http://www.postgresql.org/search/?u=%2Fdocs%2F9.3%2F&q=multixactid

What's more - I found that Peter Eisentraut already once asked about
them, and lack of documentation:
http://postgresql.1045698.n5.nabble.com/MultiXactId-concept-underdocumented-td5766754.html

So, my question is - what are multixactids, what are they used for,
where can I find any documentation/explanation/whatever?

It seems to be related in some way to the relfrozenxid/vacuum bug, but
I can't comprehend the relation without knowing what multixactid
actually is.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                  http://depesz.com/ 

Re: What are multixactids?

От
Andreas Karlsson
Дата:
On 12/09/2013 06:04 PM, hubert depesz lubaczewski wrote:
> Hi,
> when working on fixing the bug related to vacuum freeze, I found out
> that there is something called "MultiXactId".
>
> Searching docs showed that it is mentioned only once, in release notes
> to 9.3.2:
> http://www.postgresql.org/search/?u=%2Fdocs%2F9.3%2F&q=multixactid
>
> What's more - I found that Peter Eisentraut already once asked about
> them, and lack of documentation:
> http://postgresql.1045698.n5.nabble.com/MultiXactId-concept-underdocumented-td5766754.html
>
> So, my question is - what are multixactids, what are they used for,
> where can I find any documentation/explanation/whatever?
>
> It seems to be related in some way to the relfrozenxid/vacuum bug, but
> I can't comprehend the relation without knowing what multixactid
> actually is.

As you can see from Peter's message it is explained in 
README.tuplock[1]. Basically it is used whenever more than one lock is 
acquired on the same tuples as a reference to where the locks are 
stored. It can store updated/deleted Xid for the tuple so it needs to be 
persisted.

I recommend you read the section in README.tuplock.

1. 

https://github.com/postgres/postgres/blob/d9250da032e723d80bb0150b9276cc544df6a087/src/backend/access/heap/README.tuplock#L68

-- 
Andreas Karlsson



Re: What are multixactids?

От
hubert depesz lubaczewski
Дата:
On Mon, Dec 09, 2013 at 07:59:10PM +0100, Andreas Karlsson wrote:
> As you can see from Peter's message it is explained in
> README.tuplock[1]. Basically it is used whenever more than one lock
> is acquired on the same tuples as a reference to where the locks are
> stored. It can store updated/deleted Xid for the tuple so it needs
> to be persisted.
> I recommend you read the section in README.tuplock.
> 1.
https://github.com/postgres/postgres/blob/d9250da032e723d80bb0150b9276cc544df6a087/src/backend/access/heap/README.tuplock#L68

Thanks. Read that. Still, it would be good to have some information in
normal docs, but I guess this has to do for now.

Best regards,

depesz

--
The best thing about modern society is how easy it is to avoid contact with it.
                  http://depesz.com/ 

Re: What are multixactids?

От
Andreas Karlsson
Дата:
On 12/09/2013 08:05 PM, hubert depesz lubaczewski wrote:
> Thanks. Read that. Still, it would be good to have some information in
> normal docs, but I guess this has to do for now.

It is mentioned several times in the documentation but I do not think it 
is explained anywhere.

-- 
Andreas Karlsson



Re: What are multixactids?

От
Jim Nasby
Дата:
On 12/9/13 1:05 PM, hubert depesz lubaczewski wrote:
> On Mon, Dec 09, 2013 at 07:59:10PM +0100, Andreas Karlsson wrote:
>> I recommend you read the section in README.tuplock.
>> 1.
https://github.com/postgres/postgres/blob/d9250da032e723d80bb0150b9276cc544df6a087/src/backend/access/heap/README.tuplock#L68

+1, even if it's just a link to the README. I also started wondering what these were while investigating the vacuum
bugs.

I'd submit a patch, but I don't have doc builds working :(
-- 
Jim C. Nasby, Data Architect                       jim@nasby.net
512.569.9461 (cell)                         http://jim.nasby.net