> On 12 Jul 2020, at 07:48, Julien Rouhaud <rjuju123@gmail.com> wrote:
> Currently, getTableAttrs() always retrieves info about columns defaults and
> check constraints, while this will never be used if --data-only option if used.
> This seems like a waste of resources, so here's a patch to skip those parts
> when the DDL won't be generated.
Given how unintrusive this optimization is, +1 from me to go ahead with this
patch. pg_dump tests pass. Personally I would've updated the nearby comments
to reflect why the check for dataOnly is there, but MMV there. I'm moving this
patch to Ready for Committer.
I'm fairly sure there is a lot more we can do to improve the performance of
data-only dumps, but this nicely chips away at the problem.
cheers ./daniel