pg.ddx.io  pgsql-bugs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
BUG #16427: pgsql_tmp - temp files not released
4+ messages / 4 participants
[nested] [flat]

* BUG #16427: pgsql_tmp - temp files not released
@ 2020-05-10 00:44 PG Bug reporting form <noreply@postgresql.org>
  2020-05-10 12:32 ` Re: BUG #16427: pgsql_tmp - temp files not released Tomas Vondra <tomas.vondra@2ndquadrant.com>
  0 siblings, 1 reply; 4+ messages in thread

From: PG Bug reporting form @ 2020-05-10 00:44 UTC (permalink / raw)
  To: pgsql-bugs@lists.postgresql.org; +Cc: murali.natti@gmail.com

The following bug has been logged on the website:

Bug reference:      16427
Logged by:          Murali Natti
Email address:      murali.natti@gmail.com
PostgreSQL version: 10.5
Operating system:   Red Hat Enterprise Linux Server release 6.10 (Sant
Description:        

Hello Team,

We have observed a bug ( I guess ) that temporary files were not deleted
automatically even thought the respective PIDs are not running anymore.

We couldn't take a chance to delete files manually so ended up with
restarting database to clear temp files.

Is this know bug, what could be the reason for this? Can anyone please let
us know?

Thanks,
Murali



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

* Re: BUG #16427: pgsql_tmp - temp files not released
  2020-05-10 00:44 BUG #16427: pgsql_tmp - temp files not released PG Bug reporting form <noreply@postgresql.org>
@ 2020-05-10 12:32 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
  2020-05-10 13:48   ` Re: BUG #16427: pgsql_tmp - temp files not released Euler Taveira <euler.taveira@2ndquadrant.com>
  0 siblings, 1 reply; 4+ messages in thread

From: Tomas Vondra @ 2020-05-10 12:32 UTC (permalink / raw)
  To: murali.natti@gmail.com; pgsql-bugs@lists.postgresql.org

