Thread: pgsql: Make pg_dump exclude unlogged table data on hot standby slaves
Make pg_dump exclude unlogged table data on hot standby slaves Noted by Joe Van Dyk Branch ------ REL9_1_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/1cc43979cf44db0b3da77e34493689fe13484fa0 Modified Files -------------- doc/src/sgml/ref/pg_dump.sgml | 3 ++- src/bin/pg_dump/pg_dump.c | 18 ++++++++++++++++++ 2 files changed, 20 insertions(+), 1 deletions(-)
Re: pgsql: Make pg_dump exclude unlogged table data on hot standby slaves
From
Magnus Hagander
Date:
On Fri, Jan 25, 2013 at 1:31 PM, Andres Freund <andres@2ndquadrant.com> wrote: > On 2013-01-25 08:49:10 +0000, Magnus Hagander wrote: >> Make pg_dump exclude unlogged table data on hot standby slaves > > This missed the fact that there is no ExecuteSqlQueryForSingleRow and > surroundign infrastructure. Ugh, that's what I get for pushing something just before getting on a plane. Thanks for spotting. Fix looks good, except I'd just put the query text inline in PQexec() and not bother with a separate variable.. Unfortunately, the wifi at this airport refuses to let me push through ssh, and I don't really have the time to get the tunnels properly set up before my next flight. If another commiter could pick that one up and just push it (9.1 branch only), I'd appreciate it! -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
Re: pgsql: Make pg_dump exclude unlogged table data on hot standby slaves
From
Magnus Hagander
Date:
On Fri, Jan 25, 2013 at 1:59 PM, Andres Freund <andres@2ndquadrant.com> wrote: > On 2013-01-25 13:56:11 +0100, Magnus Hagander wrote: >> On Fri, Jan 25, 2013 at 1:31 PM, Andres Freund <andres@2ndquadrant.com> wrote: >> > On 2013-01-25 08:49:10 +0000, Magnus Hagander wrote: >> >> Make pg_dump exclude unlogged table data on hot standby slaves >> > >> > This missed the fact that there is no ExecuteSqlQueryForSingleRow and >> > surroundign infrastructure. >> >> Ugh, that's what I get for pushing something just before getting on a >> plane. Thanks for spotting. >> >> Fix looks good, except I'd just put the query text inline in PQexec() >> and not bother with a separate variable.. > > The query needs to get passed to check_sql_result and write_msg as well, > thats why I added the extra variable. Ahh, gotcha. > I don't think my -committers post got through (seems to be restricted), > so I am CCing -hackers so somebody else can see the patch. Ok! I just talked to Robert, and he's taking a look at it for me. -- Magnus Hagander Me: http://www.hagander.net/ Work: http://www.redpill-linpro.com/
On Fri, Jan 25, 2013 at 8:01 AM, Magnus Hagander <magnus@hagander.net> wrote: > On Fri, Jan 25, 2013 at 1:59 PM, Andres Freund <andres@2ndquadrant.com> wrote: >> On 2013-01-25 13:56:11 +0100, Magnus Hagander wrote: >>> On Fri, Jan 25, 2013 at 1:31 PM, Andres Freund <andres@2ndquadrant.com> wrote: >>> > On 2013-01-25 08:49:10 +0000, Magnus Hagander wrote: >>> >> Make pg_dump exclude unlogged table data on hot standby slaves >>> > >>> > This missed the fact that there is no ExecuteSqlQueryForSingleRow and >>> > surroundign infrastructure. >>> >>> Ugh, that's what I get for pushing something just before getting on a >>> plane. Thanks for spotting. >>> >>> Fix looks good, except I'd just put the query text inline in PQexec() >>> and not bother with a separate variable.. >> >> The query needs to get passed to check_sql_result and write_msg as well, >> thats why I added the extra variable. > > Ahh, gotcha. > > >> I don't think my -committers post got through (seems to be restricted), >> so I am CCing -hackers so somebody else can see the patch. > > Ok! I just talked to Robert, and he's taking a look at it for me. Committed. -- Robert Haas EnterpriseDB: http://www.enterprisedb.com The Enterprise PostgreSQL Company
On 2013-01-25 08:49:10 +0000, Magnus Hagander wrote: > Make pg_dump exclude unlogged table data on hot standby slaves This missed the fact that there is no ExecuteSqlQueryForSingleRow and surroundign infrastructure. Fix attached. Greetings, Andres Freund -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services
Attachment
On 2013-01-25 13:56:11 +0100, Magnus Hagander wrote: > On Fri, Jan 25, 2013 at 1:31 PM, Andres Freund <andres@2ndquadrant.com> wrote: > > On 2013-01-25 08:49:10 +0000, Magnus Hagander wrote: > >> Make pg_dump exclude unlogged table data on hot standby slaves > > > > This missed the fact that there is no ExecuteSqlQueryForSingleRow and > > surroundign infrastructure. > > Ugh, that's what I get for pushing something just before getting on a > plane. Thanks for spotting. > > Fix looks good, except I'd just put the query text inline in PQexec() > and not bother with a separate variable.. The query needs to get passed to check_sql_result and write_msg as well, thats why I added the extra variable. I don't think my -committers post got through (seems to be restricted), so I am CCing -hackers so somebody else can see the patch. Andres -- Andres Freund http://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Training & Services