Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7Jjy-0001fe-O5 for pgsql-performance@arkaria.postgresql.org; Mon, 19 Dec 2022 17:15:50 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1p7Jjx-00007G-Bd for pgsql-performance@arkaria.postgresql.org; Mon, 19 Dec 2022 17:15:49 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7Jjw-0008Vp-Ts for pgsql-performance@lists.postgresql.org; Mon, 19 Dec 2022 17:15:49 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p7Jjt-0001BV-Lc for pgsql-performance@lists.postgresql.org; Mon, 19 Dec 2022 17:15:47 +0000 Received: by mail-il1-x133.google.com with SMTP id z18so5060326ils.3 for ; Mon, 19 Dec 2022 09:15:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20210112.gappssmtp.com; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:from:to:cc:subject:date :message-id:reply-to; bh=8YkOJDA9LfIqwyITdooNt3atlQktYuMkah7+B1JqIAo=; b=sSONTaxa5rvmsPyuKKpB+gXtgKqZz3jaUBMCIhONjXA8SaVDZfGephaeD9UGjUmwBt Sm7mOf7zmLKwaKTfuqbaA4xgEk/gf2i5d3PUSfvWjp/OMRzmkperyWgXPuTFPBnjfae/ z7GAMcE+2JqgqUKSKEd849bx/nUSz+mUXMTGZYBL8kHarU5DRLNGv9YUM76DBfpF1TJQ 18fuVLosgYbsadtmJG9TdGXScOU4eIfJdkQNguvJAml6Jdouhev1bj4thftQXtcPMfkt WGsIZ/UwCCUGGDZaf6pJXX90E652tUcRh275EBTvHVxr8I7EWVzGdSY4pN9xdnS0cFOz XMXg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=user-agent:in-reply-to:content-disposition:mime-version:references :message-id:subject:cc:to:from:date:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=8YkOJDA9LfIqwyITdooNt3atlQktYuMkah7+B1JqIAo=; b=iLwfKMEV+nj6Bd+9tgWM+HVzEAQtSu3w7LkIJ+fZJ8i2DAzFvTFMpndFIfWZU7lsEy 0zmHW0H32iwscd2fQjFyiibzwL8LxdZCIvhjIO5MKAwwxvXBLl4nAQ8HdVYxvHoM/qCV Ky4nEMbxhW3kjUhpNGqtG5/NLeLQWwST6w6XJ/R0G3czM5KOgMNso3bAqwQo1bXyYtyC K5wYwMgeIKjIzkhpaQY6kZDRpTETpLdvbAnbltLM4YHHZs1/Zen+fdgPPCrFS+DUflMg ocKUCTfRPmyN4V6G/6veyZPwqSo2PBVUVSmmLLJSr9AbU5XRU5niwRJ6WSXU6ovKwcaH +PzQ== X-Gm-Message-State: ANoB5pnUBWaALOq9NITc5+dXsCRKh7DvzpctiYLZ7YQ2VopTS2jWs+B9 Ho89mYw/8jifsbaQgNKMLcUk0w== X-Google-Smtp-Source: AA0mqf6u2SIv7y1az1DdCCw0Uz6YVgP5MhEWk46OOtZ4jqDdcdfxdcD/PPLxG4qAlDt+4Tq24A+YaA== X-Received: by 2002:a92:6a05:0:b0:302:a58f:38ab with SMTP id f5-20020a926a05000000b00302a58f38abmr20754097ilc.0.1671470144736; Mon, 19 Dec 2022 09:15:44 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id u69-20020a022348000000b00392238fe4b2sm1135201jau.133.2022.12.19.09.15.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 09:15:44 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 53E588008DE; Mon, 19 Dec 2022 11:15:43 -0600 (CST) Date: Mon, 19 Dec 2022 11:15:43 -0600 From: Justin Pryzby To: Frits Jalvingh Cc: pgsql-performance@lists.postgresql.org Subject: Re: Fwd: temp_file_limit? Message-ID: <20221219171543.GZ1153@telsasoft.com> References: <20221218155705.GT1153@telsasoft.com> <20221218201052.GV1153@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.9.4 (2018-02-28) List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk On Mon, Dec 19, 2022 at 05:57:42PM +0100, Frits Jalvingh wrote: > @justin: > > Ran the query again. Top shows the following processes: > PID USER PR NI VIRT RES SHR S %CPU %MEM TIME+ Thanks > root@chatelet:/d2/var/lib/postgresql/15/main/base# du --max=2 -mx > ./pgsql_tmp |sort -nr > 412021 ./pgsql_tmp/pgsql_tmp650830.3.fileset > 412021 ./pgsql_tmp > ^^^ a few seconds after this last try the query aborted: > ERROR: temporary file size exceeds temp_file_limit (104857600kB) > > One possibility is that there are files in the tmpdir, which have been > > unlinked, but are still opened, so their space hasn't been reclaimed. > > You could check for that by running lsof -nn |grep pgsql_tmp Any deleted > > files would say things like 'DEL|deleted|inode|no such' > > I do not really understand what you would like me to do, and when. The disk > space is growing, and it is actual files under pgsql_tmp? Run this during the query as either postgres or root: | lsof -nn |grep pgsql_tmp |grep -E 'DEL|deleted|inode|no such' Any files it lists would be interesting to know about. > Hope this tells you something, please let me know if you would like more > info, and again - thanks! I think Thomas' idea is more likely. We'd want to know the names of files being written, either as logged by log_temp_files or from | find pgsql_tmp -ls during the query. -- Justin