Greetings, * Michael Paquier (mich...@paquier.xyz) wrote: > On Wed, Oct 17, 2018 at 03:05:28PM -0400, Stephen Frost wrote: > > The point of it is that it makes loading into other RDBMS faster. Yes, > > it has many of the same issues as our COPY does, but we support it > > because it's much faster. The same is true here, just for other > > databases, so I'm +1 on the general idea. > > Well, the patch author has mentioned that he cares about also being able > to detect errors when processing the dump, which multi inserts make that > easier to check for. However, even if you specify --data-only you still > need to worry about the first SET commands ahead, which requires manual > handling of the dump...
That's hardly a serious complication.. > I am honestly not convinced that it is worth complicating pg_dump for > that, as there is no guarantee either that the DDLs generated by pg_dump > will be compatible with what other systems expect. This kind of > compatibility for fetch and reload can also be kind of tricky with > portability issues, so I'd rather let this stuff being handled correctly > by other tools like pgloader or others rather than expecting to get this > stuff half-baked within Postgres core tools. I can see an argument for not wanting to complicate pg_dump, but we've explicitly stated that the purpose of --inserts is to facilitate restoring into other database systems and I don't agree that we should just punt on that entirely. For better or worse, there's an awful lot of weight put behind things which are in core and we should take care to do what we can to make those things better, especially when someone is proposing a patch to improve the situation. Sure, the patch might need work or have other issues, but that's an opportunity for us to provide feedback to the author and encourage them to improve the patch. As for the other things that make it difficult to use pg_dump to get a result out that can be loaded into other database systems- let's try to improve on that too. Having an option to skip the 'setup' bits, such as the SET commands, certainly wouldn't be hard. I certainly don't see us adding code to pg_dump to handle 'fetch and reload' into some non-PG system, or, really, even into a PG system, and that certainly isn't something the patch does, so I don't think it's a particularly interesting argument. Users can handle that as needed themselves. In other words, none of the arguments put forth really seem to be a reason to reject the general idea of this patch, so I'm still +1 on that. Having just glanced over the patch quickly, I think I would have done something like '--inserts=100' as the way to enable it instead of adding a new option though. Not that I feel very strongly about it. Thanks! Stephen
signature.asc
Description: PGP signature