0

I have a table in production whose structure I want to modify. I can ALTER the table to add column but the column gets added at the end, may be the order may not matter. But at least visually I see it as the last column. The table was created at the last release and it was empty. So, I thought of dropping it & re-creating it in my flyway script. But it led to build failure as the database replication is on in production. How to deal with it? Database is PostgreSQL. At this point of time, I do not have information about scheme of replication as the production environment is with client.

5
  • 1
    Are you using Physical Replication or Logical Replication?
    – Sahap Asci
    Commented Sep 28 at 17:27
  • @SahapAsci I will ask the DBA & get back to you Commented Sep 28 at 17:37
  • @SahapAsci What if it is logical replication? Commented Sep 28 at 17:59
  • @SahapAsci it is a logical replication. If in subscriber we drop replicated table & recreate will it do? Commented Sep 28 at 20:08
  • 2
    If it is logical replication, you will have to add the new table to the publication and refresh the publication on the subscriber. Commented Sep 29 at 5:13

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Browse other questions tagged or ask your own question.