<?xml version="1.0" encoding="utf-8" standalone="yes"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/">
  <channel>
    <title>Pg_restore on Kenno&#39;s Open Note</title>
    <link>https://blog.khmersite.net/tags/pg_restore/</link>
    <description>Recent content in Pg_restore on Kenno&#39;s Open Note</description>
    <image>
      <title>Kenno&#39;s Open Note</title>
      <url>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</url>
      <link>https://blog.khmersite.net/%3Clink%20or%20path%20of%20image%20for%20opengraph,%20twitter-cards%3E</link>
    </image>
    <generator>Hugo -- 0.154.0</generator>
    <language>en</language>
    <lastBuildDate>Sun, 03 Jul 2022 23:20:48 +1000</lastBuildDate>
    <atom:link href="https://blog.khmersite.net/tags/pg_restore/index.xml" rel="self" type="application/rss+xml" />
    <item>
      <title>Restoring Postgresql DB backup with different owner role</title>
      <link>https://blog.khmersite.net/p/postgresql-restore-db-backup-with-different-owner-role/</link>
      <pubDate>Sun, 03 Jul 2022 23:20:48 +1000</pubDate>
      <guid>https://blog.khmersite.net/p/postgresql-restore-db-backup-with-different-owner-role/</guid>
      <description>&lt;p&gt;Like the title says, when restoring a Postgresql database onto a different server which happens to have a dfferent role owner,
extra care is needed, otherwise similar error message below will come up:&lt;/p&gt;
&lt;pre tabindex=&#34;0&#34;&gt;&lt;code&gt;pg_restore: from TOC entry 217; 1259 17163 TABLE users_collections webdev1
pg_restore: error: could not execute query: ERROR:  role &amp;#34;webdev1&amp;#34; does not exist
Command was: ALTER TABLE public.users_collections OWNER TO webdev1;

pg_restore: from TOC entry 218; 1259 17168 TABLE users_organizations webdev1
pg_restore: error: could not execute query: ERROR:  role &amp;#34;webdev1&amp;#34; does not exist
Command was: ALTER TABLE public.users_organizations OWNER TO webdev1;

pg_restore: warning: errors ignored on restore: 19
&lt;/code&gt;&lt;/pre&gt;&lt;p&gt;What happened was that there was no role named &lt;code&gt;webdev1&lt;/code&gt; on the Postgreseql server where the database restoring was performed. Instead, on my database server, I had a role named &lt;code&gt;webdev2&lt;/code&gt;.&lt;/p&gt;</description>
    </item>
  </channel>
</rss>
