Re: Strange size of pg_largeobject

From: Янченко Владимир <vyanchenko(at)naumen(dot)ru>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Strange size of pg_largeobject
Date: 2017-07-21 08:27:33
Message-ID: f453f615-fbeb-c56d-7179-ae3125502b24@naumen.ru
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Tom, thank you for your answer.

Today I run vacuum full again and my table size dramatically reduced:

postgres(at)srv-pgsql1:~$ vacuumdb -fvt pg_largeobject mybase
...
INFO: vacuuming "pg_catalog.pg_largeobject"
INFO: "pg_largeobject": found 0 removable, 624465 nonremovable row
versions in 2386876 pages
DETAILS: 586358 dead row versions cannot be removed yet.

mybase=# SELECT pg_size_pretty(pg_total_relation_size('pg_largeobject'));
pg_size_pretty
----------------
1568 MB

My problem is resolved.

20.07.2017 21:50, Tom Lane пишет:
> =?UTF-8?B?0K/QvdGH0LXQvdC60L4g0JLQu9Cw0LTQuNC80LjRgA==?= <vyanchenko(at)naumen(dot)ru> writes:
>> I found that my pg_largeobject table is bigger than it should be:
> Sounds like a fairly routine case of table bloat.
>
>> Before I execute queries, that i mentioned above, I run vacuum full. But
>> it does not effect. Now table bloating factor about 20%.
> "vacuum verbose pg_largeobject" might be informative. If, as I suspect,
> it tells you there are lots of dead but unremovable rows, look around for
> long-lived open transactions or prepared transactions.
>
> regards, tom lane

--
Best regards,
Vladimir Yanchenko
Tech support engineer
Naumen

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Gone, Sajan 2017-07-21 12:52:04 Nagios Alerting for Postgres Instance.
Previous Message Tom Lane 2017-07-20 16:50:56 Re: Strange size of pg_largeobject