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 1kroYJ-0005BX-Iw for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2020 20:46:39 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1kroYH-00040l-EK for pgsql-hackers@arkaria.postgresql.org; Tue, 22 Dec 2020 20:46:37 +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 1kroYH-00040e-7h for pgsql-hackers@lists.postgresql.org; Tue, 22 Dec 2020 20:46:37 +0000 Received: from sss.pgh.pa.us ([66.207.139.130]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kroYB-0007YP-OJ for pgsql-hackers@lists.postgresql.org; Tue, 22 Dec 2020 20:46:36 +0000 Received: from sss1.sss.pgh.pa.us (localhost [127.0.0.1]) by sss.pgh.pa.us (8.15.2/8.15.2) with ESMTP id 0BMKkRoN654475; Tue, 22 Dec 2020 15:46:27 -0500 From: Tom Lane To: Robert Haas cc: Tomas Vondra , Andrey Borodin , Daniil Zakhlystov , Konstantin Knizhnik , Denis Smirnov , PostgreSQL Hackers Subject: Re: libpq compression In-reply-to: References: <612f227d-cb27-9238-5922-1500f8b2eb96@postgrespro.ru> <160623927937.7563.15974279758478581796.pgcf@coridan.postgresql.org> <6811D196-E2FB-40CC-B1C9-F19427FBF675@yandex-team.ru> <93027ee4-fefa-a8ca-2cc7-245c912bf824@postgrespro.ru> <62527092-16BD-479F-B503-FA527AF3B0C2@yandex-team.ru> <579f308e-c46c-2e79-3f90-9846450a3d71@enterprisedb.com> <626075.1608663785@sss.pgh.pa.us> <1! f76b4b8-3bff-17af-ef63-872190411a60@enterprisedb.com> <630701.1608665602@sss.pgh.pa.us> Comments: In-reply-to Robert Haas message dated "Tue, 22 Dec 2020 15:16:58 -0500" MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <654472.1608669987.1@sss.pgh.pa.us> Date: Tue, 22 Dec 2020 15:46:27 -0500 Message-ID: <654473.1608669987@sss.pgh.pa.us> List-Id: List-Help: List-Subscribe: List-Post: List-Owner: List-Archive: Precedence: bulk Robert Haas writes: > On Tue, Dec 22, 2020 at 2:33 PM Tom Lane wrote: >> I'd assume that there's a direct correlation between the compression level >> setting and the window size; but I've not studied the libzstd docs in >> enough detail to know what it is. > But there is a privilege boundary between the sender and the receiver. > What's alleged here is that the sender can do a thing which causes the > receiver to burn through tons of memory. It doesn't help anything to > say, well, the sender ought to use a window size of N or less. What if > they don't? The receiver rejects the data as though it were corrupt. regards, tom lane