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

From: Zsolt Parragi <zsolt(dot)parragi(at)percona(dot)com>
To: Roman Khapov <rkhapov(at)yandex-team(dot)ru>
Cc: pgsql-hackers(at)lists(dot)postgresql(dot)org, Fujii Masao <masao(dot)fujii(at)gmail(dot)com>
Subject: Re: pgbench --unlogged-tables silently ignored for branches/tellers/history when --partitions is used
Date: 2026-11-03 08:01:08
Message-ID: CAN4CZFMxQ09nH=yJxfa0GJZ=uia3q-q0zj=fZNcseg2p_83D-Q@mail.gmail.com
Views: Whole Thread | Raw Message | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Hello!

I also sent a patch for this in [1].

But I think the issue is more than this, as I described there,
currently the following snippet works, and I don't think it should,
even outside pgbench:

CREATE TABLE pk (a int PRIMARY KEY) PARTITION BY RANGE (a);
CREATE UNLOGGED TABLE pk1 PARTITION OF pk FOR VALUES FROM (0) TO (100);
CREATE TABLE fk (x int REFERENCES pk);

There in 0002 I fixed this by adding additional check to the last
create table statement, preventing fk from being created, but now
reading e2bab2d7920 properly we might have to revise that and
completely prevent the creation of an unlogged partition itself in
this case.

[1]: https://www.postgresql.org/message-id/CAN4CZFMsEnA0TbYLHjicUn4MTjsJthCOmNvpWoTJb4_sm4F-aA%40mail.gmail.com

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Peter Smith 2026-11-03 08:02:24 Re: PSQL - improve tab completion for pub/sub options
Previous Message Chao Li 2026-11-03 07:59:42 Re: Assertion failure when importing expression statistics with nested JSON values