Re: table inheritance versus column compression and storage settings

From: Ashutosh Bapat <ashutosh(dot)bapat(dot)oss(at)gmail(dot)com>
To: Peter Eisentraut <peter(at)eisentraut(dot)org>, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: table inheritance versus column compression and storage settings
Date: 2024-03-07 16:54:26
Message-ID: CAExHW5s4YiD1kZDvJ6oTZ7ZRJNru-t8Zmx4Yos+ynSNcHbXz1w@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi Peter and Tom,

> On Tue, Feb 20, 2024 at 3:51 PM Peter Eisentraut <peter(at)eisentraut(dot)org>
> wrote:
> > >
> > > I have reverted the patch for now (and re-opened the commitfest entry).
> > > We should continue to work on this and see if we can at least try to
> get
> > > the pg_dump test coverage suitable.
> > >
> >
>

The pg_dump problems arise because we throw an error when parents have
conflicting compression and storage properties. The patch that got
reverted, changed this slightly by allowing a child to override parent's
properties even when they conflict. It still threw an error when child
didn't override and parents conflicted. I guess, MergeAttributes() raises
error when it encounters parents with conflicting properties because it can
not decide which of the conflicting properties the child should inherit.
Instead it could just set the DEFAULT properties when parent properties
conflict but child doesn't override. Thus when compression conflicts,
child's compression would be set to default and when storage conflicts it
will be set to the type's default storage. Child's properties when
specified explicitly would override always. This will solve all the pg_dump
bugs we saw with the reverted patch and also existing bug I reported
earlier.

This change would break backward compatibility but I don't think anybody
would rely on error being thrown when parent properties conflict.

What do you think?

--
Best Wishes,
Ashutosh Bapat

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Nathan Bossart 2024-03-07 17:01:01 Re: autovectorize page checksum code included elsewhere
Previous Message Nathan Bossart 2024-03-07 16:50:00 Re: un-revert the MAINTAIN privilege and the pg_maintain predefined role