From: | Kuntal Ghosh <kuntalghosh(dot)2007(at)gmail(dot)com> |
---|---|
To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Incorrect XLogRegisterBuffer flag for revmapbuf in brin |
Date: | 2016-11-09 12:33:16 |
Message-ID: | CAGz5QCJ=00UQjScSEFbV=0qO5ShTZB9WWz_Fm7+Wd83zPs9Geg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
Hi all,
In brin_doupdate(line 290), REGBUF_STANDARD is used to register
revmap buffer reference in WAL record. But, revmap buffer page doesn't
have a standard page layout and it doesn't update pd_upper and
pd_lower as well.
Either we should register revmapbuf as following:
XLogRegisterBuffer(1, revmapbuf, 0);
Or, we can update the pd_upper and pd_lower in brin_page_init() as follows:
if (BRIN_IS_REVMAP_PAGE(page))
p->pd_lower = p->upper.
To fix this, I've attached a small patch which follows the first approach.
--
Thanks & Regards,
Kuntal Ghosh
EnterpriseDB: http://www.enterprisedb.com
Attachment | Content-Type | Size |
---|---|---|
revmapbuf_xlogregister_flag_v1.patch | application/x-download | 536 bytes |
From | Date | Subject | |
---|---|---|---|
Next Message | Peter Eisentraut | 2016-11-09 14:02:41 | Re: IPv6 link-local addresses and init data type |
Previous Message | Amit Langote | 2016-11-09 11:14:27 | Re: Declarative partitioning - another take |