I am using PostgreSQL Logical Replication to replicate data from multiple source databases into single one for analytical purposes.
Data from the source database have the same schema and therefore primary keys can overlap.
Is there any way to add an additional column with predefined value per subscription participating into primary key of the destination in order to be able to dinstinct between the records of each source?
Is this possible using triggers, and how?