| From: | jian he <jian(dot)universality(at)gmail(dot)com> |
|---|---|
| To: | lakshmi <lakshmigcdac(at)gmail(dot)com> |
| Cc: | pgsql-hackers <pgsql-hackers(at)postgresql(dot)org> |
| Subject: | Re: create table like including storage parameter |
| Date: | 2026-09-29 00:00:00 |
| Message-ID: | CACJufxG4w4hdM6Bu3pZNV2nOGbjMYiCmAN=zfh0BeGK-Dg7hvA@mail.gmail.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-hackers |
On Tue, Apr 28, 2026 at 3:24 PM lakshmi <lakshmigcdac(at)gmail(dot)com> wrote:
>
> Hi all,
>
> I tested the patch on current HEAD.
>
> INCLUDING PARAMETERS works as expected. It correctly copies storage parameters. Duplicate parameters raise an error, and existing LIKE behavior remains unchanged.
>
> When used with a VIEW, parameters are ignored (since they are not valid for tables), and the command completes without error.
>
> Overall, the feature looks good from my testing. It might be worth documenting the behavior for VIEWs.
>
CREATE TABLE t (a int) WITH (fillfactor = 70);
CREATE TABLE p (LIKE t INCLUDING ALL) PARTITION BY LIST (a);
ERROR: 42809: cannot specify storage parameters for a partitioned table
HINT: Specify storage parameters for its leaf partitions instead.
LOCATION: partitioned_table_reloptions, reloptions.c:2350
The abvove ERROR seems not necessary.
So I made the CREATE TABLE (...) PARTITION BY ignore the PARAMETERS option.
| Attachment | Content-Type | Size |
|---|---|---|
| v10-0001-Add-INCLUDING-PARAMETERS-to-CREATE-TABLE-LIKE.patch | text/x-patch | 19.4 KB |
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Sami Imseih | 2026-09-29 00:12:46 | Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers |
| Previous Message | Masahiko Sawada | 2026-09-28 23:48:59 | Re: parallel autovacuum: Propagate track_cost_delay_timing to parallel workers |