Re: Streaming base backups

Поиск
Список
Период
Сортировка
От Heikki Linnakangas
Тема Re: Streaming base backups
Дата
Msg-id 4D278645.7040109@enterprisedb.com
обсуждение исходный текст
Ответ на Streaming base backups  (Magnus Hagander <magnus@hagander.net>)
Список pgsql-hackers
On 05.01.2011 15:54, Magnus Hagander wrote:
> * Suggestion from Heikki: perhaps at some point we're going to need a full
>    bison grammar for walsender commands.

Here's a patch for this (Also available at
git@github.com:hlinnaka/postgres.git, branch "streaming_base"). I
thought I know our bison/flex magic pretty well by now, but it turned
out to take much longer than I thought. But here it is.

I'm not 100% sure if this is worth the trouble quite yet. It adds quite
a lot of boilerplate code.. OTOH, having a bison grammar file makes it
easier to see what exactly the grammar is, and I like that. It's not too
bad with three commands yet, but if it expands much further a bison
grammar is a must.

At first I tried using the backend lexer for this, but it couldn't parse
the xlog-start location in the "START_REPLICATION 0/47000000" command.
In hindsight that may have been a badly chosen syntax. But as you
pointed out on IM, the lexer needed to handle this limited set of
commands is very small, so I wrote a dedicated flex lexer instead that
can handle it.

--
   Heikki Linnakangas
   EnterpriseDB   http://www.enterprisedb.com

Вложения

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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: system views for walsender activity
Следующее
От: Heikki Linnakangas
Дата:
Сообщение: Re: Streaming base backups