Postgresql – reason I should not set the default data location to google drive when setting up PostgreSQL

configurationpostgispostgresql

I'm brand new to working with databases and am setting up a PostgreSQL database which will be used for personal projects. I'm setting it up with the postgis extension and will use both for some basic geospatial projects. I use the google drive back up and sync utility on my mac and use my google drive directory for everything. I'm not too worried about storage capacity on either my local disk or my google drive. When installing postgresql, I'm required to specify the install locations for both PostgreSQL and PostgreSQL data. Is there any reason I wouldn't want to set at least the data location on google drive? What about putting the whole install in that directory? Many thanks in advance

Don't know if it matters at all but I'm running mac os x 10.13

Best Answer

There are two good reasons not to use Google drive for your data directory: data integrity and performance.

The second is obvious because of the latency.

For the first: Google drive is a file server. I am sure that it does not offer the guarantees required by a relational database, particularly that you can reliably sync data to disk. Even a Windows file share does not offer these guarantees.