Re: Sync Rep v17

Поиск
Список
Период
Сортировка
От Jaime Casanova
Тема Re: Sync Rep v17
Дата
Msg-id AANLkTinmmPD_d4WnX8PqG111b_Q4UEBczbQtUMXZAwQ0@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sync Rep v17  (Robert Haas <robertmhaas@gmail.com>)
Ответы Re: Sync Rep v17  (Daniel Farina <daniel@heroku.com>)
Re: Sync Rep v17  (Yeb Havinga <yebhavinga@gmail.com>)
Список pgsql-hackers
On Sat, Feb 19, 2011 at 11:26 PM, Robert Haas <robertmhaas@gmail.com> wrote:
>
> DEBUG:  write 0/3027BC8 flush 0/3014690 apply 0/3014690
> DEBUG:  released 0 procs up to 0/3014690
> DEBUG:  write 0/3027BC8 flush 0/3027BC8 apply 0/3014690
> DEBUG:  released 2 procs up to 0/3027BC8
> WARNING:  could not locate ourselves on wait queue
> server closed the connection unexpectedly
>        This probably means the server terminated abnormally
>        before or while processing the request.
> The connection to the server was lost. Attempting reset: DEBUG:

you can make this happen more easily, i just run "pgbench -n -c10 -j10
test" and qot that warning and sometimes a segmentation fault and
sometimes a failed assertion

and the problematic code starts at
src/backend/replication/syncrep.c:277, here my suggestions on that
code.
still i get a failed assertion because of the second Assert (i think
we should just remove that one)

*************** SyncRepRemoveFromQueue(void)
*** 288,299 ****
                       if (proc->lwWaitLink == NULL)                               elog(WARNING, "could not locate
ourselves on wait queue");
!                       proc = proc->lwWaitLink;               }
               if (proc->lwWaitLink == NULL)   /* At tail */               {
!                       Assert(proc == MyProc);                       /* Remove ourselves from tail of queue */
             Assert(queue->tail == MyProc);                       queue->tail = proc; 
--- 288,300 ----
                       if (proc->lwWaitLink == NULL)                               elog(WARNING, "could not locate
ourselves on wait queue");
!                       else
!                               proc = proc->lwWaitLink;               }
               if (proc->lwWaitLink == NULL)   /* At tail */               {
!                       Assert(proc != MyProc);                       /* Remove ourselves from tail of queue */
             Assert(queue->tail == MyProc);                       queue->tail = proc; 

--
Jaime Casanova         www.2ndQuadrant.com
Professional PostgreSQL: Soporte y capacitación de PostgreSQL


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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Re: [COMMITTERS] pgsql: Make a hard state change from catchup to streaming mode.
Следующее
От: Daniel Farina
Дата:
Сообщение: Re: Sync Rep v17