0

Wonder if there is a way to add more details (like the column name, database) to logical replication errors in case of missing columns. I got general log entries like this:

2021年09月16日 14:47:37.149 CDT [32910] ERROR: logical replication target relation "public.users" is missing some replicated columns

I could not find anything related in the documentation. I am trying to detect these kinds of errors to trigger an alert or something like that. The only idea that I have is to watch the logs for entries like the above one. Any idea will be welcome!

asked Sep 16, 2021 at 21:35

1 Answer 1

1

That is obvious: the target table is missing some columns (or they have the wrong name).

The target table must have all the columns from the source table, although the definition of these columns need not to be identical.

This behavior has been improved in PostgreSQL v15.

answered Sep 19, 2021 at 4:38
3
  • Yeah, I know that. The problem is that the error messages do not show the column name so I was wondering if there is a way to show more information in the log like the missing column Commented Sep 20, 2021 at 0:38
  • No, you cannot get more log information - but if that is possible, it would be a nice improvement. Perhaps you could come up with a patch. Commented Sep 20, 2021 at 2:38
  • 1
    Bummer - thanks for your answer @LaurenzAlbe. Looks like there is already a discussion about that improvement: here Commented Sep 20, 2021 at 15:11

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

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

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.