Re: Table space not returned to the OS ?

Поиск
Список
Период
Сортировка
От Magnus Hagander
Тема Re: Table space not returned to the OS ?
Дата
Msg-id CABUevEwiPoP6ipaOaPmW770uVM2QXaV5ZgAjx6J18x0h_STd5Q@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Table space not returned to the OS ?  (Laurenz Albe <laurenz.albe@cybertec.at>)
Список pgsql-general


On Mon, Jun 27, 2022 at 12:01 PM Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Mon, 2022-06-27 at 11:38 +0200, Magnus Hagander wrote:
> On Mon, Jun 27, 2022 at 11:30 AM Florents Tselai <florents.tselai@gmail.com> wrote:
> > A few months back (October) I had upgraded a Postgres instance from v12 —> 14.
> >
> > The database disk size under /var/lib/postgresql/12 was around 800GB+ back then.
> > Note, that IIRC I had used hard-linking during the upgrade.
> >
> > As I was running out of disk space, I started investigating and found out that
> >
> > /var/lib/postgresql/12/main/base/16385  —>  886GB+
> > /var/lib/postgresql/14 —> 400GB
>
> It looks like you didn't actually delete the old cluster, which you are supposed
> to do once you have verified that the new one works.

I think that it should be done earlier than that, namely immediately after running
pg_upgrade.  Once you have started the PostgreSQL 14 server (to verify that it works),
you can no longer use the old cluster.
Yes, the control file is crippled, but in my opinion, the earlier you delete the old
cluster, the safer.

I'd say there is still some recoverable data in the old cluster files, even if you can't just start up the cluster in it. But yes, it comes down to how you define "verified that the new one works" to some level. 

--

В списке pgsql-general по дате отправления:

Предыдущее
От: "Bos, Fred"
Дата:
Сообщение: Unique index prohibits partial aggregates
Следующее
От: Karl Denninger
Дата:
Сообщение: Libpq question related to allocated resources