Re: problems with set_config, work_mem, maintenance_work_mem, and sorting

From: Jon Nelson <jnelson+pgsql(at)jamponi(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: problems with set_config, work_mem, maintenance_work_mem, and sorting
Date: 2012-02-28 19:33:33
Message-ID: CAKuK5J2rHEM_GCoCTPyw3ajn3yvg3QFX6apSiYbvJULDt_TGyg@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Tue, Feb 28, 2012 at 1:28 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> writes:
>> The config shows 128MB for work_mem and 2GB for maintenance_work_mem.
>> Why does PostgreSQL /sometimes/ use the globally-configured values and
>> sometimes use the values that come from the connection?
>
> You sure those log entries are all from the same process?

If I am understanding this correctly, yes. They all share the same pid.
The logline format is:

log_line_prefix = '%t %d %u [%p]'

and I believe %p represents the pid, and also that a pid corresponds
to a backend. Therefore, same pid == same backend == same connection
== same session. Many transactions within a session.

--
Jon

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Stefan Keller 2012-02-28 20:48:45 Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Previous Message Tom Lane 2012-02-28 19:28:03 Re: problems with set_config, work_mem, maintenance_work_mem, and sorting