Datatype mismatch warning in logical replication when creating subscription

Started by BharatDBover 1 year ago1 messagesbugs

Thread notes

1 note#feature#minor#enhancement
hackorum-bot#feature#minor#enhancement
hackorum-bot
1 day ago

@global #feature #minor #enhancement

#feature#minor#enhancement
Jump to latest
#1BharatDB
bharatdbpg@gmail.com

Hi ,

I’ve been exploring logical replication and noticed that if the column
datatypes don’t match between the publisher and subscriber, PostgreSQL
doesn’t give a warning. This can cause unexpected behavior, and I thought
it might be helpful to alert users when this happens.

**What This Patch Does:**

- Adds a warning when a column's datatype in the subscriber doesn’t match
the publisher.

- Helps users catch issues early instead of running into silent errors

Show quoted text

later.

Why I Think It’s Useful:- Avoids confusion when replication doesn’t
work as expected. - Makes debugging easier by pointing out potential
problems. I’d love to get feedback on whether this is a good
idea and if I’ve approached it correctly. Since I’m still learning, any
suggestions for improvement would be really helpful. I’ve attached the
patch—please let me know what you think!

Thanks, Blessy

Attachments:

t73025_1
Datatype_mismatch_logicalreplication_.patchtext/x-patch; charset=US-ASCII; name=Datatype_mismatch_logicalreplication_.patchDownload+28-1