Hi Tim,
Il 17/10/12 15:15, Tim Verhoeven ha scritto:
> Hi again,
>
> I'm seeing another issue with barman. It seems to not really cope well
> with tablespaces.
Barman works fine with tablespaces.
> The rsync command used transforms symlinks to real files & folders.
> But postgres itself manages the pg_tblspc folder with symlinks.
Exactly. That's Postgres standard behaviour and we've adopted the same
strategy in Barman.
> In our case we created the actual tablespaces inside this dir and
> postgres nicely created some symlinks to these.
Hmmm ... Placing a tablespace inside the PostgreSQL data dir does not
make much sense. The real benefit of tablespaces is to separate them
from the actual data directory.
> But then when barman runs the backup these are converted to real files
> and the needed diskspace on the backup server for these tablespaces
> doubles. Since we are doing datawarehouses inside Postgres and don't
> have fancy deduplication hardware this really wastes alot of space.
This behaviour is the one we deliberately chose to manage tablespaces.
Unfortunately, having a tablespace inside the data directory causes
tablespace files to be duplicated (once through their real location, the
other time through the symbolic link).
> Another solution would be to create some code inside barman that
> transforms the symlinks.
I am sorry, but - as I said - this behaviour is the one we deliberately
chose. We do not feel safe with the idea of modifying this behaviour in
order to work with a non conventional way of creating tablespaces.
The only thing we could do is to add the real directories to the
exclusion list for rsync if they are a subdirectory of PGDATA.
Cheers,
Gabriele
--
Gabriele Bartolini - 2ndQuadrant Italia
PostgreSQL Training, Services and Support
gabriele....@2ndQuadrant.it |
www.2ndQuadrant.it