Re: WIP: Access method extendability

Поиск
Список
Период
Сортировка
От Teodor Sigaev
Тема Re: WIP: Access method extendability
Дата
Msg-id 56FBD2D4.6050703@sigaev.ru
обсуждение исходный текст
Ответ на Re: WIP: Access method extendability  (Alexander Korotkov <a.korotkov@postgrespro.ru>)
Ответы Re: WIP: Access method extendability  (Markus Nullmeier <dq124@uni-heidelberg.de>)
Список pgsql-hackers
GenericXLogStart(Relation relation)
{
...    if (genericXlogStatus != GXLOG_NOT_STARTED)        ereport(ERROR,
(errcode(ERRCODE_OBJECT_NOT_IN_PREREQUISITE_STATE),                errmsg("GenericXLogStart: generic xlog is already
started")));


Hmm, seems, generic wal whiil be in incorrect state if exception occurs between 
GenericXLogStart() and GenericXLogFinish() calls because static variable 
genericXlogStatus will contain GXLOG_LOGGED/GXLOG_UNLOGGED status.

Suppose, it could be solved by different ways
- remove all static variable, so, GenericXLogStart() will return an struct  (object) which incapsulated all data needed
togeneric wal work. As I can  see, in case of exception there isn't ane needing to extra cleanup. Also,  it would allow
touse generic wal for two or more relations at the same time,  although I don't know any useful example for such
feature.
- add callback via RegisterResourceReleaseCallback() which will cleanup state  of genericXlogStatus variable

-- 
Teodor Sigaev                                   E-mail: teodor@sigaev.ru
  WWW: http://www.sigaev.ru/
 



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

Предыдущее
От: Stas Kelvich
Дата:
Сообщение: Re: Speedup twophase transactions
Следующее
От: Jose Luis Tallon
Дата:
Сообщение: Re: Sequence Access Method WIP