Re: WIP: Access method extendability

From: Alexander Korotkov <a(dot)korotkov(at)postgrespro(dot)ru>
To: Alvaro Herrera <alvherre(at)2ndquadrant(dot)com>
Cc: Petr Jelinek <petr(at)2ndquadrant(dot)com>, Michael Paquier <michael(dot)paquier(at)gmail(dot)com>, Teodor Sigaev <teodor(at)sigaev(dot)ru>, Jim Nasby <Jim(dot)Nasby(at)bluetreble(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: WIP: Access method extendability
Date: 2016-03-24 08:51:54
Message-ID: CAPpHfdvrWBG1PZVLUij=Z9L4wPEGSnztkD5OepZ8ypEzDrxN=g@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi!

Thank you for committing CREATE ACCESS METHOD command!

On Thu, Mar 24, 2016 at 4:06 AM, Alvaro Herrera <alvherre(at)2ndquadrant(dot)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

Attachment Content-Type Size
0002-generic-xlog.12.patch application/octet-stream 23.4 KB
0003-bloom-contrib.12.patch application/octet-stream 136.7 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message David Rowley 2016-03-24 09:22:15 Re: Combining Aggregates
Previous Message Aleksander Alekseev 2016-03-24 08:43:33 Small patch: fix code duplication in heapam.c