Change in ovirt-engine[master]: core: using pg_dump --column-inserts ...(#858643)

Yair Zaslavsky has submitted this change and it was merged. Change subject: core: using pg_dump --column-inserts ...(#858643) ...................................................................... core: using pg_dump --column-inserts ...(#858643) using pg_dump --column-inserts slows down the restore process The backup script is calling internally the postgres pg_dump utility that actually performs the backup. The backup script output is a SQL file. This file can have 2 formats for data inserts 1) COPY (per table) - efficient and fast, all data is inserted or none 2) INSERT (per table row) - slow and problematic in large databases, part of table rows may be inserted since a failure in a row does not skip the other inserts for the relevant table. This patch change the default from INSERT (option 2 above) to COPY (option 1) by: Adding additional flag to the backup.sh script -c, if this flag is set then the pg_dump is called with the --column-inserts flag, otherwise not. The default behaviour is to backup without --column-inserts in order to generate COPY statements rather than INSERT statements per table row for easy and efficient restore. Change-Id: Iac6b8a6762868b9535f24cc9c496e11722485885 Signed-off-by: Eli Mesika <emesika@redhat.com> --- M backend/manager/dbscripts/backup.sh 1 file changed, 11 insertions(+), 3 deletions(-) Approvals: Yair Zaslavsky: Verified; Looks good to me, approved -- To view, visit http://gerrit.ovirt.org/8134 To unsubscribe, visit http://gerrit.ovirt.org/settings Gerrit-MessageType: merged Gerrit-Change-Id: Iac6b8a6762868b9535f24cc9c496e11722485885 Gerrit-PatchSet: 3 Gerrit-Project: ovirt-engine Gerrit-Branch: master Gerrit-Owner: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Allon Mureinik <amureini@redhat.com> Gerrit-Reviewer: Eli Mesika <emesika@redhat.com> Gerrit-Reviewer: Yair Zaslavsky <yzaslavs@redhat.com>
participants (1)
-
yzaslavs@redhat.com