Re: [PATCHES] Infrastructure changes for recovery (v8)

Поиск
Список
Период
Сортировка
От Simon Riggs
Тема Re: [PATCHES] Infrastructure changes for recovery (v8)
Дата
Msg-id 1223472898.4747.310.camel@ebony.2ndQuadrant
обсуждение исходный текст
Ответ на Re: [PATCHES] Infrastructure changes for recovery (v8)  (Simon Riggs <simon@2ndQuadrant.com>)
Ответы Re: [PATCHES] Infrastructure changes for recovery (v8)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: [PATCHES] Infrastructure changes for recovery (v8)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Re: [PATCHES] Infrastructure changes for recovery (v8)  (Heikki Linnakangas <heikki.linnakangas@enterprisedb.com>)
Список pgsql-hackers
On Wed, 2008-10-08 at 13:24 +0100, Simon Riggs wrote:
> On Wed, 2008-10-08 at 14:43 +0300, Heikki Linnakangas wrote:

> > Again, perhaps we should do
> > this as a separate patch.

New patch enclosed with other stuff stripped out. 15% lighter...

New thread spawned for bug fix patch. Will resubmit others when we can
be sure they'll not cause patch conflicts.

> OK, I'll strip all of the above out, for separate consideration.
> The form is this

> PM_START    startup process performs restartpoints
>         transition when database is consistent state
> PM_RECOVERY    bgwriter process performs restartpoints
>         delicate transition between two states
> PM_RUN        bgwriter process performs checkpoints

Above added as comments in patch.

The patch agonises over the two state transitions above. First
transition needs to be exactly correct otherwise we might be using an
inconsistent database during recovery. Second transition is harder
because it isn't just the startup process working alone any more.

The key to understanding it is all in concurrent behaviour. Startup and
bgwriter chat together through bgwriter shared memory and call functions
back and forth between xlog.c and bgwriter.c.

I haven't retested the patch yet, but it passes make check. I'll be
rechecking it later today, starting in about 2 hours time.

--
 Simon Riggs           www.2ndQuadrant.com
 PostgreSQL Training, Services and Support

Вложения

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

Предыдущее
От: "Merlin Moncure"
Дата:
Сообщение: Re: WITH RECURSIVE ... CYCLE in vanilla SQL: issues with arrays of rows
Следующее
От: "Dave Page"
Дата:
Сообщение: Re: Building Postgres in Eclipse