| From: | Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru> |
|---|---|
| To: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: Autovacuum to prevent wraparound tries to consume xid |
| Date: | 2016-05-19 14:14:31 |
| Message-ID: | CAPpHfdv9YkNXWv40BpQrpOdXwgy-3ibbQu_CxUc181Hu8UZbJQ@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Mon, Mar 28, 2016 at 2:05 PM, Alexander Korotkov <
a(dot)korotkov(at)postgrespro(dot)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 | Content-Type | Size |
|---|---|---|
| fix_vac_truncate_clog_xid_consume_2.patch | application/octet-stream | 1.3 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Tatsuo Ishii | 2016-05-19 15:07:15 | Parallel query |
| Previous Message | Craig Ringer | 2016-05-19 13:07:09 | Re: foreign table batch inserts |