pg_dump -j against standbys

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема pg_dump -j against standbys
Дата
Msg-id CABUevEx7vVE7X2Rnrw-C7vJj1af8zsoXunsVJqCA8JWfbrab6A@mail.gmail.com
обсуждение исходный текст
Ответы Re: pg_dump -j against standbys  (Jim Nasby <Jim.Nasby@BlueTreble.com>)
Re: pg_dump -j against standbys  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
pg_dump -j against a standby server returns a pretty bad error message when pointed at a standby node:


pg_dump: [archiver (db)] query failed: ERROR:  cannot assign TransactionIds during recovery
pg_dump: [archiver (db)] query was: SELECT pg_export_snapshot()

That looks quite scary to the user, and also throws errors in the server log which monitoring tools or DBAs will react to.


PFA a patch that changes this to:
pg_dump: Synchronized snapshots are not supported on standby servers.
Run with --no-synchronized-snapshots instead if you do not need
synchronized snapshots.

which is a message similar (the hint identical) the one you get if you point it at a version older than 9.2 which doesn't have sync snapshots.

I think the cleanest way to do it is to just track if it's a standby in the AH struct as written.

Comments?

--
Вложения

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

Предыдущее
От: Alexander Korotkov
Дата:
Сообщение: Re: Is the unfair lwlock behavior intended?
Следующее
От: Nikolay Shaplov
Дата:
Сообщение: [PATCH] add missing "USING bloom" into bloom extension documentation