Re: WIP: Access method extendability

Поиск
Список
Период
Сортировка
От Alexander Korotkov
Тема Re: WIP: Access method extendability
Дата
Msg-id CAPpHfdvrWBG1PZVLUij=Z9L4wPEGSnztkD5OepZ8ypEzDrxN=g@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WIP: Access method extendability  (Alvaro Herrera <alvherre@2ndquadrant.com>)
Список pgsql-hackers
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 
Вложения

В списке pgsql-hackers по дате отправления:

Предыдущее
От: Aleksander Alekseev
Дата:
Сообщение: Small patch: fix code duplication in heapam.c
Следующее
От: David Rowley
Дата:
Сообщение: Re: Combining Aggregates