---
title: "Approaches for vertically scaling Postgres"
publication: "Postgres Weekly"
issue: 297
published_at: "2019-03-20"
canonical_url: "https://postgresweekly.com/issues/297"
---

The latest Postgres news, articles, tools, and projects.       

#297 — March 20, 2019 

[Read on the Web](https://postgresweekly.com/issues/297)   

Postgres Weekly 

[![\](https://res.cloudinary.com/cpress/image/upload/w_1280,e_sharpen:60/kodl8cm0uhix6qto8ih0.jpg)](https://azure.microsoft.com/en-us/blog/azure-data-studio-an-open-source-gui-editor-for-postgres/)   

[Azure Data Studio: Now an Open Source GUI Tool for Postgres Too](https://azure.microsoft.com/en-us/blog/azure-data-studio-an-open-source-gui-editor-for-postgres/) — Postgres’s own `psql` command line client is fantastic, but some people much prefer a graphical tool and Microsoft’s _Azure Data Studio_ now has preview-level support for Postgres. They’ve also released similar tools in [an extension for VS Code](https://github.com/Microsoft/vscode-postgresql). 

Rachel Agyemang (Microsoft)   [![\](https://copm.s3.amazonaws.com/e3a3cff1.png)](https://resources.2ndquadrant.com/postgres-bdr-trial) 

[Sign Up for the Postgres-BDR 60-Day Trial](https://resources.2ndquadrant.com/postgres-bdr-trial) — As the most powerful tool for multi-master replication, Postgres-BDR significantly reduces the impact of a master failure and minimizes risk of data loss. BDR provides up to five 9s of availability, Point-In-Time Recovery, Rolling Upgrades, and more. 

2ndQuadrant PostgreSQL Products sponsor   

[Vertically Scaling PostgreSQL](https://pgdash.io/blog/scaling-postgres.html) — Postgres is very receptive to making use of extra resources (CPU, memory, disk, etc.) but it’s not all automatic and sometimes tweaks are necessary. Of course, if you want some _horizontal_ scaling for Postgres, check out [Citus](https://github.com/citusdata/citus). 

RapidLoop   

[postgresqltuner.pl: A Simple Script to Get Tuning Advice](https://github.com/jfcoz/postgresqltuner) — A script that analyzes your Postgres database configuration and provides tuning advice. 

Julien Francoz   

[Performance Tuning Foreign Data Wrappers](https://www.cybertec-postgresql.com/en/foreign-data-wrapper-for-postgresql-performance-tuning/) — [postgres_fdw](https://www.postgresql.org/docs/current/postgres-fdw.html) has some hidden tuning options that are not widely known by users. 

Hans-Jürgen Schönig   

[How to Replicate Postgres Data to Remote Sites](https://severalnines.com/blog/how-replicate-postgresql-data-remote-sites) — Compares Slony, Bucardo, logical replication, and FDWs. 

Venkata Nagothi   

▶[How to Manage & Automate PostgreSQL](https://severalnines.com/resources/webinars/how-automate-manage-postgresql-clustercontrol?utm_campaign=Choosing_MySQL_HA_Campaign_MAR18&utm_content=pgweekly&utm_medium=Email&utm_source=Link_Click) — Watch the free replay of our recent webinar on the power of automation for PostgreSQL. 

Severalnines sponsor   

[Fun with SQL: Text and System Functions](https://www.citusdata.com/blog/2019/03/13/fun-with-sql-text-functions/) — Mostly a look at Postgres’s `position` function along with some other helpful, related functions. 

Craig Kerstiens   

[Performing a PostgreSQL Upgrade using `pg_dumpall`](https://www.percona.com/blog/2019/03/18/postgresql-upgrade-using-pg_dumpall/) — A look at one of several approaches for when upgrading Postgres. `pg_dumpall` is well suited for clusters and is relatively straightforward, although it’s not ideal for particularly large databases. 

Avinash Vallarapu       supported by [![\](https://res.cloudinary.com/cpress/image/upload/v1550658302/ssp14mc8qlwujweclhaz.png)](https://www.citusdata.com/?utm_source=PG_Weekly&utm_medium=email&utm_campaign=sponsor_blog)  

💡 Tip of the Week 

Using `\watch` in `psql`
(This is truly one of those _"you either know it, or you don't"_ tips!)  

Postgres's `psql` client comes with a lot of [meta-commands](https://www.postgresql.org/docs/10/app-psql.html#APP-PSQL-META-COMMANDS) to help you navigate your databases and perform various administrative functions. A particularly interesting one is `\watch`. 

At its simplest, `\watch` runs the last run query (from psql's query buffer) every 2 seconds. If you specific an argument, in seconds, it'll run the query every X seconds instead: `\watch 1` for every second, say. Use CTRL+C to break the loop. 

One place this could be useful is if you want to always see what the last added user to your app is. For example:  

SELECT * FROM users ORDER BY created_at DESC LIMIT 1; \watch 30   

Another interesting use for this could be to monitor all of the currently running queries on your Postgres server (naturally only those running at 1 second intervals would be tracked by this):  

SELECT datname, usename, query FROM pg_stat_activity; \watch   

This week's tip is sponsored by the database team at [Citus Data](https://www.citusdata.com/?utm_source=PG_Weekly&utm_medium=email&utm_campaign=sponsor_blog), now part of the Microsoft family. Learn more about how Citus scales out Postgres on the [Citus Data blog](https://www.citusdata.com/blog/?utm_source=PG_Weekly&utm_medium=email&utm_campaign=sponsor_blog).       

🗓 **Upcoming Postgres Events** 

- [pgconf.de 2019 (May 10 in Leipzig, Germany)](https://2019.pgconf.de/) — The latest edition of the highly successful German-speaking PostgreSQL conference.
- [PGDay.IT 2019 (May 16 in Bologna, Italy)](https://2019.pgday.it/en/)
- [PGCon 2019 (May 28 in Ottawa, Canada)](https://www.pgcon.org/2019/) — An annual conference for users and developers to meet and discuss all things Postgres.
- [Postgres Vision 2019 (June 24 in Boston, MA)](https://postgresvision.com/)          

Curated by [Cooperpress](https://cooperpress.com/) and [Craig Kerstiens](https://twitter.com/craigkerstiens) 

[Change your email address](https://postgresweekly.com/edit_subscription/*|UID|*) or[Stop getting this newsletter](https://postgresweekly.com/leave/*|UID|*) 

© Cooper Press Ltd · Fairfield Enterprise Centre, Louth, LN11 0LS, United Kingdom
