Received: from malur.postgresql.org ([217.196.149.56]) by arkaria.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vhxvE-00BEcI-2P for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jan 2026 22:40:33 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.96) (envelope-from ) id 1vhxvC-00Eg6K-2M for pgsql-hackers@arkaria.postgresql.org; Mon, 19 Jan 2026 22:40:31 +0000 Received: from makus.postgresql.org ([2001:4800:3e1:1::229]) by malur.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 (Exim 4.96) (envelope-from ) id 1vhxvC-00Eg6C-1H for pgsql-hackers@lists.postgresql.org; Mon, 19 Jan 2026 22:40:30 +0000 Received: from mail-yw1-x112d.google.com ([2607:f8b0:4864:20::112d]) by makus.postgresql.org with esmtps (TLS1.3) tls TLS_ECDHE_RSA_WITH_AES_128_GCM_SHA256 (Exim 4.96) (envelope-from ) id 1vhxv9-001Jcp-20 for pgsql-hackers@postgresql.org; Mon, 19 Jan 2026 22:40:29 +0000 Received: by mail-yw1-x112d.google.com with SMTP id 00721157ae682-78fba1a1b1eso76404697b3.1 for ; Mon, 19 Jan 2026 14:40:28 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1768862427; cv=none; d=google.com; s=arc-20240605; b=IFeUZIBGCsABl8sha3tKGM3VkACX5Ba0yFzz5QuCpPW9OJnN8KC0RitmQsEsc9JiL7 ZMOCFmsKy6gQpRb1lG8mjdSoKyE3dujcj709HkzQfl/ZThZS9owH8G+Zddtl0sGei02o U9gwuSXyusC4pwFjM7EKsJasaFn4aKxYscnfxqt1oxTkRAB8m7A09QURGeeefKKUHnj9 yhDXFWkMGLA4uYiJY65lyB+f7zCZUJ8c8uOxfa5OPnV6dBrk7KmYnnrQZuB8XOlsM4qZ cBPS5vi2u4ZTfXpm2JZhnlP5/mXQSxU2vIek6UNEsv80MPG13z7DiCeKNMKYMb5n/klP 9XNw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:dkim-signature; bh=yHASVyB+LwSjOpwhIpnwOUp5TbDUvyGP4fm2S6Iw0cc=; fh=aYy8epgiTaGfU3jXMYb8EdIGP8jxIsAaRgV8oCogkrY=; b=Bycu8nUJ4Zg1cDzIsaoyQNvPKUvzdw+DBXjaYeGjZwG42pWfh7v22DX3TK+JU5oE3Z 8OrW2V9LrM4ZM/UvjQaz1mDMQkm1a26vo2pg1sjgvN0WfA2Z3wwfbbbQkyCjooJuf6XD byvyQggzaRi24XTadX06hs9dRZmd7/xOClPrI/0SMqUHP+DqHHClaF5ggM74cpoWE5eh IMsRnw1wAVCOJJUFUdOgXkaE88W5nFIFpxeLFqn1oalSBoIOCOprgfIEEzVy7yt4tBzE rdDa2Ue69GzGFp5EtmJF/ALtD+GIFKWCeVGo69ApDgEYDgpVEPtorKzUE2zND/H8G3ts 9dfw==; darn=postgresql.org ARC-Authentication-Results: i=1; mx.google.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=percona.com; s=google; t=1768862427; x=1769467227; darn=postgresql.org; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=yHASVyB+LwSjOpwhIpnwOUp5TbDUvyGP4fm2S6Iw0cc=; b=Xk1exBI0UIGt72zyp3iJlfBMfUaDiAz+ux0yDKAr/aK0hnTiroY1N2OfQpgrnSqxJ6 gyJltLUW1VI9r94cBs8TME4S4vYlcxojgX8A7p9VM/8zh/eL9BiEdSH+SniOcKvUdiVS R4VFJtZ0GDZdU51dxbEE37iEJWvt/xdREK3cE= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768862427; x=1769467227; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to; bh=yHASVyB+LwSjOpwhIpnwOUp5TbDUvyGP4fm2S6Iw0cc=; b=X6uogWgG+HX9894QvtWuMIyrZytdT2gbRPKls76vcuE+F/wCaciB0ZG6Oiq9FLppNZ taDm1b2+SIchQw8om0/IQwMjBVeuq4eKfgGU2i5kD0REKuMR+QnQQYqW5loyyBu9zIwZ t2uU7NDyUkjQ2YhP/ATC/akKAa5fLbffQwGVxwzX+2z0LLYT9/wQKyUM6AGXdXsi8yPl tKHKNlG3n7MW/91Zlikgwgv0SpLPoe9Ki/vGVQoLIq5P1GF/RRC0VFO77mO5l7Egv0EG vIyv4mmnvrDSPlqM1CCgsDUb9gHxZsDwXJcfX+rE2wl9Qq0VvW3RHAu8unIMFdM3sddW iWlA== X-Forwarded-Encrypted: i=1; AJvYcCXbsZXJJ/9WbIAacvKoJXW6XyEd2faKyOd0KdZbYBI1jjiywe59J5aGT/xWs+UPQjobpgJgOcbkrurGoswL@postgresql.org X-Gm-Message-State: AOJu0YznUi8Nmg0F8k8LYGVPET2tfHxZDNmzhI88IBXTxmcX43LRbLt+ 9qAWYlIStD8boQv99i8Igjn0IOroBsMoCCCuLsk6SQdUQL+mtn1YQ2FWrD9PozGzmbfMRjZgWZJ ZuK108dkOTEKPMIGhieh/D+Ngu6lqiUGHRbWhM0bSvgMMbMvpiQobXpG+8ncHAvoJww0cjnpSNY jAd8Bmtay90ie6LpkOqMLrpoLAPTHkD+xkqO2MxPEIgwf0R0uR+LlyFzhY+Afv8ExojKA+Tc6ZH S5ESU3t5QZNGpIAbjZTcW9UmaL+FlVK3hdaxqMmAQkY3IPOZVI= X-Gm-Gg: AZuq6aI5XGf6PbnbdFtLCQMjN3lSjAFSx59j7I6F0lkA7+WwEoDok6QZzuVKQLxa+2W SqXqtkCjbauIZ59RN69sC/wMt6Mc4gKlJpmu2ouaaEUqyVpfDFJmb9BHDV8kVPG/C+9roOmd99q 8G0Z2hyP9iNjnuCEXAGVgmrO4Jl48EJBoTXmpLH3hVoL95Q2uJJODuKGQL7DqlDtvcaWN81dVHH p/xZi8tzDtECUTMrApPmmOe802RCJGAriOSF21RUUSc/KSRiTxwJc7tn79Grua6e5GzQjQ41kC6 cDmwPO1IK+1FdIDruFYYpsP4vXdi/dgIjZ7dLaJZG0oNZvgM82ZbDD1w/kNt5LrUMnUbjB52lOI tmg== X-Received: by 2002:a05:690c:3302:b0:794:8bd:66f6 with SMTP id 00721157ae682-79408bd689fmr1590087b3.29.1768862426843; Mon, 19 Jan 2026 14:40:26 -0800 (PST) MIME-Version: 1.0 References: <7bcc0420-d457-4af5-a459-a4e5d929a665@vondra.me> <7gbzkoxrpqvj2sgxof4pqirz7pf6wb5vizak3mxrz2zpvrf3pa@lvnwdsy3em56> In-Reply-To: From: Zsolt Parragi Date: Mon, 19 Jan 2026 22:40:16 +0000 X-Gm-Features: AZwV_QgRkFRw8rSwmccK_rjM7xiZe83s6PrxT26JWVQyP4jyXF-2Tcad6ePPEKc Message-ID: Subject: Re: Proposal: Adding compression of temporary files To: Filip Janus Cc: lakshmi , Tomas Vondra , pgsql-hackers@postgresql.org Content-Type: text/plain; charset="UTF-8" X-CLOUD-SEC-AV-Sent: true X-CLOUD-SEC-AV-Info: percona,google_mail,monitor X-Gm-Spam: 0 X-Gm-Phishy: 0 List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Archived-At: Precedence: bulk Hello! I tried to review the code. It compiled, the test suite passed. I noticed two typos: buffile.c:77 - "Disaled" buffile.c:133 - "mathods" And a few other small findings: buffile.h:35 and buffile.c:63 - same constants defined first as an Enum and then as #defines - code builds properly without the defines. buffile.c:121 - compress_tempfile is defined, set to false at :167, but never used otherwise guc_tables.c:470 - the comment says that pglz isn't supported yet, but we have a value for it, and I see support for it in the code buffile.c:659: (and at other places) if USE_LZ4 is undefined, the codepath doesn't do anything. I think these ifdefs should follow how other compression code works, such as wal compression where there's an #else path with elog(ERROR, ...) Similarly, maybe there should be an explicit TEMP_NONE_COMPRESSION branch that does nothing, and the default branch should be an error? buffile.c:265: If seek isn't supported/limited, shouldn't there be at least an assertion about it in BufFileSeek? And tell isn't mentioned, but it seems to me that tell also doesn't work properly.