Re: Move pg_attribute.attcompression to earlier in struct for reduced size?

From: Michael Paquier <michael(at)paquier(dot)xyz>
To: Dilip Kumar <dilipbalaut(at)gmail(dot)com>
Cc: Andres Freund <andres(at)anarazel(dot)de>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>, Robert Haas <robertmhaas(at)gmail(dot)com>
Subject: Re: Move pg_attribute.attcompression to earlier in struct for reduced size?
Date: 2021-05-25 05:46:27
Message-ID: YKyPM6UC+tBHEuxo@paquier.xyz
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Mon, May 24, 2021 at 02:46:11PM +0530, Dilip Kumar wrote:
> Like this.
> if (TupleDescAttr(newTupDesc, i)->attisdropped)
> isnull[i] = true;
> else
> tup_values[i] = values[i];

That would work. Your suggestion, as I understood it first, makes the
code simpler by not using tup_values at all as the set of values[] is
filled when the values and nulls are extracted. So I have gone with
this simplification, and applied the patch (moved a bit the comments
while on it).
--
Michael

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bharath Rupireddy 2021-05-25 05:49:08 Re: Skipping logical replication transactions on subscriber side
Previous Message Michael Paquier 2021-05-25 05:34:15 Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options