Re: Sync Rep v19

Поиск
Список
Период
Сортировка
От Robert Haas
Тема Re: Sync Rep v19
Дата
Msg-id AANLkTimCQRM38Bzvjzm9FVT=0DOXh7yy6TizAyRATPFY@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Sync Rep v19  (Bruce Momjian <bruce@momjian.us>)
Ответы Re: Sync Rep v19  (Dimitri Fontaine <dimitri@2ndQuadrant.fr>)
Список pgsql-hackers
On Wed, Mar 9, 2011 at 9:21 PM, Bruce Momjian <bruce@momjian.us> wrote:
> Simon Riggs wrote:
>> On Fri, 2011-03-04 at 23:15 +0900, Fujii Masao wrote:
>>
>> > postgres=# SELECT application_name, state, sync_priority, sync_state
>> > FROM pg_stat_replication;
>> >  application_name |   state   | sync_priority | sync_state
>> > ------------------+-----------+---------------+------------
>> >  one              | STREAMING |             1 | POTENTIAL
>> >  two              | STREAMING |             2 | SYNC
>> > (2 rows)
>>
>> Bug! Thanks.
>
> Is there a reason these status are all upper-case?

Not that I know of.

However, I think that some more fundamental rethinking of the "state"
mechanism may be in order.  When Magnus first committed this, it would
say CATCHUP whenever you were behind (even if only momentarily) and
STREAMING if you were caught up.  Simon then changed it so that it
says CATCHUP until you catch up the first time, and then STREAMING
afterward (even if you fall behind again).  Neither behavior seems
completely adequate to me.  I think we should have a way to know
whether we've ever been caught up, and if so when the most recent time
was.  So you could then say things like "is the most recent time at
which the standby was caught up within the last 30 seconds?", which
would be a useful thing to monitor, and right now there's no way to do
it.  There's also a BACKUP state, but I'm not sure it makes sense to
lump that in with the others.  Some day it might be possible to stream
WAL and take a backup at the same time, over the same connection.
Maybe that should be a separate column or something.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company


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

Предыдущее
От: Bruce Momjian
Дата:
Сообщение: Re: Header comments in the recently added files
Следующее
От: Robert Haas
Дата:
Сообщение: pgindent (was Re: Header comments in the recently added files)