Re: backend crash with FATAL: BeginInternalSubTransaction: unexpected state END

Поиск
Список
Период
Сортировка
От Frank van Vugt
Тема Re: backend crash with FATAL: BeginInternalSubTransaction: unexpected state END
Дата
Msg-id 200705302146.17526.ftm.van.vugt@foxi.nl
обсуждение исходный текст
Ответ на Re: backend crash with FATAL: BeginInternalSubTransaction: unexpected state END  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: backend crash with FATAL: BeginInternalSubTransaction: unexpected state END  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
> > Ok, so for patch-sake, when I change BeginInternalSubTransaction() in
> > xact.c by moving these two cases to the upper set
> > (TBLOCK_STARTED/INPROGRESS/SUBINPROGRESS), then I should be ok?

> Try it and see ...

Been there, done that, seems to work (both the example as well as my usecase).

Will keep an eye on the committers list to see what eventually makes it 'til
there. What did the trick for me was:


# diff -u src/backend/access/transam/xact.c_orig
src/backend/access/transam/xact.c
--- src/backend/access/transam/xact.c_orig      2007-05-30 17:38:10.000000000
+0200
+++ src/backend/access/transam/xact.c   2007-05-30 18:34:40.000000000 +0200
@@ -3319,6 +3319,8 @@
                case TBLOCK_STARTED:
                case TBLOCK_INPROGRESS:
                case TBLOCK_SUBINPROGRESS:
+               case TBLOCK_END:
+               case TBLOCK_PREPARE:
                        /* Normal subtransaction start */
                        PushTransaction();
                        s = CurrentTransactionState;            /* changed by
push */
@@ -3335,7 +3337,6 @@
                case TBLOCK_DEFAULT:
                case TBLOCK_BEGIN:
                case TBLOCK_SUBBEGIN:
-               case TBLOCK_END:
                case TBLOCK_SUBEND:
                case TBLOCK_ABORT:
                case TBLOCK_SUBABORT:
@@ -3345,7 +3346,6 @@
                case TBLOCK_SUBABORT_PENDING:
                case TBLOCK_SUBRESTART:
                case TBLOCK_SUBABORT_RESTART:
-               case TBLOCK_PREPARE:
                        elog(FATAL, "BeginInternalSubTransaction: unexpected
state %s",
                                 BlockStateAsString(s->blockState));
                        break;



So Tom, thanks a lot for your swift reply and solution !


--
Best,




Frank.

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

Предыдущее
От: Pedro Gimeno Fortea
Дата:
Сообщение: Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user
Следующее
От: Pedro Gimeno Fortea
Дата:
Сообщение: Re: BUG #3319: Superuser can't revoke grants on a schema given by aother user