Re: Even if I have a lot of free space PgSQL returns "ERROR: could not extend file - No space left on device"

From: Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at>
To: Nature Conservation Geovista Space <conservation(dot)by(dot)geovista(dot)space(at)gmail(dot)com>, pgsql-novice(at)lists(dot)postgresql(dot)org
Subject: Re: Even if I have a lot of free space PgSQL returns "ERROR: could not extend file - No space left on device"
Date: 2023-09-12 12:48:02
Message-ID: 753193ede36dad1b9da0755e17d69f4980bb3333.camel@cybertec.at
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

On Tue, 2023-09-12 at 13:12 +0100, Nature Conservation Geovista Space wrote:
> On Sat, 9 Sept 2023 at 03:54, Laurenz Albe <laurenz(dot)albe(at)cybertec(dot)at> wrote:
> > On Fri, 2023-09-08 at 16:01 -0400, bruno da silva wrote:
> > > Hello. Does temp_file_limt also applies to reindex?
> >
> > To the extent that REINDEX creates temporary files, yes.
> > It will limit the size of temporary files created when the
> > rows are sorted.
> >
> > It does *not* limit the size of the data files for the new
> > index.
>
> 1 - At the moment my postgresql.conf is by default with no limit #temp_file_limit = -1
> Maybe I just have to uncomment it so that this rule really applies. Let's see this evening if
> your suggestion fix it.

"-1" meanse "no limit", so removing the comment won't do anything.
You also have to change the value.

> 2 - Do you think it could come from another param not set up correctly?

"work_mem" influences the amount of temp files required. But if your query
needs enough temp files to fill your disk, higher settings of "work_mem" are
unlikely to fix that.

> 3 - Can I try to watch out the log or size of the temporary table created after my query failed
> so that I can investigate what happened?

Sure. Set "log_temp_files = '100kB'", and every temp file above that size will be logged.

Yours,
Laurenz Albe

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message ivanov17 2023-09-12 17:38:18 Re: Grant CREATE privilege on all schemas
Previous Message Nature Conservation Geovista Space 2023-09-12 12:12:37 Re: Even if I have a lot of free space PgSQL returns "ERROR: could not extend file - No space left on device"