Skip site navigation (1) Skip section navigation (2)

Re: BUG #7809: Running pg_dump on slave w/ streaming replication fails if there are unlogged tables

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: joe(at)tanga(dot)com, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Cc: pgsql-bugs <pgsql-bugs(at)postgresql(dot)org>
Subject: Re: BUG #7809: Running pg_dump on slave w/ streaming replication fails if there are unlogged tables
Date: 2013-01-15 21:35:36
Message-ID: CABUevEwgKT97BLYE_MoQCrHsxWU-uyJS8c8f1KVkDo2OxBO-eQ@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-bugspgsql-hackers
On Tue, Jan 15, 2013 at 12:13 AM,  <joe(at)tanga(dot)com> wrote:
> The following bug has been logged on the website:
>
> Bug reference:      7809
> Logged by:          Joe Van Dyk
> Email address:      joe(at)tanga(dot)com
> PostgreSQL version: 9.2.2
> Operating system:   Ubuntu
> Description:
>
> Running pg_dump on a streaming replication slave with a database that has
> unlogged_tables will fail unless you provide the "--no-unlogged-table-data"
> option with the following (scary) error:
>
> pg_dump: Dumping the contents of table "tracking_import_data" failed:
> PQgetResult() failed.
> pg_dump: Error message from server: ERROR:  could not open file
> "base/16388/190326": No such file or directory
> pg_dump: The command was: COPY public.tracking_import_data (uuid,
> tracking_number) TO stdout;
>
> (this guy  encountered the error as well:
> http://www.postgresql.org/message-id/DE2DE764-307D-4A23-A9A9-6608AC0977CB@ticketevolution.com
> )
>
> Could running pg_dump against a slave always use the
> "--no-unlogged-table-data" option?

That sounds like a pretty reasonable idea, I think. Should be easy
enough to figure out at an early stage, too.

That said, it wouldn't hurt if we could make that error a little less
scary. Instead of saying "could not open file", could we find a way to
say "this is an unlogged table on a slave, it's not going to work"?

We can fix pg_dump the easy way, but what about custom tools...


--
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/


In response to

Responses

pgsql-hackers by date

Next:From: David E. WheelerDate: 2013-01-15 21:36:30
Subject: Re: json api WIP patch
Previous:From: Gavin FlowerDate: 2013-01-15 21:34:38
Subject: Re: json api WIP patch

pgsql-bugs by date

Next:From: Tomonari KatsumataDate: 2013-01-16 05:48:41
Subject: Re: BUG #7803: Replication Problem(no master is there)
Previous:From: analyst.kleberDate: 2013-01-15 19:50:08
Subject: BUG #7813: Problem in installation

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group