https://www.postgresql.org/docs/current/indexes-multicolumn....
Also worth noting that for very complex workloads that need to support arbitrary subsets of equality matches over columns, a Bloom filter might work best:
https://www.postgresql.org/docs/current/bloom.html