Re: Which postgres process cleans up deprecated datafiles

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Loles <lolesft(at)gmail(dot)com>
Cc: pgsql-admin(at)postgresql(dot)org
Subject: Re: Which postgres process cleans up deprecated datafiles
Date: 2022-03-17 18:40:11
Message-ID: 791982.1647542411@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-admin

Loles <lolesft(at)gmail(dot)com> writes:
> What postgres process, or system, identify and delete datafiles that have
> become unassociated? The truncate operation doesn't appear to be.. the
> datafile has existed for some time after the truncate command execution
> finished.

The zero-length file is a placeholder to ensure that that relfilenode
number doesn't get re-used right away. It'll get cleaned up during
the next checkpoint.

regards, tom lane

In response to

Browse pgsql-admin by date

  From Date Subject
Next Message Hosney Osman 2022-03-20 01:50:49 docker pgadmin
Previous Message Loles 2022-03-17 17:43:30 Which postgres process cleans up deprecated datafiles