Re: pgbench --unlogged-tables silently ignored for branches/tellers/history when --partitions is used

From: Roman Khapov <rkhapov(at)yandex-team(dot)ru>
To: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Cc: PostgreSQL Hackers <pgsql-hackers(at)lists(dot)postgresql(dot)org>, michael(at)paquier(dot)xyz, reshkekirill(at)gmail(dot)com
Subject: Re: pgbench --unlogged-tables silently ignored for branches/tellers/history when --partitions is used
Date: 2026-11-02 09:11:53
Message-ID: AB4E7D67-4D01-43E1-B80C-9D1A22998F6D@yandex-team.ru
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hi! Thanks for review!

> So, isn't it better to keep
> all data tables unlogged and define the foreign key from each accounts
> partition to pgbench_branches instead of from the partitioned parent?
>

Yes, it is... There is no point in keeping the patch simpler at the
cost of the option's meaning, so I did V2 that does:
- keep the PERMANENT exception for pgbench_accounts only: it cannot
be unlogged when partitioned
- accounts -> branches FKs are now created on the partitions
(pgbench_accounts_%) if the unlogged option is on and there are
partitions

--
Best regards,
Roman Khapov

Attachment Content-Type Size
v2-0001-pgbench-honor-unlogged-tables-for-non-partitioned.patch application/octet-stream 3.6 KB

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Fujii Masao 2026-11-02 09:21:05 Re: Incremental backup accepts a prior backup that extends past a timeline switch
Previous Message Kirill Reshke 2026-11-02 09:01:38 Honor inherited ownership when finishing prepared transactions