フォロー

When you perform logical replication with Mastodon, you need to set the REPLICA IDENTITY for tables that do not have an ID set.

ALTER TABLE accounts_tags REPLICA IDENTITY FULL;
ALTER TABLE statuses_tags REPLICA IDENTITY FULL;
ALTER TABLE preview_cards_statuses REPLICA IDENTITY FULL;

Also, logical replication does not replicate the sequence. If you add a record to a new database without changing its ID, it will be set to the primary key already in use, and the addition will fail.

To avoid duplication, reset the sequence to the maximum value of the current primary key. The following articles may be helpful
qiita.com/unarist/items/1ef370

I wonder if not giving those tables a pkey was a mistake on my part. I wanted to save space since they are join tables...

ログインして会話に参加
Fedibird

様々な目的に使える、日本の汎用マストドンサーバーです。安定した利用環境と、多数の独自機能を提供しています。