I have two partitioned tables, let's say a and b. They have UUIDv7 (timestamped) id columns. I am using a join-key structure, ensuring the foreign key relation doesn't require extra indexes. These are pretty high-volume event tables, where timestamp range queries and id based queries are the main form of read traffic.
CREATE TABLE public.a (
id uuid NOT NULL,
CONSTRAINT "PK_a" PRIMARY KEY (id)
)
PARTITION BY RANGE (id);
CREATE TABLE public.b (
parent_id uuid NOT NULL,
object_number int2 NOT NULL,
CONSTRAINT "PK_b" PRIMARY KEY (parent_id, object_number)
)
PARTITION BY RANGE (parent_id);
The problem comes in here. This query (range query with uuidv7) generat

