Avoid useless retrieval of defaults and check constraints in pg_dump -a

From: Julien Rouhaud <rjuju123(at)gmail(dot)com>
To: pgsql-hackers(at)lists(dot)postgresql(dot)org
Subject: Avoid useless retrieval of defaults and check constraints in pg_dump -a
Date: 2020-07-12 05:48:50
Message-ID: 20200712054850.GA92357@nol
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi,

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.

Attachment Content-Type Size
v1-pg_dump_data_only.diff text/plain 690 bytes

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Rafia Sabih 2020-07-12 09:57:29 Re: Parallel copy
Previous Message David G. Johnston 2020-07-12 05:26:22 Re: Default setting for enable_hashagg_disk