News for hackers. Stuff that matters.
Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @02:08PM (#27407285)
Glad to see that they are adding features but I wish the pace was faster. We have been using Cloud SQL for Postgres and overall it is good but there are a number of glaring and frustrating feature holes. The two top of mind for me are:

1) No way to force SSL connections without enforcing two-way SSL (which is a huge pain and not supported by all the clients we use). This is literally just a Postgres config option but they don’t expose it. RDS has had this feature since 2016.

2) No in place upgrade. This is again a feature built in to Postgres and RDS has had it for years. Instead the upgrade story for Cloud SQL is cumbersome and involves setting up a new instance, creating and loading backups, etc.

We switched to Cloud SQL from running our own Postgres and it is a huge improvement, but the feature set is disappointing compared to RDS

Re:Logical replication and decoding for Cloud SQL for Postgr... by Diggsey on Saturday June 05, 2021 @04:48PM (#27408345)
Also, if you use Cloud SQL in HA mode, it may still go down randomly for up to 90s with no warning or entry in the operation log, and this is considered expected behaviour.

Here is a direct quote from google support when we contacted them about our database going down outside of our scheduled maintenance window:

> As I mentioned previously remember that the maintenance window is preferred but there are time-sensitive maintenance events that are considered quite important such as this one which is a Live migration. Most maintenance events should be reflected on the operations logs but there are a few other maintenance events such as this one that are more on the infrastructure side that appear transparent to clients because of the nature of the changes made to the Google managed Compute Engine that host the instances, this is a necessary step for maintaining the managed infrastructure. For this reason this maintenance does not appear visible in your logs or on the platform.

Here "transparent to clients" means that the database is completely inaccessible for up to 90s. Furthermore, because there's no entry in the operation log, there's no way to detect if the database is down because of "expected maintenance", or because of some other issue without talking to a human at google support: so really great if you're woken up in the middle of the night because your database is down, and you're trying to figure out what happened...

Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @06:14PM (#27408842)
That’s troubling. In fairness, when I last used RDS (2018) we had 9 databases running and we averaged about one database failover per month, with about 2-3 minutes of downtime per incident. I never got a satisfactory answer from support other than that this was a thing that sometimes happened.
Re:Logical replication and decoding for Cloud SQL for Postgr... by Diggsey on Saturday June 05, 2021 @06:55PM (#27409100)
To be clear: there is no failover happening, even though we do have a failover instance. If there was, we could at least detect that something had happened after the fact!

The Cloud SQL failover only occurs in certain circumstances, and in all our time using Cloud SQL the failover has not once kicked in automatically (despite many outages).

In fact, one of our earliest support issues was that the "manual failover" button was disabled when any sort of operation was occuring on the datbase, making it almost completely useless! Luckily this issue at least was fixed.

Re:Logical replication and decoding for Cloud SQL for Postgr... by kevincox on Saturday June 05, 2021 @09:21PM (#27409901)
It sounds like the machine that the DB VM was running on was being taken offline or restarted for maintenance. The default behaviour for GCE is to live-migrate the VM to another machine. So I guess Cloud SQL uses the default here. (It may well be the best option as failover isn't instant either.) Live migration is usually much faster than 90s at well but if you are making heavy RAM updates that could definitely slow it down.

Either way I agree that some full-stack integration is needed on GCPs part to at least get that into the maitnaince log. It would also be nice to make most of these happen during the maitnaince window but IIUC they don't always have 24h notice of a machine reboot.

Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @07:01PM (#27409137)
Yikes! That is alarming. I also don’t like the part about automated failover not working
Re:Logical replication and decoding for Cloud SQL for Postgr... by eloff on Saturday June 05, 2021 @10:10PM (#27410120)
Live migration is when they move you to another system.

They have to do that when hardware fails (if you're lucky), but that it's happening so often suggests it's part of regular software maintenance or something like that. Which is pretty unacceptable to me.

Re:Logical replication and decoding for Cloud SQL for Postgr... by dilyevsky on Saturday June 05, 2021 @11:10PM (#27410438)
Yes this is regular occurrence on gcp
Re:Logical replication and decoding for Cloud SQL for Postgr... by dajonker on Saturday June 05, 2021 @06:35PM (#27408968)
I could not agree with you more. These are exactly our two complaints about Postgres on Cloud SQL.
Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @07:00PM (#27409130)
Glad to know I am not alone!
Re:Logical replication and decoding for Cloud SQL for Postgr... by dilatedmind on Saturday June 05, 2021 @02:21PM (#27407387)
how significant is 1 if you are using cloud sql proxy? My understanding is that the proxy tunnels traffic over an encrypted connection, so there is no benefit to adding an extra layer.
Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @02:30PM (#27407465)
cloud sql proxy is secure and that is what all our developers use for local access to the database.

However, we have some third party data analysis tools (such as Tableau) that also connect to one of our databases. They are hosted in their own clouds and have to connect over the databases’s public IP address and can’t use cloud_sql_proxy. I of course manually confirmed that these connections use SSL but I would feel much more comfortable if I could enforce it from our end.

Re:Logical replication and decoding for Cloud SQL for Postgr... by vira28 on Sunday June 06, 2021 @04:03AM (#27411560)
I am wondering why no in place upgrade? Are they concerned by doing “—-link” there may be data corruption and irrecoverable?
Re:Logical replication and decoding for Cloud SQL for Postgr... by koolba on Saturday June 05, 2021 @07:15PM (#27409210)
What is two way SSL? Do you mean client certificate authentication?
Re:Logical replication and decoding for Cloud SQL for Postgr... by jacobkg on Saturday June 05, 2021 @07:23PM (#27409260)
Yup