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 1lN8cB-0006Kj-6p for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Mar 2021 06:28:07 +0000 Received: from localhost ([127.0.0.1] helo=malur.postgresql.org) by malur.postgresql.org with esmtp (Exim 4.92) (envelope-from ) id 1lN8cA-0008Sg-4H for pgsql-hackers@arkaria.postgresql.org; Fri, 19 Mar 2021 06:28:06 +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 1lN8c9-0008SZ-QQ for pgsql-hackers@lists.postgresql.org; Fri, 19 Mar 2021 06:28:05 +0000 Received: from mail-il1-x12a.google.com ([2607:f8b0:4864:20::12a]) by makus.postgresql.org with esmtps (TLS1.3:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.92) (envelope-from ) id 1lN8c7-0007MB-Gg for pgsql-hackers@lists.postgresql.org; Fri, 19 Mar 2021 06:28:04 +0000 Received: by mail-il1-x12a.google.com with SMTP id t6so7102979ilp.11 for ; Thu, 18 Mar 2021 23:28:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=telsasoft-com.20150623.gappssmtp.com; s=20150623; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to:user-agent; bh=XYg3lN1QqjClPXN5G/j0tOslCvdkTYjQh85Ubg85g9A=; b=0bhztfbjoYnZO2Ompdl707n623y2i6Elpjnp+ggUShQXtmxS1kvz5FQYBJcF8UT4SU UuJcoufSM+XX4f8sjK+EgtWAZpjStqfdVtTENKOW93DRaiBpQmmgQXm+MgbcHr/4FsCF wqHMwB5YsV1LAVb9HjPhWi8pQUaTEF5AGKk+RVPRfJrAXEFS9NZzwQ5X/F5G9ptnDjRI MaWwCuYRXZTQ/dFIaCxcvRLlQ/3h66MpwFIYbfjhrpRUvL3+kXgpQV3STwsgspMWNFnY /pNwC9oZzcj1UClCa2D95+P1bYCYEVLCfrcYMGKkURqR67vvVAP6FKGMds7RKDHluhpW /brg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to:user-agent; bh=XYg3lN1QqjClPXN5G/j0tOslCvdkTYjQh85Ubg85g9A=; b=RS8yiM0cSB/jr+1aPxM4O4m8dg1ADkF7JkwoU+hXuzK92zqRUgziqpnOYl2skI9ius aeYx3JPkrkXqIYxvPqbxN5CShO+eE19rR0dGcwmVY9TrYSsAlJBkF2q5vAEZqFy9ZgRT QDnGuJ+2/INwc0/AzFxHb5zW8hJYgBrgEb1zHalOh5Ofc66YyTD6pjyuiIpP7ferQZaa /Md2vCkDWpgDHeGDQQL+kuVdbn/X2kmxan6LxahSAnHH+Fs7JEwfGw683xoBGTeIErXl MQSQcfnWrAXZXk45vvcTqPoGf5WmmmBE5xbb/2W+7E6A0tcLnvRzY3NkCgdCYLQo75xb 0BfA== X-Gm-Message-State: AOAM5319trc2AdGE5aROjtstm5ugsdE5q/pS/ml8Lqf31bTKi/xR9f8X 3vl2KyWeQC/XY+wR4aYPN05Ofw== X-Google-Smtp-Source: ABdhPJz3DaawtBL6l4nRO4kdDU681piFH/wUDH7z2r2o3fpTfEKs5sbk0Q+D8AgJeQF0XfBvHinWuw== X-Received: by 2002:a92:d0c3:: with SMTP id y3mr1539730ila.303.1616135282651; Thu, 18 Mar 2021 23:28:02 -0700 (PDT) Received: from pryzbyj.telsasoft (charmander.telsasoft.com. [50.244.222.1]) by smtp.gmail.com with ESMTPSA id j17sm2090178iok.37.2021.03.18.23.28.01 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 18 Mar 2021 23:28:02 -0700 (PDT) Received: by pryzbyj.telsasoft (Postfix, from userid 1000) id 1D1E9800925; Fri, 19 Mar 2021 01:28:01 -0500 (CDT) Date: Fri, 19 Mar 2021 01:28:00 -0500 From: Justin Pryzby To: Daniil Zakhlystov Cc: pgsql-hackers@lists.postgresql.org, Konstantin Knizhnik Subject: Re: libpq compression Message-ID: <20210319062800.GI11765@telsasoft.com> References: <161609580905.28624.5304095609680400810.pgcf@coridan.postgresql.org> <20210319010232.GH11765@telsasoft.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210319010232.GH11765@telsasoft.com> 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 Thu, Mar 18, 2021 at 08:02:32PM -0500, Justin Pryzby wrote: > On Thu, Mar 18, 2021 at 07:30:09PM +0000, Daniil Zakhlystov wrote: > > The new status of this patch is: Ready for Committer > > The CF bot is failing , because the last patch sent to the list is from January: > | Latest attachment (libpq-compression-31.patch) at 2021-01-12 14:05:22 from Konstantin Knizhnik ... > > The most recent messages have all had links to github repos without patches > attached. > > Also, the branches I've looked at on the github repos all have messy history, > and need to be squished into a coherent commit or set of commits. > > Would you send a patch to the list with the commits as you propose to merge > them ? This needs some significant effort: - squish commits; * maybe make an 0001 commit supporting zlib, and an 0002 commit adding zstd; * add an 0003 patch to enable zlib compression by default (for CI - not for merge); - rebase to current master; - compile without warnings; - assign OIDs at the end of the ranges given by find-unused-oids to avoid conflicts with patches being merged to master. Currently, make check-world gets stuck in several places when I use zlib. There's commit messages claiming that the compression can be "asymmetric" between client-server vs server-client, but the commit seems to be unrelated, and the protocol documentation doesn't describe how this works. Previously, I suggested that the server should have a "policy" GUC defining which compression methods are allowed. Possibly including compression "level". For example, the default might be to allow zstd, but only up to level 9. This: + /* Initialise values and NULL flags arrays */ + MemSet(values, 0, sizeof(values)); + MemSet(nulls, 0, sizeof(nulls)); can be just: + bool nulls[PG_STAT_NETWORK_TRAFFIC_COLS] = {false}; since values is fully populated below. typo: aslogirhm I wrote about Solution.pm earlier in this thread, and I see that it's in Konstantin's repo since Jan 12, but it's not in yours (?) so I think windows build will fail. Likewise, commit 1a946e14e in his branch adds compression into to psql \connninfo based on my suggestion, but it's missing in your branch. I've added Daniil as a 2nd author and set back to "waiting on author".