-
-
Notifications
You must be signed in to change notification settings - Fork 152
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Set up postgresql on new server #955
Comments
OK, I've read enough scary things about running postgresql in docker on prod to not do that. Hence, this is just about getting basic replication going for the moment. |
The new server has the DB folder mounted at Did it, and confirmed with:
|
Just updated pg_hba.conf to copy the old CL server but to ensure that all connections use SSL as in #903. |
Used vimdiff to diff the old settings file with the new. Should be nice and beefy now. |
Connection is confirmed from the remote server. Now onwards to replication. |
OK, as usual this got a little tricky around connections, but the sync is now in progress. The issue this time is that:
Fun stuff as always. |
OK, so this created some progress, with the new DB powering the API today, but we still had some downtime due to the normal DB being over burdened. We need to switch to the new server as our main DB. Process:
Remaining to do:
|
Note that replicating to original DB and then to the AWS DB is turning out to be a good problem because it ensures that there are no issues replicating before values get to the AWS DB. The table that's currently giving the most trouble is
I think this error is currently localized only to this table and I think it happened because the table somehow got cache values on the original DB after the subscription was torn down, but I'm not entirely sure. In any case, since it's just a cache table of views, with about 300 entries, I nuked it:
|
Since we have issue #1115, I'm closing this one. That one can take the lead. |
This should be fairly routine. The first idea is to set it up as a secondary read replica. With that done, we'll see how performance improves. If it's all good, we'll swap over to using this DB as the read/write replica.
One question is whether this should be dockerized. Unsure for the moment. I suspect not.
The text was updated successfully, but these errors were encountered: