Re: pg_upgrade link mode

From: Fabio Rueda Carrascosa <avances123(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-general <pgsql-general(at)postgresql(dot)org>
Subject: Re: pg_upgrade link mode
Date: 2013-05-16 22:50:08
Message-ID: CAA3M-fYm7q-2B4ViMcqPccV1yEFkjYRhuQWF1ZnP=OF9V4hBaQ@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

As usual, you are totally right Tom.

But thanks everybody for the debate. Only I have to add, is near a "must"
to run with --check before actually run the command.

2013/5/16 Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>

> Fabio Rueda Carrascosa <avances123(at)gmail(dot)com> writes:
> > Hello, I have a 9.1 cluster with 50 databases, only one table per db with
> > 2000 rows only, but a lot of schema around each one (postgis databases)
>
> > The old cluster size is 1GB
>
> > du -chs /var/lib/postgresql/9.1/main/
> > 1.1G
>
> > now I run a pg_upgrade to 9.2 with hard link mode,
>
> > pg_upgrade --link \
> > --old-datadir=/var/lib/postgresql/9.1/main \
> > --new-datadir=/var/lib/postgresql/9.2/main \
> > --old-bindir=/usr/lib/postgresql/9.1/bin \
> > --new-bindir=/usr/lib/postgresql/9.2/bin
>
> > du -chs /var/lib/postgresql/9.2/main/
> > 880M
>
> > Is the expected behaviour? I can't double the space in production.
>
> I don't think anybody actually answered your original question.
> The above doesn't represent a doubling of disk space, it just shows that
> "du" only tells you how much file space is linked into the directory
> tree you ask it about. That is, there's lots of overlap between the
> first and second du results. If you try "du" passing it both directory
> trees together, it should give you a number for the total space
> consumption that's not much more than 1.1G. (Depending on which version
> of "du" you're using, you may need to give it an additional switch to
> tell it not to double-count multiply-linked files.)
>
> regards, tom lane
>

In response to

Browse pgsql-general by date

  From Date Subject
Next Message David Kerr 2013-05-16 22:52:25 Re: LONG delete with LOTS of FK's
Previous Message John R Pierce 2013-05-16 22:41:36 Re: PLJava for Postgres 9.2.