pg.ddx.io  pgsql-hackers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Alvaro Herrera <alvherre@alvh.no-ip.org>
To: Michael Paquier <michael@paquier.xyz>
Cc: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Robert Haas <robertmhaas@gmail.com>
Cc: Dilip Kumar <dilipbalaut@gmail.com>
Cc: Andres Freund <andres@anarazel.de>
Cc: pgsql-hackers <pgsql-hackers@postgresql.org>
Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Date: Tue, 8 Jun 2021 10:39:24 -0400
Message-ID: <202106081439.m2pwwk5yvcrd@alvherre.pgsql> (raw)
In-Reply-To: <YLw797TlZxbB0QHU@paquier.xyz>

On 2021-Jun-06, Michael Paquier wrote:

> On Fri, Jun 04, 2021 at 07:21:11PM -0400, Alvaro Herrera wrote:

> The test has been done with four configurations, and here are the
> results:
> 1) HEAD: 9659ms
> 2) REL_13_STABLE: 8310ms.
> 3) Alvaro's patch, as of
> https://postgr.es/m/202106042321.6jx54yliy2l6@alvherre.pgsql: 9521ms.
> 4) My patch applied on HEAD, as of
> https://postgr.es/m/YLm5I9MCGz4SnPdX@paquier.xyz: 8304ms.

Hmm, ok.  Trying to figure out what is happening would require more time
than I can devote to this at present.

My unverified guess is that this code causes too many pipeline stalls
while executing the big per-column loop.  Maybe it would be better to
scan the attribute array twice: one to collect all data from
Form_pg_attribute for each column into nicely packed arrays, then in a
second loop process all the recompressions together ... the idea being
that the first loop can run without stalling.

Maybe at this point reverting is the only solution.

-- 
Álvaro Herrera                            39°49'30"S 73°17'W
"Oh, great altar of passive entertainment, bestow upon me thy discordant images
at such speed as to render linear thought impossible" (Calvin a la TV)





view thread (73+ messages)  latest in thread

Message-ID: <202106081439.m2pwwk5yvcrd@alvherre.pgsql>
Permalink:  ../202106081439.m2pwwk5yvcrd@alvherre.pgsql/
Also on:    postgresql.org/message-id/202106081439.m2pwwk5yvcrd@alvherre.pgsql

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-hackers@postgresql.org
  Cc: alvherre@alvh.no-ip.org, michael@paquier.xyz, tgl@sss.pgh.pa.us, robertmhaas@gmail.com, dilipbalaut@gmail.com, andres@anarazel.de
  Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
  In-Reply-To: <202106081439.m2pwwk5yvcrd@alvherre.pgsql>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox