4 ms·
I like the idea of such a guide, but the resources currently there can be picked up by someone in less than a day of using postgres. It is a good start however
by lqdc13 11y ago
I like the idea of such a guide, but the resources currently there can be picked up by someone in less than a day of using postgres. It is a good start however as it covers the basics well except for installation/setup. I think that section needs to include setting up postgres database data in a different partition than the one where the DB itself is installed as well as setting up clusters.
Also it lacks certain information that is really helpful particularly when dealing with Postgres. An example is this: http://blog.jonanin.com/2013/11/20/postgresql-char-varchar/ http://blog.jonanin.com/2013/11/20/postgresql-char-varchar/
The harder things that I've had trouble with are not covered. They include escaping JSON correctly when dumping the database to CSV, stored procedures, setting up a cluster, automated backups, fallover DBs and recovering from a crash with minimal downtime.
- illumen 11y agoYes, it would be lovely if there was a guide for those topics you mentioned.
- chucky_z 11y agoI'm going to restrict myself to official documentation here as much as possible.... How to dump things to any file the correct way using the postgres COPY command: http://www.postgresql.org/docs/9.4/static/sql-copy.html http://www.postgresql.org/docs/9.4/static/sql-copy.html Stored procedures: http://www.postgresql.org/docs/9.4/static/plpgsql.html http://www.postgresql.org/docs/9.4/static/plpgsql.html (ok, this one is a bit big... but PL/pgSQL is damn powerful) Clustering is a topic that lives outside PostgreSQL, there are some helpful posts on the wiki though: https://wiki.postgresql.org/wiki/Replication,_Clustering,_and_Connection_Pooling#Clustering https://wiki.postgresql.org/wiki/Replication,_Clustering,_an... https://wiki.postgresql.org/wiki/Clustering https://wiki.postgresql.org/wiki/Clustering Failover: http://www.postgresql.org/docs/9.4/static/warm-standby-failover.html http://www.postgresql.org/docs/9.4/static/warm-standby-failo... ( You should really read all of this though: http://www.postgresql.org/docs/9.4/static/high-availability.html http://www.postgresql.org/docs/9.4/static/high-availability.... ) Recovering from a crash: This is a difficult topic. There isn't a great single page in the documentation, but essentially it just replays x-logs (from what I remember last, this may have changed), and if you lose them, there are a number of options. pg_restore from a backup, use this: http://www.postgresql.org/docs/9.2/static/runtime-config-developer.html#GUC-ZERO-DAMAGED-PAGES.. http://www.postgresql.org/docs/9.2/static/runtime-config-dev.... the list is pretty long for options.