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

From: Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
To: Roman Khapov <rkhapov(at)yandex-team(dot)ru>
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 00:47:09
Message-ID: CAHGQGwEWLET2hYF=JMBs-JuDrFg-U-67+USTkNMGpDvOxTcing@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Sat, Oct 31, 2026 at 7:58 PM Roman Khapov <rkhapov(at)yandex-team(dot)ru> wrote:
> So the attached patch keeps PERMANENT, when partitioning is in use, for
> exactly two tables: pgbench_accounts and pgbench_branches.

Thanks for the report and patch!

Users who specify --unlogged-tables would expect all data tables to be
unlogged, so keeping pgbench_branches logged seems undesirable to me.

When using --partitions, --unlogged-tables, and --foreign-keys together,
users would expect partitioned accounts, unlogged data tables,
and working foreign keys, as documented. 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?

Regards,

--
Fujii Masao

In response to

Browse pgsql-hackers by date

  From Date Subject
Previous Message Ayoub Kazar 2026-11-02 00:44:44 Re: Hash a ScalarArrayOpExpr whose array is fixed for one execution