From: | Jon Nelson <jnelson+pgsql(at)jamponi(dot)net> |
---|---|
To: | Claudio Freire <klaussfreire(at)gmail(dot)com> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-performance(at)postgresql(dot)org |
Subject: | Re: problems with set_config, work_mem, maintenance_work_mem, and sorting |
Date: | 2012-02-28 23:00:34 |
Message-ID: | CAKuK5J2FFqWrBOUJ3KuGC2wKUpawXRKij=oJd5TLWjf8HvjwPg@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-performance |
On Tue, Feb 28, 2012 at 4:46 PM, Claudio Freire <klaussfreire(at)gmail(dot)com> wrote:
> On Tue, Feb 28, 2012 at 6:54 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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.
I cranked the logging /all/ the way up and isolated the server.
I suspect that your theory is correct.
I'll spend a bit more time investigating.
--
Jon
From | Date | Subject | |
---|---|---|---|
Next Message | Claudio Freire | 2012-02-28 23:43:37 | Re: problems with set_config, work_mem, maintenance_work_mem, and sorting |
Previous Message | Claudio Freire | 2012-02-28 22:46:52 | Re: problems with set_config, work_mem, maintenance_work_mem, and sorting |