On 03/19/2015 04:55 PM, Julien Tachoires wrote:
On 18/03/2015 19:54, Andreas Karlsson wrote:
Looks good but I think one minor improvement could be to set the table
space of the toast entires to the same as the tablespace of the table to
reduce the amount of "SET default_tablespace". What do you think?
Yes, you're right, some useless "SET default_tablespace" were added for
each ALTER TABLE SET TOAST TABLESPACE statement. It's now fixed with
this new patch. Thanks.
I am confused by your fix. Wouldn't cleaner fix be to use
tbinfo->reltablespace rather than tbinfo->reltoasttablespace when
calling ArchiveEntry()?
I tried the attached path and it seemed to work just fine.
--
Andreas Karlsson
diff --git a/src/bin/pg_dump/pg_dump.c b/src/bin/pg_dump/pg_dump.c
index c589372..de6b359 100644
--- a/src/bin/pg_dump/pg_dump.c
+++ b/src/bin/pg_dump/pg_dump.c
@@ -8157,7 +8157,7 @@ dumpTOASTTablespace(Archive *fout, DumpOptions *dopt, TableInfo *tbinfo,
ArchiveEntry(fout, nilCatalogId, createDumpId(),
fmtId(tbinfo->dobj.name),
tbinfo->dobj.namespace->dobj.name,
- tbinfo->reltoasttablespace, tbinfo->rolname,
+ tbinfo->reltablespace, tbinfo->rolname,
false, "TOAST TABLESPACE", SECTION_NONE,
query->data, "", NULL,
&(tbinfo->dobj.dumpId), 1,
--
Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-hackers