Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtp (Exim 4.84_2) (envelope-from ) id 1dhfH7-0006Gk-CU for pgsql-performance@arkaria.postgresql.org; Tue, 15 Aug 2017 17:05:05 +0000 Received: from localhost ([127.0.0.1] helo=postgresql.org) by malur.postgresql.org with smtp (Exim 4.84_2) (envelope-from ) id 1dhfH5-0002OI-Mq for pgsql-performance@arkaria.postgresql.org; Tue, 15 Aug 2017 17:05:03 +0000 Received: from makus.postgresql.org ([2001:4800:1501:1::229]) by malur.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA384:256) (Exim 4.84_2) (envelope-from ) id 1dhfH5-0002O8-1C for pgsql-performance@postgresql.org; Tue, 15 Aug 2017 17:05:03 +0000 Received: from mail-qt0-x22b.google.com ([2607:f8b0:400d:c0d::22b]) by makus.postgresql.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_CBC_SHA1:256) (Exim 4.84_2) (envelope-from ) id 1dhfH2-0006wC-63 for pgsql-performance@postgresql.org; Tue, 15 Aug 2017 17:05:01 +0000 Received: by mail-qt0-x22b.google.com with SMTP id 16so7615516qtz.4 for ; Tue, 15 Aug 2017 10:04:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=FjBuNztie8If0i2dQPez13Z1WNfAZQa97WglNQTLKJw=; b=m7gdzv3HzHc81JdnjOlKoRJSxFQqyTc8FRAtTBfYbEL7iU029Fq8UzIpXUwGNeGgYs wQ7OnSK7D8cqYOQ55rRuPoZbo9Ovf0bFwwLxLN19tvstlmpFWI/LjrI2MvPuPAVnevNC n8RCUbyY7X0Co8QIWt9KAXamvdBy/sfqoN0e6fk1BYWrs6SlF7ZO7uwxhvhA+4vCJcWw UpVh26JGoxhAA4qmsL3w0B+7yYHyvR0hfRYVyS0Yw3L1ETQbn1cjrgHLPktcFgBW9qqO rhDVBG1RdUN4JelSyDcmtWVz13SlB3Z/t5AUWSpP7hWTsEJJYkWvALN5WNygUycaJ14v IVBw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=FjBuNztie8If0i2dQPez13Z1WNfAZQa97WglNQTLKJw=; b=tThjBjtH5NRxIhzg2QucBQ4xmea5lcNPzrFFOeQYtt6/8aKC/TuGRPLljcxPU0WXur v3LLWchKV+7oFVzIAloesG5Le1CQ1ctXw+eei5WAtfKuPf9pjrF8dn4BOgmykIG28Kcg ADr2E05H/nnxGpKb7pJbTwQKOAskA+AtTtKYVnmon5xFFTpYAmT8sYSY4nQQWDWj0OYT btbwhId+BN922Nhh5QKrCSkFtZI8hlas8Yqq3oX8wUkChyMwSwKKR8AHG2pE8EnDTKJB wUfEKSrX/nZtywsX1aiXgqx2m7Qa3qh9RkNeeOCSYr/02VlXuISFshxl3t8xwssNnWjz DNPg== X-Gm-Message-State: AHYfb5gw/kuzoSH3hKNiu4sjejVKPbz8lxYWlS0+az9Su46MvgfVTVQV 5HV1s84PeF0t0XXX03G60KOPk5SOIg== X-Received: by 10.237.53.169 with SMTP id c38mr36464108qte.191.1502816699026; Tue, 15 Aug 2017 10:04:59 -0700 (PDT) MIME-Version: 1.0 Received: by 10.140.105.164 with HTTP; Tue, 15 Aug 2017 10:04:58 -0700 (PDT) In-Reply-To: References: <87r2wdeqwr.fsf@jsievers.enova.com> From: Scott Marlowe Date: Tue, 15 Aug 2017 11:04:58 -0600 Message-ID: Subject: Re: Odd sudden performance degradation related to temp object churn To: Jeremy Finzel Cc: Jerry Sievers , postgres performance list Content-Type: text/plain; charset="UTF-8" List-Archive: List-Help: List-ID: List-Owner: List-Post: List-Subscribe: List-Unsubscribe: X-Mailing-List: pgsql-performance Precedence: bulk Sender: pgsql-performance-owner@postgresql.org Oh yeah, sorry. Was looking at a different system where we were using a tablespace for temp tables. On Tue, Aug 15, 2017 at 10:00 AM, Jeremy Finzel wrote: >> > Not so. >> > >> > This system has no defined temp_tablespace however spillage due to >> > sorting/hashing that exceeds work_mem goes to base/pgsql_tmp which we >> > have symlinked out to a local SSD drive. >> >> Which is also where temp tables are created. > > > This isn't true, at least in our environment. Just as proof, I have created > a couple of temp tables, and querying the relfilenodes, they only show up > under base//t4_: > > test=# CREATE TEMP TABLE foo(id int); > CREATE TABLE > test=# INSERT INTO foo SELECT * FROM generate_series(1,100); > INSERT 0 100 > test=# CREATE TEMP TABLE bar(); > CREATE TABLE > test=# SELECT relfilenode FROM pg_class WHERE relname IN('foo','bar'); > relfilenode > ------------- > 20941 > 20944 > (2 rows) > > postgres@foo:/san//pgdata/base$ ls -l > total 44 > drwx------ 2 postgres postgres 4096 Jul 7 15:19 1 > drwx------ 2 postgres postgres 4096 Nov 29 2016 12408 > drwx------ 2 postgres postgres 4096 Jul 14 14:00 12409 > drwx------ 2 postgres postgres 12288 Jul 7 15:19 18289 > drwx------ 2 postgres postgres 12288 Jul 7 15:19 18803 > drwx------ 2 postgres postgres 4096 Jul 7 15:19 20613 > drwx------ 2 postgres postgres 4096 Aug 15 08:06 20886 > lrwxrwxrwx 1 postgres postgres 30 Jul 7 15:15 pgsql_tmp -> > /local/pgsql_tmp/9.6/ > > postgres@pgsnap05:/san//pgdata/base$ ls -l 20886 | grep > '20941\|20944' > -rw------- 1 postgres postgres 8192 Aug 15 10:55 t4_20941 > -rw------- 1 postgres postgres 0 Aug 15 10:55 t4_20944 > postgres@pgsnap05:/san/dba_dev_d/pgdata/base$ cd pgsql_tmp > postgres@pgsnap05:/san/dba_dev_d/pgdata/base/pgsql_tmp$ ls -l > total 0 -- To understand recursion, one must first understand recursion. -- Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-performance