{"componentChunkName":"component---src-templates-post-template-js","path":"/posts/resetting-your-postgres-database/","result":{"data":{"markdownRemark":{"id":"f12704b2-a37b-5d3f-bd3f-af1301a5290b","html":"<figure>\n<p><img src=\"https://miro.medium.com/max/740/1*N8PzWF7yjXvqiDkdfs_5Eg.png\" alt=\"Postgres Logo\"></p>\n</figure>\n<p>I’ve been using a MacBook for about 2 years now and I honestly can’t count the number of times I’ve encountered this weird Postgres bug:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">psql: could not connect to server: Connection refused\n Is the server running locally and accepting\n connections on Unix domain socket &quot;/tmp/.s.PGSQL.5432&quot;?</code></pre></div>\n<p>I’ve solved this quite a number of times but I usually never remember how I resolve it the next time I encounter it. I end up restarting my PC a number of times and having to stack overflow it over and over again.</p>\n<p>Today, that changes, I’m going to write about it so I can always come back and check it whenever I run into this problem again.</p>\n<p>This issue can be caused by a number of things but usually, it’s when you run <code class=\"language-text\">brew update</code> and you upgrade your Postgres version that this problem comes up. When this upgrade occurs, your Postgres config file is usually not compatible with the new one. To confirm what the problem is I advise you use this command:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">postgres -D /usr/local/var/postgres</code></pre></div>\n<p>This command outputs the logs and you should see the cause of the issue. Here’s what the logs look like on my PC at the time of writing:</p>\n<div class=\"gatsby-highlight\" data-language=\"text\"><pre class=\"language-text\"><code class=\"language-text\">2019-02-14 19:15:41.691 WAT [28825] FATAL:  database files are incompatible with server\n2019-02-14 19:15:41.691 WAT [28825] DETAIL:  The data directory was initialized by PostgreSQL version 10, which is not compatible with this version 11.1.</code></pre></div>\n<p>Usually, I don’t have production data or any important database on my PC, I instead have a back up for large dataset I use for testing. So I resolve to reset my PostgreSQL database because I don’t really mind losing the data.</p>\n<p>Albeit if you would like to do this quickly with a three-liner and you’re fine with using the default Postgres user, here’s a quick solution— proposed to me by <a href=\"https://medium.com/u/66cca0a39af3\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Dawuda Ebenezer</a>.</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">postgres -D /usr/local/var/postgres\n<span class=\"token function\">rm</span> -rf /usr/local/var/postgres <span class=\"token operator\">&amp;&amp;</span> initdb /usr/local/var/postgres -E utf8</code></pre></div>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token comment\"># Then start the server:</span>\n$ pg_ctl -D /usr/local/var/postgres -l logfile start <span class=\"token punctuation\">(</span>the minor difference I think<span class=\"token punctuation\">)</span></code></pre></div>\n<h3 id=\"solution\" style=\"position:relative;\"><a href=\"#solution\" aria-label=\"solution permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>SOLUTION</h3>\n<h4 id=\"clearing-postgres-data-files\" style=\"position:relative;\"><a href=\"#clearing-postgres-data-files\" aria-label=\"clearing postgres data files permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>CLEARING POSTGRES DATA FILES</h4>\n<p>Let’s start by stopping the Postgres service with the command</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">brew services stop postgresql</code></pre></div>\n<p>Once this is done, you’d need to delete the data directory for PostgreSQL — L**et me remind you that this is an irreversible action **— if you aren’t sure, use the snippet below to back up the directory</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">mv</span> <span class=\"token variable\"><span class=\"token variable\">`</span>/usr/local/var/postgres/ /usr/local/var/postgres.backup<span class=\"token variable\">`</span></span></code></pre></div>\n<p>You can do this with the snippet below to delete the Postgres data directory:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\"><span class=\"token function\">rm</span> -rf /usr/local/var/postgres/</code></pre></div>\n<h4 id=\"resetting-the-database\" style=\"position:relative;\"><a href=\"#resetting-the-database\" aria-label=\"resetting the database permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>RESETTING THE DATABASE</h4>\n<p>Once this is done, you can create a brand new database with the command</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">initdb /usr/local/var/postgres/</code></pre></div>\n<p>After which you can start the PostgreSQL service with HomeBrew</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">brew services start postgresql</code></pre></div>\n<p>The action taken above clears all databases saved on the PC. So we need to get started by creating a user, this can be done by entering the PostgreSQL repl with the command:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">psql postgres</code></pre></div>\n<p>Now, you should have a new repl instance similar to the screenshot below:</p>\n<figure>\n<p><img src=\"https://miro.medium.com/max/1208/1*3mxFj9-CgpAHcz8-VRoDtg.png\" alt=\"Problem Screenshot\"></p>\n</figure>\n<p>We can then proceed to create a new user with the command</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">CREATE ROLE username WITH LOGIN PASSWORD <span class=\"token string\">'quoted password'</span><span class=\"token punctuation\">;</span></code></pre></div>\n<p>Remember to add the semi-colon at the end of the command, Postgres can act weird at times when the semi-colon isn’t there.</p>\n<p>With the user created, you should be able to log into Postgres now with your credentials.</p>\n<p>At this time, the only action we can perform is to log in, because no role has been assigned to the created user. Let’s proceed to assign the user a role, we do that with the command:</p>\n<div class=\"gatsby-highlight\" data-language=\"bash\"><pre class=\"language-bash\"><code class=\"language-bash\">ALTER ROLE username CREATEDB</code></pre></div>\n<p>What we’ve done is simply give the created user the ability to create a database. There are other types of roles and you can assign a user multiple roles. The other role types include:</p>\n<ul>\n<li>SUPERUSER</li>\n<li>CREATEROLE</li>\n<li>CREATEDB</li>\n<li>REPLICATION</li>\n<li>BYPASS RLS</li>\n</ul>\n<p>Once you’re done assigning roles, you can go on with your day-to-day database activity.</p>\n<p>I use <a href=\"https://eggerapps.at/postico/\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Postico</a> for managing my Postgres databases — I personally love the simple and intuitive layout.</p>\n<p>Now that the database user was created successfully, I can simply log into PostgreSQL using Postico and manage my database(s). A screenshot of what that looks like is shown below</p>\n<figure>\n<p><img src=\"https://miro.medium.com/max/2774/1*TBEaDjG72ONrY9n4p5A9uA.png\" alt=\"Postico Screenshot\"></p>\n</figure>\n<h3 id=\"update\" style=\"position:relative;\"><a href=\"#update\" aria-label=\"update permalink\" class=\"anchor before\"><svg aria-hidden=\"true\" focusable=\"false\" height=\"16\" version=\"1.1\" viewBox=\"0 0 16 16\" width=\"16\"><path fill-rule=\"evenodd\" d=\"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"></path></svg></a>UPDATE</h3>\n<p>My solution to this problem is resetting my Postgres database because this mainly occurs in my dev environment which is my PC, albeit, if you would love to retain your data <a href=\"https://medium.com/u/74a04da5fa3a\" target=\"_blank\" rel=\"nofollow noopener noreferrer\">Lawrence Wachira</a> has shared some info on how to go about it. Check the gist and screenshot below</p>\n<figure>\n<p><img src=\"https://miro.medium.com/max/1684/1*XMJh9niS96qFExzCkWFXJw.png\" alt=\"Larry&#x27;s Suggestion\"></p>\n</figure>\n<p><div id=\"gist82095620\" class=\"gist\">\n    <div class=\"gist-file\">\n      <div class=\"gist-data\">\n        <div class=\"js-gist-file-update-container js-task-list-container file-box\">\n  <div id=\"file-gistfile1-txt\" class=\"file my-2\">\n    \n\n  <div itemprop=\"text\" class=\"Box-body p-0 blob-wrapper data type-text  \">\n      \n<table class=\"highlight tab-size js-file-line-container\" data-tab-size=\"8\" data-paste-markdown-skip>\n      <tr>\n        <td id=\"file-gistfile1-txt-L1\" class=\"blob-num js-line-number\" data-line-number=\"1\"></td>\n        <td id=\"file-gistfile1-txt-LC1\" class=\"blob-code blob-code-inner js-file-line\">After automatically updating Postgres to 10.0 via Homebrew, the pg_ctl start command didn&#39;t work.</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L2\" class=\"blob-num js-line-number\" data-line-number=\"2\"></td>\n        <td id=\"file-gistfile1-txt-LC2\" class=\"blob-code blob-code-inner js-file-line\">The error was &quot;The data directory was initialized by PostgreSQL version 9.6, which is not compatible with this version 10.0.&quot;</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L3\" class=\"blob-num js-line-number\" data-line-number=\"3\"></td>\n        <td id=\"file-gistfile1-txt-LC3\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L4\" class=\"blob-num js-line-number\" data-line-number=\"4\"></td>\n        <td id=\"file-gistfile1-txt-LC4\" class=\"blob-code blob-code-inner js-file-line\">Database files have to be updated before starting the server, here are the steps that had to be followed:</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L5\" class=\"blob-num js-line-number\" data-line-number=\"5\"></td>\n        <td id=\"file-gistfile1-txt-LC5\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L6\" class=\"blob-num js-line-number\" data-line-number=\"6\"></td>\n        <td id=\"file-gistfile1-txt-LC6\" class=\"blob-code blob-code-inner js-file-line\"># need to have both 9.6.x and latest 10.0 installed, and keep 10.0 as default</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L7\" class=\"blob-num js-line-number\" data-line-number=\"7\"></td>\n        <td id=\"file-gistfile1-txt-LC7\" class=\"blob-code blob-code-inner js-file-line\">brew unlink postgresql</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L8\" class=\"blob-num js-line-number\" data-line-number=\"8\"></td>\n        <td id=\"file-gistfile1-txt-LC8\" class=\"blob-code blob-code-inner js-file-line\">brew install postgresql@9.6</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L9\" class=\"blob-num js-line-number\" data-line-number=\"9\"></td>\n        <td id=\"file-gistfile1-txt-LC9\" class=\"blob-code blob-code-inner js-file-line\">brew unlink postgresql@9.6</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L10\" class=\"blob-num js-line-number\" data-line-number=\"10\"></td>\n        <td id=\"file-gistfile1-txt-LC10\" class=\"blob-code blob-code-inner js-file-line\">brew link postgresql</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L11\" class=\"blob-num js-line-number\" data-line-number=\"11\"></td>\n        <td id=\"file-gistfile1-txt-LC11\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L12\" class=\"blob-num js-line-number\" data-line-number=\"12\"></td>\n        <td id=\"file-gistfile1-txt-LC12\" class=\"blob-code blob-code-inner js-file-line\"># move 9.6.x db files to another directory</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L13\" class=\"blob-num js-line-number\" data-line-number=\"13\"></td>\n        <td id=\"file-gistfile1-txt-LC13\" class=\"blob-code blob-code-inner js-file-line\">mv /usr/local/var/postgres /usr/local/var/postgres96</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L14\" class=\"blob-num js-line-number\" data-line-number=\"14\"></td>\n        <td id=\"file-gistfile1-txt-LC14\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L15\" class=\"blob-num js-line-number\" data-line-number=\"15\"></td>\n        <td id=\"file-gistfile1-txt-LC15\" class=\"blob-code blob-code-inner js-file-line\"># init new database using 10.0</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L16\" class=\"blob-num js-line-number\" data-line-number=\"16\"></td>\n        <td id=\"file-gistfile1-txt-LC16\" class=\"blob-code blob-code-inner js-file-line\">initdb /usr/local/var/postgres -E utf8</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L17\" class=\"blob-num js-line-number\" data-line-number=\"17\"></td>\n        <td id=\"file-gistfile1-txt-LC17\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L18\" class=\"blob-num js-line-number\" data-line-number=\"18\"></td>\n        <td id=\"file-gistfile1-txt-LC18\" class=\"blob-code blob-code-inner js-file-line\"># make timezone and timezonesets directories available for 9.6.x installation</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L19\" class=\"blob-num js-line-number\" data-line-number=\"19\"></td>\n        <td id=\"file-gistfile1-txt-LC19\" class=\"blob-code blob-code-inner js-file-line\">mkdir /usr/local/share/postgresql96</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L20\" class=\"blob-num js-line-number\" data-line-number=\"20\"></td>\n        <td id=\"file-gistfile1-txt-LC20\" class=\"blob-code blob-code-inner js-file-line\">cp -r /usr/local/share/postgresql/timezone /usr/local/share/postgresql96</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L21\" class=\"blob-num js-line-number\" data-line-number=\"21\"></td>\n        <td id=\"file-gistfile1-txt-LC21\" class=\"blob-code blob-code-inner js-file-line\">cp -r /usr/local/share/postgresql/timezonesets /usr/local/share/postgresql96</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L22\" class=\"blob-num js-line-number\" data-line-number=\"22\"></td>\n        <td id=\"file-gistfile1-txt-LC22\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L23\" class=\"blob-num js-line-number\" data-line-number=\"23\"></td>\n        <td id=\"file-gistfile1-txt-LC23\" class=\"blob-code blob-code-inner js-file-line\"># finally the actual upgrade</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L24\" class=\"blob-num js-line-number\" data-line-number=\"24\"></td>\n        <td id=\"file-gistfile1-txt-LC24\" class=\"blob-code blob-code-inner js-file-line\"># -b is the old binary dir, -B is the new binary dir</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L25\" class=\"blob-num js-line-number\" data-line-number=\"25\"></td>\n        <td id=\"file-gistfile1-txt-LC25\" class=\"blob-code blob-code-inner js-file-line\"># -d is the old data dir, -D is the new data dir</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L26\" class=\"blob-num js-line-number\" data-line-number=\"26\"></td>\n        <td id=\"file-gistfile1-txt-LC26\" class=\"blob-code blob-code-inner js-file-line\">pg_upgrade -b /usr/local/Cellar/postgresql@9.6/9.6.5/bin -B /usr/local/Cellar/postgresql/10.0/bin -d /usr/local/var/postgres96 -D /usr/local/var/postgres</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L27\" class=\"blob-num js-line-number\" data-line-number=\"27\"></td>\n        <td id=\"file-gistfile1-txt-LC27\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L28\" class=\"blob-num js-line-number\" data-line-number=\"28\"></td>\n        <td id=\"file-gistfile1-txt-LC28\" class=\"blob-code blob-code-inner js-file-line\"># start 10.0 to check that upgrade works</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L29\" class=\"blob-num js-line-number\" data-line-number=\"29\"></td>\n        <td id=\"file-gistfile1-txt-LC29\" class=\"blob-code blob-code-inner js-file-line\">pg_ctl start -D /usr/local/var/postgres</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L30\" class=\"blob-num js-line-number\" data-line-number=\"30\"></td>\n        <td id=\"file-gistfile1-txt-LC30\" class=\"blob-code blob-code-inner js-file-line\">\n</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L31\" class=\"blob-num js-line-number\" data-line-number=\"31\"></td>\n        <td id=\"file-gistfile1-txt-LC31\" class=\"blob-code blob-code-inner js-file-line\"># cleanup if upgrade was successful</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L32\" class=\"blob-num js-line-number\" data-line-number=\"32\"></td>\n        <td id=\"file-gistfile1-txt-LC32\" class=\"blob-code blob-code-inner js-file-line\">brew uninstall postgresql@9.6</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L33\" class=\"blob-num js-line-number\" data-line-number=\"33\"></td>\n        <td id=\"file-gistfile1-txt-LC33\" class=\"blob-code blob-code-inner js-file-line\">rm -rf /usr/local/var/postgres96</td>\n      </tr>\n      <tr>\n        <td id=\"file-gistfile1-txt-L34\" class=\"blob-num js-line-number\" data-line-number=\"34\"></td>\n        <td id=\"file-gistfile1-txt-LC34\" class=\"blob-code blob-code-inner js-file-line\">rm -rf /usr/local/share/postgresql96</td>\n      </tr>\n</table>\n\n\n  </div>\n\n  </div>\n</div>\n\n      </div>\n      <div class=\"gist-meta\">\n        <a href=\"https://gist.github.com/giannisp/ebaca117ac9e44231421f04e7796d5ca/raw/bad4591d66ffe18b9dd3769199808dd7cc716acf/gistfile1.txt\" style=\"float:right\">view raw</a>\n        <a href=\"https://gist.github.com/giannisp/ebaca117ac9e44231421f04e7796d5ca#file-gistfile1-txt\">gistfile1.txt</a>\n        hosted with &#10084; by <a href=\"https://github.com\">GitHub</a>\n      </div>\n    </div>\n</div></p>\n<p>I hope you enjoyed reading this article.</p>\n<p>Alternatively, you can check this out:</p>\n<figure>\n<p><img src=\"https://miro.medium.com/max/3484/1*qrfE-DAv9mCyLw_wqwEvsQ.png\" alt=\"Vincent&#x27;s Suggestion\"></p>\n</figure>","fields":{"slug":"/posts/resetting-your-postgres-database/","tagSlugs":["/tag/postgres/","/tag/databases/","/tag/sql/","/tag/mac/"]},"frontmatter":{"date":"2019-02-16T12:27:49.850Z","description":"I’ve been using a MacBook for about 2 years now and I honestly can’t count the number of times I’ve encountered this weird Postgres bug: I’ve solved this quite a number of times but I usually never…","tags":["Postgres","Databases","SQL","Mac"],"title":"Resetting your Postgres Database","socialImage":null}}},"pageContext":{"slug":"/posts/resetting-your-postgres-database/"}},"staticQueryHashes":["251939775","401334301","4120999787"]}