Changeset 250 for trunk/tools

Show
Ignore:
Timestamp:
06/24/11 15:35:43 (3 years ago)
Author:
depesz
Message:

change max-size unit to KB to be able to handle tables which are very small, but with very large toast data

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/tools/fast.dump.and.restore/fast.dump

    r249 r250  
    330330 
    331331    my $db_sizes = $self->psql( 
    332 "SELECT n.nspname, c.relname, c.oid::regclass, c.oid, cast( pg_relation_size(c.oid) / ( 1024 * 1024 ) as int8 ) from pg_class c join pg_namespace n on c.relnamespace = n.oid where c.relkind = 'r'" 
     332"SELECT n.nspname, c.relname, c.oid::regclass, c.oid, cast( pg_relation_size(c.oid) / 1024 as int8 ) from pg_class c join pg_namespace n on c.relnamespace = n.oid where c.relkind = 'r'" 
    333333    ); 
    334334 
     
    396396        'output'     => '.', 
    397397        'jobs'       => 1, 
    398         'max-size'   => 10
     398        'max-size'   => 10240
    399399    }; 
    400400    my $is_ok = GetOptions( $opts, qw( help|? output|o=s compressor|c=s jobs|j=i max-size|m=i psql|p=s pg_dump|d=s pg_restore|r=s ) ); 
     
    488488tables. Defaults to 1. 
    489489 
    490 =item --max-size - Minimal size of table (pg_relation_size()) (in megabytes) 
     490=item --max-size - Minimal size of table (pg_relation_size()) (in kilobytes) 
    491491before fast.dump will try to split it into many separate blocks. Defaults to 
    492 10
     49210240 (10MB)
    493493 
    494494=item --psql - path to psql program. Defaults to "psql", which will use