On Sun, May 10, 2020 at 12:44:18AM +0000, PG Bug reporting form wrote:
>The following bug has been logged on the website:
>
>Bug reference:      16427
>Logged by:          Murali Natti
>Email address:      murali.natti@gmail.com
>PostgreSQL version: 10.5
>Operating system:   Red Hat Enterprise Linux Server release 6.10 (Sant
>Description:
>
>Hello Team,
>
>We have observed a bug ( I guess ) that temporary files were not deleted
>automatically even thought the respective PIDs are not running anymore.
>
>We couldn't take a chance to delete files manually so ended up with
>restarting database to clear temp files.
>
>Is this know bug, what could be the reason for this? Can anyone please let
>us know?
>

I don't think we're aware of any live bug in this area (although you're
a couple of minor releases behind, and I haven't checked release notes
between 10.5 and 10.12).

I think you need to investigate what happened to the backends/commands
that created the temporary files. Presumably it was interrupted or
terminated in a way that prevented proper cleanup.

regards

-- 
Tomas Vondra                  http://www.2ndQuadrant.com
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services





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

* Re: BUG #16427: pgsql_tmp - temp files not released
  2020-05-10 00:44 BUG #16427: pgsql_tmp - temp files not released PG Bug reporting form <noreply@postgresql.org>
  2020-05-10 12:32 ` Re: BUG #16427: pgsql_tmp - temp files not released Tomas Vondra <tomas.vondra@2ndquadrant.com>
@ 2020-05-10 13:48   ` Euler Taveira <euler.taveira@2ndquadrant.com>
  2020-05-11 06:10     ` Re: BUG #16427: pgsql_tmp - temp files not released Michael Paquier <michael@paquier.xyz>
  0 siblings, 1 reply; 4+ messages in thread

From: Euler Taveira @ 2020-05-10 13:48 UTC (permalink / raw)
  To: Tomas Vondra <tomas.vondra@2ndquadrant.com>; +Cc: murali.natti@gmail.com; pgsql-bugs@lists.postgresql.org

On Sun, 10 May 2020 at 09:32, Tomas Vondra <tomas.vondra@2ndquadrant.com>
wrote:

> On Sun, May 10, 2020 at 12:44:18AM +0000, PG Bug reporting form wrote:
> >The following bug has been logged on the website:
> >
> >Bug reference:      16427
> >Logged by:          Murali Natti
> >Email address:      murali.natti@gmail.com
> >PostgreSQL version: 10.5
> >Operating system:   Red Hat Enterprise Linux Server release 6.10 (Sant
> >Description:
> >
> >Hello Team,
> >
> >We have observed a bug ( I guess ) that temporary files were not deleted
> >automatically even thought the respective PIDs are not running anymore.
> >
> >We couldn't take a chance to delete files manually so ended up with
> >restarting database to clear temp files.
> >
> >Is this know bug, what could be the reason for this? Can anyone please let
> >us know?
> >
>
> I don't think we're aware of any live bug in this area (although you're
> a couple of minor releases behind, and I haven't checked release notes
> between 10.5 and 10.12).
>
> I think you need to investigate what happened to the backends/commands
> that created the temporary files. Presumably it was interrupted or
> terminated in a way that prevented proper cleanup.
>
> I bet OP has crash(es) while executing a query that uses temporary files.
Crash does not cleanup temporary files until you restart the service.
RemovePgTempFiles says:

 * NOTE: we could, but don't, call this during a post-backend-crash restart
 * cycle.  The argument for not doing it is that someone might want to
examine
 * the temp files for debugging purposes.  This does however mean that
 * OpenTemporaryFile had better allow for collision with an existing temp
 * file name.

I wonder if a GUC (cleanup_temp_files_after_crash) is useful for an
environment that has storage restrictions. This is the second time this
month that I stumbled on this issue. Of course, I don't expect a postgres
crash once a while but we know that, due to extensibility, some extensions
could crash and the only workaround to this issue is to restart service
(which means a human intervention and an additional downtime).


-- 
Euler Taveira                 http://www.2ndQuadrant.com/
PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services

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

* Re: BUG #16427: pgsql_tmp - temp files not released
  2020-05-10 00:44 BUG #16427: pgsql_tmp - temp files not released PG Bug reporting form <noreply@postgresql.org>
  2020-05-10 12:32 ` Re: BUG #16427: pgsql_tmp - temp files not released Tomas Vondra <tomas.vondra@2ndquadrant.com>
  2020-05-10 13:48   ` Re: BUG #16427: pgsql_tmp - temp files not released Euler Taveira <euler.taveira@2ndquadrant.com>
@ 2020-05-11 06:10     ` Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 4+ messages in thread

From: Michael Paquier @ 2020-05-11 06:10 UTC (permalink / raw)
  To: Euler Taveira <euler.taveira@2ndquadrant.com>; +Cc: Tomas Vondra <tomas.vondra@2ndquadrant.com>; murali.natti@gmail.com; pgsql-bugs@lists.postgresql.org

On Sun, May 10, 2020 at 10:48:58AM -0300, Euler Taveira wrote:
> I wonder if a GUC (cleanup_temp_files_after_crash) is useful for an
> environment that has storage restrictions. This is the second time this
> month that I stumbled on this issue. Of course, I don't expect a postgres
> crash once a while but we know that, due to extensibility, some extensions
> could crash and the only workaround to this issue is to restart service
> (which means a human intervention and an additional downtime).

Sounds like a fair concern to me.  It is annoying to have to do some
manual intervention for some environments under disk pressure.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

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


end of thread, other threads:[~2020-05-11 06:10 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-05-10 00:44 BUG #16427: pgsql_tmp - temp files not released PG Bug reporting form <noreply@postgresql.org>
2020-05-10 12:32 ` Tomas Vondra <tomas.vondra@2ndquadrant.com>
2020-05-10 13:48   ` Euler Taveira <euler.taveira@2ndquadrant.com>
2020-05-11 06:10     ` Michael Paquier <michael@paquier.xyz>

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