[Bucardo-general] Odd 'inconsistency' after one-time-copy

Paul Theodoropoulos paul at anastrophe.com
Tue Jul 23 21:29:50 UTC 2013


I'm setting up bucardo for the first time. We have an existing database, 
and I'm setting up a slave to become another master. I've written a 
fairly detailed shell script to perform the steps programmatically for 
consistency in deployment.  There are only three databases in play here.

After the one-time-copy, I issue the following boilerplate query to see 
the sizes of the db's (cadged from the 'net):
SELECT d.datname AS Name,  pg_catalog.pg_get_userbyid(d.datdba) AS Owner,
     CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
         THEN 
pg_catalog.pg_size_pretty(pg_catalog.pg_database_size(d.datname))
         ELSE 'No Access'
     END AS Size
FROM pg_catalog.pg_database d
     ORDER BY
     CASE WHEN pg_catalog.has_database_privilege(d.datname, 'CONNECT')
         THEN pg_catalog.pg_database_size(d.datname)
         ELSE NULL
     END DESC -- nulls first
     LIMIT 20;

When I run it on the existing master, I get the following:
           name           |  owner   |  size
--------------------------+----------+---------
  db-1                     | postgres | 696 MB
  db-2                     | postgres | 244 MB
  db-3                     | postgres | 44 MB
  bucardo                  | bucardo  | 7174 kB
  postgres                 | postgres | 5510 kB
  template1                | postgres | 5510 kB
  template0                | postgres | 5408 kB
(7 rows)

When I run it on the server that has received the one-time-copy, I get this:
            name           |  owner   |  size
--------------------------+----------+---------
  db-1                     | postgres | 723 MB
  db-2                     | postgres | 325 MB
  db-3                     | postgres | 32 MB
  bucardo                  | bucardo  | 6694 kB
  postgres                 | postgres | 5518 kB
  template1                | postgres | 5510 kB
  template0                | postgres | 5408 kB
(7 rows)

I'm by no means a postgresql dba, I'm merely the SA trying to get this 
working. But I'm puzzled as to how the receiving databases would be 
*larger* than the source.  Am I missing something very basic here, or is 
there a problem?

-- 
Paul Theodoropoulos
www.anastrophe.com



More information about the Bucardo-general mailing list