PG Bug reporting form <noreply@postgresql.org> writes:
> After we upgraded from 14 to 15, the occupied space keeps decreasing.
> The following files can be found in the subdirectory of the database: (
> /var/lib/postgresql/15/main/base/16457 )
> ...
> -rw-------. 1 postgres postgres 210903040 Nov 6 10:37 t8_4372109.1
> -rw-------. 1 postgres postgres 1073741824 Nov 6 14:43 t8_4375122.1
> -rw-------. 1 postgres postgres 1073741824 Nov 6 14:43 t8_4375122.2
> -rw-------. 1 postgres postgres 434585600 Nov 6 14:43 t8_4375122.3
Thanks for the report! Actually it's even worse: v15 will leak non-first
segments of any temporary tables, not just those made during REFRESH
MATERIALIZED VIEW CONCURRENTLY. I've pushed a fix that will appear in
15.1. In the meantime, you should manually delete any files named
according to the tNN_NNNN.N pattern that are clearly too old to belong
to any live session.
regards, tom lane