summaryrefslogtreecommitdiff
path: root/util
diff options
context:
space:
mode:
authorYorhel <git@yorhel.nl>2019-12-07 11:24:57 +0100
committerYorhel <git@yorhel.nl>2019-12-07 11:24:59 +0100
commita9975cebe40a8ccc200dceec350d7589a10de559 (patch)
treef96ca05c87baf1631a898a9817a5150739cc075c /util
parente737debc3bef2c8b7127280d450bedef3ad3c889 (diff)
dbdump.pl: Ensure consistent exports
Today's export had a little inconsistency caused by a database update while the export script was running.
Diffstat (limited to 'util')
-rwxr-xr-xutil/dbdump.pl3
1 files changed, 2 insertions, 1 deletions
diff --git a/util/dbdump.pl b/util/dbdump.pl
index 84e08126..acb4bf01 100755
--- a/util/dbdump.pl
+++ b/util/dbdump.pl
@@ -102,8 +102,9 @@ my $schema = VNDB::Schema::schema;
my $types = VNDB::Schema::types;
my $references = VNDB::Schema::references;
-my $db = DBI->connect('dbi:Pg:dbname=vndb', 'vndb', undef, { RaiseError => 1 });
+my $db = DBI->connect('dbi:Pg:dbname=vndb', 'vndb', undef, { RaiseError => 1, AutoCommit => 0 });
$db->do('SET TIME ZONE +0');
+$db->do('SET TRANSACTION ISOLATION LEVEL SERIALIZABLE');
sub export_timestamp {