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

From Claudio Freire
Subject Re: problems with set_config, work_mem, maintenance_work_mem, and sorting
Date
Msg-id CAGTBQpZ8m2gKS36JGKANBzb39hjynSJ3w9mTu9QetdmRzi5Ocw@mail.gmail.com
Whole thread Raw
In response to Re: problems with set_config, work_mem, maintenance_work_mem, and sorting  (Tom Lane <tgl@sss.pgh.pa.us>)
Responses Re: problems with set_config, work_mem, maintenance_work_mem, and sorting
List pgsql-performance
On Tue, Feb 28, 2012 at 6:54 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>
>> ... which is the ORM library (SQLAlchemy) doing a reflection of the
>> table(s) involved.
>
> Oh, there's an ORM involved?  I'll bet a nickel it's doing something
> surprising, like not issuing your SET until much later than you thought.

I'd rather go for an auto-rollback at some point within the
transaction that issued the set work_mem. SQLA tends to do that if,
for instance, an exception is risen within a transaction block (ie,
flushing).

You can issue the set work_mem in its own transaction, and commit it,
and in that way avoid that rollback.

pgsql-performance by date:

Previous
From: Claudio Freire
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: Jon Nelson
Date:
Subject: Re: problems with set_config, work_mem, maintenance_work_mem, and sorting