Hi,

I found that pg_rewind with --write-recovery-conf option doesn't write
the dbname to an auto-generated primary_conninfo value. Therefore,
after a failover, the old primary cannot start if it's rewound by
pg_rewind with --write-recovery-conf option if sync_replication_slots
is on. Is it an oversight in commit a145f424d5? I could not see any
discussion in the thread[1] about whether we need to support adding
the dbname to the primary_conninfo value generated by pg_rewind.

I think it's a good idea to support it at least on HEAD. I've attached
a patch for that.

Regards,

[1] 
https://www.postgresql.org/message-id/CAB8KJ%3DhdKdg%2BUeXhReeHpHA6N6v3e0qFF%2BZsPFHk9_ThWKf%3D2A%40mail.gmail.com

-- 
Masahiko Sawada
Amazon Web Services: https://aws.amazon.com

Attachment: v1-0001-pg_rewind-Add-dbname-to-primary_connifo-with-writ.patch
Description: Binary data

Reply via email to