From: | Michael Paquier <michael(at)paquier(dot)xyz> |
---|---|
To: | Alvaro Herrera <alvherre(at)alvh(dot)no-ip(dot)org> |
Cc: | Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, Robert Haas <robertmhaas(at)gmail(dot)com>, Dilip Kumar <dilipbalaut(at)gmail(dot)com>, Andres Freund <andres(at)anarazel(dot)de>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: Move pg_attribute.attcompression to earlier in struct for reduced size? |
Date: | 2021-06-09 03:24:57 |
Message-ID: | YMA0iRYL49kdCCZu@paquier.xyz |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Tue, Jun 08, 2021 at 10:39:24AM -0400, Alvaro Herrera wrote:
> 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.
You mean for attlen and attcompression, right? I agree that it would
help.
A extra set of things worth it here would be to move the allocation
and memset(0) of values_free from reform_and_rewrite_tuple(), and do
the round of pfree() calls if at least one value has been detoasted.
> Maybe at this point reverting is the only solution.
That's a safe bet at this point. It would be good to conclude this
one by beta2 IMO.
--
Michael
From | Date | Subject | |
---|---|---|---|
Next Message | Tom Lane | 2021-06-09 03:32:21 | Re: Move pg_attribute.attcompression to earlier in struct for reduced size? |
Previous Message | Thomas Munro | 2021-06-09 03:21:36 | Re: Adjust pg_regress output for new long test names |