Re: size of attributes table is too big

2025-03-25 Thread Ron Johnson
Use "pg_repack" instead. It's an "online" CLUSTER / VACUUM FULL replacement that's in both RPM and apt repos. On Tue, Mar 25, 2025 at 12:36 AM Siraj G wrote: > Thank you! > > I noticed over 99% free space. Now the challenge is running FULL VACUUM on > a table with size over 500GB. It is going t

Re: size of attributes table is too big

2025-03-24 Thread Siraj G
Thank you! I noticed over 99% free space. Now the challenge is running FULL VACUUM on a table with size over 500GB. It is going to take a couple of hours I presume. Also, I hope aggressive vacuuming will prevent us from this situation. Regards Siraj On Wed, Mar 19, 2025 at 11:27 PM Ron Johns

Re: size of attributes table is too big

2025-03-19 Thread Siraj G
Hello Pavel The SQL instance is a target of google DMS and it does have a physical replica. A couple of weeks back we did have a performance issue and vacuum was run at that time to fix the problem. Very soon we may run into the same problem I presume. Regards Siraj On Wed, Mar 19, 2025 at 10:4

Re: size of attributes table is too big

2025-03-19 Thread Ron Johnson
On Wed, Mar 19, 2025 at 1:06 PM Siraj G wrote: > Hello! > > I have a PG (v16) instance which is occupying around 1TB of storage. Out > of this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? > > Here are the sizes: > > pg_attribute > 338 G

Re: size of attributes table is too big

2025-03-19 Thread Siraj G
Hi Adrian Used this query to find the sizes: select relname AS object_name,relkind AS object_type,pg_size_pretty(pg_relation_size(oid)) AS object_size FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog') ORDER BY pg_relation_size(oid) DESC; We have clos

Re: size of attributes table is too big

2025-03-19 Thread Adrian Klaver
On 3/19/25 10:36 AM, Siraj G wrote: Hi Adrian Used this query to find the sizes: select  relname AS object_name,relkind AS object_type,pg_size_pretty(pg_relation_size(oid)) AS object_size FROM pg_class WHERE relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = 'pg_catalog') ORDER

Re: size of attributes table is too big

2025-03-19 Thread Pavel Stehule
st 19. 3. 2025 v 18:14 odesílatel Álvaro Herrera napsal: > Hello > > On 2025-Mar-19, Siraj G wrote: > > > I have a PG (v16) instance which is occupying around 1TB of storage. Out > of > > this, around 350GB is occupied by the table pg_catalog.pg_attribute. > > Why is the catalog table's size so b

Re: size of attributes table is too big

2025-03-19 Thread Adrian Klaver
On 3/19/25 10:06, Siraj G wrote: Hello! I have a PG (v16) instance which is occupying around 1TB of storage. Out Exact version of Postgres 16, include the x in 16.x. of this, around 350GB is occupied by the table pg_catalog.pg_attribute. Why is the catalog table's size so big? Here are the

Re: size of attributes table is too big

2025-03-19 Thread Álvaro Herrera
Hello On 2025-Mar-19, Siraj G wrote: > I have a PG (v16) instance which is occupying around 1TB of storage. Out of > this, around 350GB is occupied by the table pg_catalog.pg_attribute. > Why is the catalog table's size so big? Heavy use of temp tables is a known cause of this. > I think this t