Re: Add 64-bit XIDs into PostgreSQL 15 - Mailing list pgsql-hackers

From Zhang Mingli
Subject Re: Add 64-bit XIDs into PostgreSQL 15
Date
Msg-id 8d4c0e9b-85ce-40bb-b8fb-5af99d61abd8@Spark
Whole thread Raw
In response to Re: Add 64-bit XIDs into PostgreSQL 15  (Maxim Orlov <orlovmg@gmail.com>)
List pgsql-hackers
Hi,

With these patches, it seems that we don’t need to handle wraparound in 
GetNextLocalTransactionId() too, as LocalTransactionId is unit64 now.

```
LocalTransactionId
GetNextLocalTransactionId(void)
{
    LocalTransactionId result;

    /* loop to avoid returning InvalidLocalTransactionId at wraparound */
    do
    {
        result = nextLocalTransactionId++;
    } while (!LocalTransactionIdIsValid(result));

    return result;
}
```

Regards,
Zhang Mingli

pgsql-hackers by date:

Previous
From: Amit Langote
Date:
Subject: Re: missing indexes in indexlist with partitioned tables
Next
From: Masahiko Sawada
Date:
Subject: Re: [PoC] Improve dead tuple storage for lazy vacuum