Re: problems with set_config, work_mem, maintenance_work_mem, and sorting - Mailing list pgsql-performance

From Ants Aasma
Subject Re: problems with set_config, work_mem, maintenance_work_mem, and sorting
Date
Msg-id CA+CSw_u3Qxo0wqufHN=+nhe0ZU2mhyiO-SBgLcO+na7V+VfD=Q@mail.gmail.com
Whole thread Raw
In response to Re: problems with set_config, work_mem, maintenance_work_mem, and sorting  (Claudio Freire <klaussfreire@gmail.com>)
List pgsql-performance


On Feb 29, 2012 1:44 AM, "Claudio Freire" <klaussfreire@gmail.com> wrote:
> Another option, depending on your SQLA version, when connections are
> sent back to the pool, I seem to remember they were reset. That would
> also reset the work_mem, you'd still see the same pid on PG logs, but
> it's not the same session.

Except that any open transactions are rolled back no other reset is done. The correct way to handle this would be to set the options and commit the transaction in Pool connect or checkout events. The event choice depends on whether application scope or request scope parameters are wanted.

--
Ants Aasma

pgsql-performance by date:

Previous
From: Stefan Keller
Date:
Subject: Re: PG as in-memory db? How to warm up and re-populate buffers? How to read in all tuples into memory?
Next
From: Anssi Kääriäinen
Date:
Subject: Large insert and delete batches