Re: append_array causes rapid growth according to pg_total_relation_size - Mailing list pgsql-general

From Randall Smith
Subject Re: append_array causes rapid growth according to pg_total_relation_size
Date
Msg-id 1282545104.2139.9.camel@randall-laptop
Whole thread Raw
In response to append_array causes rapid growth according to pg_total_relation_size  (Randall Smith <randall@tnr.cc>)
List pgsql-general
More information including a workaround.

VACUUM ANALYZE is not freeing space after an array_append, but it does
after replacing a specific element in the array.

So if I do this:

update array_big1 set chunk_ids = array_append(chunk_ids, '1') where id
= 0;
update array_big1 set chunk_ids[1] = chunk_ids[1] where id = 0;

VACUUM ANALYZE reclaims the growth caused by array_append.

-Randall




pgsql-general by date:

Previous
From: Mike Christensen
Date:
Subject: Npgsql Exception
Next
From: Mike Christensen
Date:
Subject: Re: Npgsql Exception