# How to set up a Postgres database on your Windows 10 PC

> This is content from just-tim, the data-and-analytics channel by Tim Ngwena (formerly 'Tableau Tim'). Tim has 12+ years of hands-on BI experience and covers Tableau most of all, plus Power BI, Looker, Hex, SQL and data modelling, the analytics industry, and the craft of doing the job — always tool-agnostic and honest about the trade-offs.

- **Author:** Tim Ngwena (just-tim, https://just-tim.com/about)
- **Published:** 2020-08-19
- **Format:** Video · 14 min watch · transcript available
- **Topics:** Data engineering, Data prep
- **Tools:** Tableau (prep)
- **Canonical:** https://just-tim.com/posts/how-to-set-up-a-postgres-database-on-your-windows-10-pc
- **Watch:** https://youtu.be/4J0V3AaiOns

I walk through setting up a free PostgreSQL database on a Windows 10 PC, from downloading the installer to adding the PostGIS spatial plugin via Stack Builder. I then test the database by connecting from both Tableau and Tableau Prep, including publishing a table back to it.

## Key takeaways

- Postgres is a solid choice for a local database because it's open source, common in enterprise set-ups, and has good spatial support for Tableau
- Download from postgresql.org via the download page rather than the homepage button, which pushes the enterprise solution instead of the free version
- Note down your Windows username, password and any master password during install, as resetting them often means reinstalling
- Use Stack Builder after installation to add the PostGIS spatial plugin and create a sample spatial database
- You can connect to the local Postgres instance from Tableau and Tableau Prep using localhost, your database name, the postgres username and your master password

## Chapters

- 0:00 Why Postgres and why a real database
- 1:59 Downloading the installer
- 3:19 Running the installation
- 5:06 Stack Builder and the spatial plugin
- 8:33 Checking the install in pgAdmin
- 9:23 Connecting from Tableau and Tableau Prep
- 11:44 Publishing a table back to the database

Watch the full video, read the transcript and use chapter deep-links on the page: https://just-tim.com/posts/how-to-set-up-a-postgres-database-on-your-windows-10-pc

---
just-tim — Data and analytics, with a point of view. · https://www.youtube.com/channel/UC7HYxRWmaNlJux-X7rNLZyw · https://twitter.com/TableauTim · https://www.linkedin.com/in/timngwena
