| From: | Magnus Hagander <magnus(at)hagander(dot)net> |
|---|---|
| To: | PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | pg_dump -j against standbys |
| Date: | 2016-05-24 11:27:05 |
| Message-ID: | CABUevEx7vVE7X2Rnrw-C7vJj1af8zsoXunsVJqCA8JWfbrab6A@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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?
--
Magnus Hagander
Me: http://www.hagander.net/
Work: http://www.redpill-linpro.com/
| Attachment | Content-Type | Size |
|---|---|---|
| pg_dump_sync_snapshots.patch | text/x-patch | 2.8 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Nikolay Shaplov | 2016-05-24 11:46:22 | [PATCH] add missing "USING bloom" into bloom extension documentation |
| Previous Message | Alexander Korotkov | 2016-05-24 10:29:37 | Re: Is the unfair lwlock behavior intended? |