Hi Andres. Thank you very much for your help. I tried the following solution and I have some problems.
* I have 9.6 postgres and I do not have separate field for rd_pkindex * All I have is rd_replidindex field. Usually (when REPLICA IDENTITY is NOT FULL), it still contains the primary key * But in the case of REPLICA IDENTITY FULL - rd_replidindex is NULL and rd_pkindex does not exist So, is there a way to get the primary key on 9.6 postgres? > If you want the pkey, that's in rd_pkindex. rd_replidindex will only > differ if the identity is manually set to another candidate key > (possibly because there's no pkey). >