pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files?
2+ messages / 2 participants
[nested] [flat]

Commits from this thread:
  2022-11-07 0e758ae89a 5fe0ab4201  Fix failure to remove non-first segments of temporary tables.
* BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files?
@ 2022-11-06 23:09 PG Bug reporting form <noreply@postgresql.org>
  2022-11-07 16:41 ` Re: BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files? Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 1 reply; 2+ messages in thread

From: PG Bug reporting form @ 2022-11-06 23:09 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: balazs@obiserver.hu

The following bug has been logged on the website:

Bug reference:      17679
Logged by:          Balazs Szilfai
Email address:      balazs@obiserver.hu
PostgreSQL version: 15.0
Operating system:   Debian Linux
Description:        

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
-rw-------.  1 postgres postgres  210919424 Nov  6 14:44 t8_4375147.1
-rw-------.  1 postgres postgres  210919424 Nov  6 15:22 t8_4375598.1
-rw-------.  1 postgres postgres 1073741824 Nov  6 15:22 t8_4375627.1
-rw-------.  1 postgres postgres 1073741824 Nov  6 15:22 t8_4375627.2
-rw-------.  1 postgres postgres  434585600 Nov  6 15:22 t8_4375627.3
-rw-------.  1 postgres postgres  210960384 Nov  6 18:58 t8_4388673.1
-rw-------.  1 postgres postgres  210960384 Nov  6 18:59 t8_4388712.1
-rw-------.  1 postgres postgres  210960384 Nov  6 19:00 t8_4392884.1
-rw-------.  1 postgres postgres  210968576 Nov  6 20:18 t8_4400972.1
-rw-------.  1 postgres postgres  210976768 Nov  6 23:15 t8_4415109.1
-rw-------.  1 postgres postgres 1073741824 Nov  6 23:16 t8_4415139.1
-rw-------.  1 postgres postgres 1073741824 Nov  6 23:16 t8_4415139.2
-rw-------.  1 postgres postgres  434634752 Nov  6 23:16 t8_4415139.3
-rw-------.  1 postgres postgres  210878464 Nov  6 09:08 t9_4370351.1
-rw-------.  1 postgres postgres 1073741824 Nov  6 09:09 t9_4370380.1
...

200 GB of free storage space disappeared in 24 hours!

Regards,
Balazs



^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files?
  2022-11-06 23:09 BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files? PG Bug reporting form <noreply@postgresql.org>
@ 2022-11-07 16:41 ` Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 2+ messages in thread

From: Tom Lane @ 2022-11-07 16:41 UTC (permalink / raw)
  To: balazs@obiserver.hu; +Cc: pgsql-bugs@lists.postgresql.org

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





^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-11-07 16:41 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-11-06 23:09 BUG #17679: REFRESH MATERIALIZED VIEW CONCURRENTLY leaves temporary files? PG Bug reporting form <noreply@postgresql.org>
2022-11-07 16:41 ` Tom Lane <tgl@sss.pgh.pa.us>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox