Skip to content

Add TRUNCATE callback for decoder_raw extension #54

@kaigai

Description

@kaigai

The attached patch adds TRUNCATE callback for the decoder_raw extension.
Please check it, and merge the feature if valuable.
I think the patch itself is obvious.

My motivation is ....
We had a big database upgrade project (v17 -> v18) that involves more than 100k tables and 25TB storage.
It is too large for pg_dump/pg_restore, so we used pg_upgrade and pg_recvlogical with raw_decoder, to save
the logical update logs at the production system during pg_upgrade at the cloned database instance on EC2.

However, it didn't work because some batch queries used TRUNCATE command, and it leads primary-key
conflicts on some tables when we applies the generates SQL files on the cloned database instance.
So, we need to support TRUNCATE command here.

decoder_raw-add-truncate.v1.patch

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions