Re: WIP: Access method extendability
Alexander Korotkov <a.korotkov@postgrespro.ru>
From: Alexander Korotkov <a.korotkov@postgrespro.ru>
To: Alvaro Herrera <alvherre@2ndquadrant.com>
Cc: Petr Jelinek <petr@2ndquadrant.com>,
Michael Paquier <michael.paquier@gmail.com>, Teodor Sigaev <teodor@sigaev.ru>, Jim Nasby <Jim.Nasby@bluetreble.com>, pgsql-hackers <pgsql-hackers@postgresql.org>
Date: 2016-03-24T08:51:54Z
Lists: pgsql-hackers
Attachments
- 0002-generic-xlog.12.patch (application/octet-stream) patch 0002
- 0003-bloom-contrib.12.patch (application/octet-stream) patch 0003
Hi!
Thank you for committing CREATE ACCESS METHOD command!
On Thu, Mar 24, 2016 at 4:06 AM, Alvaro Herrera <alvherre@2ndquadrant.com>
wrote:
> I don't quite see how this is supposed to work:
>
> + #ifdef WAL_DEBUG
> + /*
> + * If xlog debug is enabled then check produced delta. Result of delta
> + * application to saved image should be the same as current page state.
> + */
> + if (XLOG_DEBUG)
> + {
> + char tmp[BLCKSZ];
> + memcpy(tmp, image, BLCKSZ);
> + applyPageRedo(tmp, pageData->data, pageData->dataLen);
> + elog(ERROR, "result of generic xlog apply doesn't match");
> + }
> + #endif
>
> I suppose the elog(ERROR) call should be conditional ...
Good catch. Check condition was lost between versions.
Attached patches are rebased to master. Now, it checks that page images
match except area between pd_lower and pd_upper. I've tested it with WAL
debug and it works.
------
Alexander Korotkov
Postgres Professional: http://www.postgrespro.com
The Russian Postgres Company
Commits
-
Support CREATE ACCESS METHOD
- 473b93287040 9.6.0 landed
-
Restructure index access method API to hide most of it at the C level.
- 65c5fcd353a8 9.6.0 cited