Postgres 12: Are there performance differences between PRIMARY KEY(A, B) and PRIMARY KEY (B, A) on a table PARTITION BY (A)?
No, that will make no difference; the order of the columns in the index doesn't matter if both columns are compared with = in the WHERE condition (of course only if there is AND between the conditions).

The index will be scanned using both columns at the same time, and all that matters is the number of index entries that match the condition, which will be the same in both cases:

  a  |  b           b  |  a
-----+-----       -----+-----
   1 |  -1          -1 |   1
   1 |   1  &lt;---    -1 |   2
   1 |   1  &lt;---     1 |   1
   1 |   2           1 |   1  &lt;---
   2 |  -1           1 |   2  &lt;---
   2 |   1           2 |   1
   2 |   3           2 |   3

index on (a,b)   index on (b,a)