Re: Autovacuum to prevent wraparound tries to consume xid - Mailing list pgsql-hackers

From Alexander Korotkov
Subject Re: Autovacuum to prevent wraparound tries to consume xid
Date
Msg-id CAPpHfdv9YkNXWv40BpQrpOdXwgy-3ibbQu_CxUc181Hu8UZbJQ@mail.gmail.com
Whole thread Raw
In response to Autovacuum to prevent wraparound tries to consume xid  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
List pgsql-hackers
On Mon, Mar 28, 2016 at 2:05 PM, Alexander Korotkov <a.korotkov@postgrespro.ru> wrote:
After some debugging I found that vac_truncate_clog consumes xid just to produce warning.  I wrote simple patch which replaces GetCurrentTransactionId() with ShmemVariableCache->nextXid.  That completely fixes this situation for me: ShmemVariableCache was successfully updated.

I found that direct reading of ShmemVariableCache->nextXid is not corrent, it's better to use ReadNewTransactionId() then.  Fixed version of patch is attached.

------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company

Attachment

pgsql-hackers by date:

Previous
From: Craig Ringer
Date:
Subject: Re: foreign table batch inserts
Next
From: Tatsuo Ishii
Date:
Subject: Parallel query