Skip to main content
tags
Source Link
Erwin Brandstetter
  • 182.2k
  • 28
  • 457
  • 620

My Postgres instance is logging things like this:

2021-11-16 22:18:52.491 UTC [1808765]: [3-1] db=xxx,user=xxx LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp1808765.0", size 262144

My understanding is that if work_memwork_mem is too low, Postgres can use a temporary file for sorting. But if I run show work_mem; I see that the current value is 86000kB, which is much bigger than the size of the temp files I see mentioned in the logs. Is there something else I should be looking at here?

My Postgres instance is logging things like this:

2021-11-16 22:18:52.491 UTC [1808765]: [3-1] db=xxx,user=xxx LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp1808765.0", size 262144

My understanding is that if work_mem is too low, Postgres can use a temporary file for sorting. But if I run show work_mem; I see that the current value is 86000kB, which is much bigger than the size of the temp files I see mentioned in the logs. Is there something else I should be looking at here?

My Postgres instance is logging things like this:

2021-11-16 22:18:52.491 UTC [1808765]: [3-1] db=xxx,user=xxx LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp1808765.0", size 262144

My understanding is that if work_mem is too low, Postgres can use a temporary file for sorting. But if I run show work_mem; I see that the current value is 86000kB, which is much bigger than the size of the temp files I see mentioned in the logs. Is there something else I should be looking at here?

Source Link

Temp files and work_mem

My Postgres instance is logging things like this:

2021-11-16 22:18:52.491 UTC [1808765]: [3-1] db=xxx,user=xxx LOG: temporary file: path "base/pgsql_tmp/pgsql_tmp1808765.0", size 262144

My understanding is that if work_mem is too low, Postgres can use a temporary file for sorting. But if I run show work_mem; I see that the current value is 86000kB, which is much bigger than the size of the temp files I see mentioned in the logs. Is there something else I should be looking at here?