Migrate data from local PostgreSQL to cloud-hosted
What is a simple and reliable way to migrate database data from a locally hosted solution to a cloud-hosted where all I have is a way to connect to the DB without access to the raw files themselves? I could simply recreate all tables, indexes, functions, triggers, and then insert all data, but is there a simpler way to just move an exact copy of the data, maybe from a backup file?
Use results from select query as parameter for a where clause in another select query?
This is how it currently works, first select query returns a list of parameters.
One table in the Postgresql DB not syncing with logical replication
I have an issue against which I seek some advise.
I have set up logical replication between two databases. The database was/is syncing perfectly well. However – there is one huge table that started giving error due to FK constraint. I have eliminated the FK constraint error.
After that I was trying to import the rows from the source to the destination. The import was successful. However the replication stopped working.
To fix this I did the following