Skip to content

Commit

Permalink
Merge previous commit.
Browse files Browse the repository at this point in the history
  • Loading branch information
darold committed Jun 10, 2019
2 parents ebfb987 + cc91cd8 commit 4881f49
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 24 deletions.
18 changes: 11 additions & 7 deletions README.md
Expand Up @@ -46,7 +46,7 @@ support synchronized snapshots, a feature that was introduced in PG 9.2
for primary servers and 10 for standbys. pg_dumpbinary will refuse to
dump database that do not respect these minimum versions.

pg_dumpbinary -j uses multiple database connections; it connects to the
pg_dumpbinary uses multiple database connections; it connects to the
database once with the master process to create a synchronized snapshot
and dump the pre-data section. Once again for each worker job using the
synchronized snapshot.
Expand Down Expand Up @@ -136,13 +136,17 @@ options:

## Parallel processing

pg_dumpbinary is very performant to generate the dump as it can parallelize
the dump of all tables following the number of simultaneous process you
want to use. The behaviour is like the -j option of pg_dump in directory
format.
The speed of the dump can be improved by using parallelism during the
export by pg_dumpbinary. Set option -j with the number of simultaneous
process you want to use. The behaviour is like the -j option of pg_dump
in directory format.

To enable parallel processing you just have to use the -j N option where N
is the number of cores you want to use.
The speed of the restoration can be improved by using parallelism during
the call to pg_restorebinary. Set option -j with the number of simultaneous
process you want to use. The behaviour is like the -j option of pg_restore.

The parallelism is also used to restore post-data section for indexes and
constraints.

## Binary format

Expand Down
12 changes: 4 additions & 8 deletions doc/pg_dumpbinary.pod
Expand Up @@ -75,14 +75,10 @@ synchronized snapshot.

=head1 PARALLEL PROCESSING

pg_dumpbinary is very performant to generate the dump as it can parallelize
the dump of all tables following the number of simultaneous process you
want to use. The behaviour is like the -j option of pg_dump in directory
format. Of course it is not as performant as a call to pg_dump in directory
format.

To enable parallel processing you just have to use the -j N option where N
is the number of cores you want to use.
The speed of the dump can be improved by using parallelism during the
export by pg_dumpbinary. Set option -j with the number of simultaneous
process you want to use. The behaviour is like the -j option of pg_dump
in directory format.

=head1 BINARY FORMAT

Expand Down
12 changes: 5 additions & 7 deletions doc/pg_restorebinary.pod
Expand Up @@ -53,14 +53,12 @@ by pg_dumpbinary using the -i option.

=head1 PARALLEL PROCESSING

pg_restorebinary is very performant to restore the backup as it can parallelize
the import of all tables following the number of simultaneous process you want
to use. The behaviour is like the -j option of pg_dump in directory format.
The speed of the restoration can be improved by using parallelism during
the call to pg_restorebinary. Set option -j with the number of simultaneous
process you want to use. The behaviour is like the -j option of pg_restore.

To enable parallel processing you just have to use the -j N option where N
is the number of cores you want to use.

The parallelism is also used to restore post-data section (indexes, constraints).
The parallelism is also used to restore post-data section for indexes and
constraints.

=head1 TODO

Expand Down
5 changes: 3 additions & 2 deletions pg_dumpbinary
Expand Up @@ -376,14 +376,15 @@ sub get_table_list
{
my %tb_lst = ();

# 197; 1259 57153 TABLE EZ0P T1 gilles
# 198; 1259 57159 TABLE public T1 gilles
my @list = `$PGRESTORE -l $OUTDIR/pre-data.dmp | grep " TABLE "`;
chomp(@list);

foreach my $l (@list)
{
# 198; 1259 57159 TABLE public T1 gilles
next if ($l =~ /\d+: \d+ \d+ TABLE /);
my @inf = split(/\s/, $l);
next if ($#inf != 6);
push( @{ $tb_lst{$inf[4]} }, $inf[5]);
}

Expand Down

0 comments on commit 4881f49

Please sign in to comment.