Re: create table like including storage parameter

From: jian he <jian(dot)universality(at)gmail(dot)com>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: lakshmi <lakshmigcdac(at)gmail(dot)com>, pgsql-hackers <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: create table like including storage parameter
Date: 2026-10-12 14:02:18
Message-ID: CACJufxF5ivkQnGtTruK6GfpvLMHy=NH-YMATPqEhdVtu7k6qkQ@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Tue, Oct 6, 2026 at 3:52 PM Fujii Masao <masao(dot)fujii(at)gmail(dot)com> wrote:
>
> So, if two source tables both set fillfactor, wouldn't
>
> CREATE TABLE ... (LIKE t1 INCLUDING ALL, LIKE t2 INCLUDING ALL)
>
> fail with this patch even though it succeeds today? I'm concerned that this
> could be a backward compatibility issue.
>

Hi.

CREATE TABLE LIKE is not guaranteed to be error-free.
For example, the following will fail:

create table t(a int);
create table t1(a int);
CREATE TABLE t2 (LIKE t INCLUDING ALL, LIKE t1 INCLUDING ALL);

I think this failure is not different from the fillfactor one: certain
conditions have to be met, otherwise CREATE TABLE ... LIKE fails.

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message John Naylor 2026-10-12 14:02:54 Re: a large LIMIT makes some sorts slower
Previous Message Daria Lepikhova 2026-10-12 14:01:39 Re: Incremental backups report progress as if they were full backups