pg.ddx.io  pgsql-docs@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: PG Doc comments form <noreply@postgresql.org>
To: pgsql-docs@lists.postgresql.org
Cc: jonassteinberg1@gmail.com
Subject: 13 25.1.1 clarify "The dumps produced by pg_dump are relative to template0"
Date: Thu, 16 Sep 2021 12:27:36 +0000
Message-ID: <163179525619.4675.12429764551317333686@wrigleys.postgresql.org> (raw)

The following documentation comment has been logged on the website:

Page: https://www.postgresql.org/docs/13/backup-dump.html
Description:

In doc version 13 section 25.1.1 it reads, "The dumps produced by pg_dump
are relative to template0.  This means that any languages, procedures, etc.
added via template1 will also be dumped by pg_dump. As a result, when
restoring, if you are using a customized template1, you must create the
empty database from template0, as in the example above."  Unless one knows
that template0 and template1 start off identical the wording above is
confusing because it doesn't make sense why a modified template1 would
necessitate ensuring creation from template0.  I think a much clearer
wording would be, "In a new cluster template0 and template1 are identical. 
Additionally, template1 is the source for all CREATE DATABASE commands.
Dumps produced by pg_dump, however, are relative to template0.  This means
that any languages, procedures, etc. added via template1 will also be dumped
by pg_dump. As a result, when restoring, if you are using a customized
template1, you must create the empty database from template0, as in the
example above."

Additionally, there is some wording above that is similarly confusing:

"The database dbname will not be created by this command, so you must create
it yourself from template0 before executing psql..."

If template0 and template1 start off the same *must* we create it from
template0 then?  This also confuses the statement above.

I think that's enough for y'all to go on.  Thanks for the best rdbms out
there!

- jonas


view thread (2+ messages)  latest in thread

Message-ID: <163179525619.4675.12429764551317333686@wrigleys.postgresql.org>
Permalink:  ../163179525619.4675.12429764551317333686@wrigleys.postgresql.org/
Also on:    postgresql.org/message-id/163179525619.4675.12429764551317333686@wrigleys.postgresql.org

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-docs@postgresql.org
  Cc: noreply@postgresql.org, pgsql-docs@lists.postgresql.org, jonassteinberg1@gmail.com
  Subject: Re: 13 25.1.1 clarify "The dumps produced by pg_dump are relative to template0"
  In-Reply-To: <163179525619.4675.12429764551317333686@wrigleys.postgresql.org>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox