Received: from magus.postgresql.org (magus.postgresql.org [87.238.57.229]) by mail.postgresql.org (Postfix) with ESMTP id DAB759552D7 for ; Tue, 28 Feb 2012 17:55:02 -0400 (AST) Received: from sss.pgh.pa.us ([66.207.139.130]) by magus.postgresql.org with esmtp (Exim 4.72) (envelope-from ) id 1S2V0b-0006pc-RO for pgsql-performance@postgresql.org; Tue, 28 Feb 2012 21:55:01 +0000 Received: from sss2.sss.pgh.pa.us (tgl@localhost [127.0.0.1]) by sss.pgh.pa.us (8.14.2/8.14.2) with ESMTP id q1SLsiQq027624; Tue, 28 Feb 2012 16:54:44 -0500 (EST) To: Jon Nelson cc: pgsql-performance@postgresql.org Subject: Re: problems with set_config, work_mem, maintenance_work_mem, and sorting In-reply-to: References: <9466.1330457283@sss.pgh.pa.us> <10857.1330462314@sss.pgh.pa.us> Comments: In-reply-to Jon Nelson message dated "Tue, 28 Feb 2012 15:38:12 -0600" Date: Tue, 28 Feb 2012 16:54:43 -0500 Message-ID: <27623.1330466083@sss.pgh.pa.us> From: Tom Lane X-Pg-Spam-Score: -1.9 (-) X-Archive-Number: 201202/259 X-Sequence-Number: 46431 Jon Nelson writes: > On Tue, Feb 28, 2012 at 2:51 PM, Tom Lane wrote: >> Hmph ... does seem a bit weird.  Can you turn on log_statements and >> identify which operations aren't using the session values? > I had log_min_duration_statement = 1000. That's not really going to prove much, as you won't be able to see any commands that might be setting or resetting the work_mem parameters. > ... 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. regards, tom lane