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 1p7KDy-0003aj-PM for pgsql-performance@arkaria.postgresql.org; Mon, 19 Dec 2022 17:46: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 1p7KDx-00063P-Ek for pgsql-performance@arkaria.postgresql.org; Mon, 19 Dec 2022 17:46:49 +0000 Received: from magus.postgresql.org ([2a02:c0:301:0:ffff::29]) by malur.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1p7KDx-00063G-4u for pgsql-performance@lists.postgresql.org; Mon, 19 Dec 2022 17:46:49 +0000 Received: from mail-il1-x133.google.com ([2607:f8b0:4864:20::133]) by magus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1p7KDv-0008Q6-3K for pgsql-performance@lists.postgresql.org; Mon, 19 Dec 2022 17:46:48 +0000 Received: by mail-il1-x133.google.com with SMTP id o13so5097399ilc.7 for ; Mon, 19 Dec 2022 09:46:46 -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:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=b5hNcXj+bhOAFQsHX0DQtGfxuedVQRLFH359s1a5qSo=; b=2st2IRwTWvz3deMVtB8qU1nnPbhjayzRztwJyhFLoI0eyB6P4Yshy18vrz4zQylazS h2QLBnkF1cTs2K6nnlT4Wb2kJlsoihzwb2Xj/yLwvZtinbm1FofpLHmpEvDDjF5xC8X2 5VutUCBApa5XWJUjtEC+W6iWSWpaJh/aKeTI4NvoCM4nWiBe094AQv7QMdThgrntIZbn A8NuRycjmCXb7MsDDNrBhb0bnSMJf/oWFx35nwBXEO4kN/EpmsMvpWFkVsijp4fddcR/ Wld9zK7np89nNvCwMSUIwGmAjaqCQ64qF/cEZlqDvkXICJJaD9bJgixMcZU0iA1tEqz+ Ijvg== 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:message-id :subject:cc:to:from:date:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=b5hNcXj+bhOAFQsHX0DQtGfxuedVQRLFH359s1a5qSo=; b=rVHWlM91PruC9cYNwA33Cclx8HErh2Hqpg3LHSz8ZfGV28xen6owTh3i299QbAdiZ5 P6YN8UhELZnRyuwlnqUPTTLPBYvAyX3zH3uYyXXfEXfPSvYpz2RFna0YikkWskV6hV9w W6onmuXdJFO4AfqgotcVdVyU45fSE+MVDZSglKIjdKBJ6Ydm2ZjdCszR8DDDrSfbxmYH BgJVyYPS/7DL5/44g2ryRCzmbJrDv5S+dtkzxwsUFQWBOJnHNkiXp0uOWgLxB703TIYK Mft13xEnvzKkqaoylo9+NfwAybmPVwNzV9N6pdzZ5dA/iwqCgdbA387t4CXU6dUoTIrL bdrg== X-Gm-Message-State: ANoB5pktfcuL03v6RGAfQSV7HpIeWXmx/knqASZMFGw6Ur2Ew8qF6DfR rP5XenQ9KOtHXJ4QX3lZZbrmVGENGC6/iOOs X-Google-Smtp-Source: AA0mqf7WoO/CV0xBzo2SgC58Wi1p+Nk8LxdiqMahRzsJVPGBQIcZNLj4OFKi4QLXFStSpPd2qnl19Q== X-Received: by 2002:a92:6a0e:0:b0:304:cc85:1da8 with SMTP id f14-20020a926a0e000000b00304cc851da8mr14948128ilc.18.1671472005495; Mon, 19 Dec 2022 09:46:45 -0800 (PST) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id b10-20020a92ce0a000000b00300e8df48f9sm3432427ilo.9.2022.12.19.09.46.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 19 Dec 2022 09:46:45 -0800 (PST) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 6F1CF8008DE; Mon, 19 Dec 2022 11:46:44 -0600 (CST) Date: Mon, 19 Dec 2022 11:46:44 -0600 From: Justin Pryzby To: Thomas Munro , Frits Jalvingh Cc: pgsql-performance@lists.postgresql.org Subject: Re: Fwd: temp_file_limit? Message-ID: <20221219174644.GD1153@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 06:27:57PM +0100, Frits Jalvingh wrote: > I have listed the files during that run, > 213M -rw------- 1 postgres postgres 213M dec 19 17:46 i100of128.p0.0 > 207M -rw------- 1 postgres postgres 207M dec 19 17:46 i100of128.p1.0 > 210M -rw------- 1 postgres postgres 210M dec 19 17:49 i100of256.p0.0 > 211M -rw------- 1 postgres postgres 211M dec 19 17:49 i100of256.p1.0 > 188M -rw------- 1 postgres postgres 188M dec 19 17:53 i100of512.p0.0 [...] I think that proves Thomas' theory. I'm not sure how that helps you, though... On Mon, Dec 19, 2022 at 01:51:33PM +1300, Thomas Munro wrote: > One possibility is that you've hit a case that needs several rounds of > repartitioning (because of a failure to estimate the number of tuples > well), but we can't see that because you didn't show EXPLAIN (ANALYZE) > output (understandably if it runs out of disk space before > completing...). The parallel hash code doesn't free up the previous > generations' temporary files; it really only needs two generations' > worth concurrently (the one it's reading from and the one it's writing > to). In rare cases where more generations are needed it could unlink > the older ones -- that hasn't been implemented yet. If you set > log_temp_files = 0 to log temporary file names, it should be clear if > it's going through multiple rounds of repartitioning, from the names > (...of32..., ...of64..., ...of128..., ...of256..., ...). -- Justin Pryzby System Administrator Telsasoft +1-952-707-8581