Error during online migration of Postgres single server (v10.23) to flexible server (v16)

Ronny Carlansson 20 Reputation points
2024-03-03T15:54:17.3433333+00:00

I attempted to perform an online migration on one database from a Postgres single server (v10.23) to a flexible server (v16), but encountered an error while reading the WAL logs. The error message states that "pgcopydb failed with unknown errors", and I am unsure how to resolve this issue. The specific error messages from the migration are included below. The migration was successful when done offline. Can anyone provide guidance on how to troubleshoot and fix this error?

Logs from the migration:

2024-03-02 20:27:59 36 ERROR ld_stream.c:1314 Failed to add LSN 2E64/ECF4B90 to the transform queue 
2024-03-02 20:28:26 63 ERROR pgsql.c:1978 [TARGET 2258] ERROR: relation "public.timestamps" does not exist 
2024-03-02 20:28:26 63 ERROR pgsql.c:1978 [TARGET 2258] LINE 1: UPDATE public.Timestamps SET "CreatedDate" = $1, "LatestLogi... 
2024-03-02 20:28:26 63 ERROR pgsql.c:1978 [TARGET 2258] ^ 
2024-03-02 20:28:26 63 ERROR ld_replay.c:93 Failed to read SQL lines from input stream, see above for details 
2024-03-02 20:28:26 35 ERROR follow.c:993 Subprocess catchup with pid 63 has exited with error code 12 
2024-03-02 20:28:27 61 ERROR pgsql.c:1545 Postgres query was interrupted: update pgcopydb.sentinel set startpos = $2, write_lsn = $1, flush_lsn = $2 returning startpos, endpos, apply, write_lsn, flush_lsn, replay_lsn 
2024-03-02 20:28:27 61 ERROR pgsql.c:5366 Failed to fetch pgcopydb.sentinel current values 2024... 
Azure Database Migration service
Azure Database for PostgreSQL
{count} votes

Accepted answer
  1. GeethaThatipatri-MSFT 29,477 Reputation points Microsoft Employee
    2024-03-04T14:28:37.8766667+00:00

    @Ronny Carlansson I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this! Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others ", I'll repost your solution in case you'd like to accept the answer

    Error Message:

    • pgcopydb failed with unknown errors.

    Issue:

    • You are trying to perform an online migration on one database from a Postgres single server (v10.23) to a flexible server (v16), but encountered an error while reading the WAL logs. The error message states that "pgcopydb failed with unknown errors".

    Solution:

    • As you stated you have resolved the issue by enabling quote_all_identifiers, the online migration was successful

    If I missed anything please let me know and I'd be happy to add it to my answer, or feel free to comment below with any additional information.

    Please remember to "Accept Answer" so that others in the community facing similar issues can easily find the solution.

    Regards Geetha

    1 person found this answer helpful.
    0 comments No comments

1 additional answer

Sort by: Most helpful
  1. Ronny Carlansson 20 Reputation points
    2024-03-04T08:30:49.22+00:00

    I've found a solution that works for my issue.

    By enabling quote_all_identifiers, the online migration was successful.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.