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.albe@cybertec.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