apecloud / myduckserver

MySQL & Postgres Analytics, Reimagined
184 stars 8 forks source link

feat: add initial support for postgresql replication #141

Closed fanyang01 closed 1 week ago

fanyang01 commented 1 week ago

This PR enables MyDuckServer to function as a standby server in PostgreSQL logical replication. The implementation is adapted from Doltgres and modified to work with the DuckDB backend.

To facilitate the Doltgres test cases, frontend support for prepared statements has also been added.

During local testing, I encountered some nondeterministic replication failures. By adjusting the wal_sender_timeout and max_wal_senders parameters, the success rate improved significantly. However, the root cause of these failures remains unidentified and will be addressed in a future update.

Ref: #119
Resolves #123