Startup SQL interactions with replication. #1576
Description
Should startup SQL commands be replicated or not?
Currently, some SQL commands are just run on startup no matter what node you're on. Suppose the startup SQL included create table foo (a int)
, for example.
A. If the startup SQL is replicated, then the current implementation forces the following constraint: every replica must be brought up and ready before the primary is brought up. But this can be fixed (thanks @jrolli) if we take the time to implement a "give me my missing logs, my last log was X" feature.
B. If the startup SQL is not replicated, then weird things may happen if you refer to tables created by the startup process since the replica's RecoveryManager may be missing the oid mapping (haven't checked this).
I am inclined to say that we should go with A. But it is something to watch out for.