Hi,
I was looking at the recent push for the pg_createsubscription "--all"
option [1], because I was absent for several weeks prior.
I found some minor non-functional issues as follows:
======
doc/src/sgml/ref/pg_createsubscriber.sgml
1.
+ If the database name is not specified in publisher-server, the postgres
+ database will be used, or if that does not exist, template1
will be used.
1a.
There is missing SGML markup in the description of "--all"
- "publisher-server" ==> "the <option>--publisher-server</option>
connection string"
- "postgres database" ==> "<literal>postgres</literal> database"
- "template1 database" ==> "<literal>template1</literal> database"
~
1b.
That sentence "If the database name ..." doesn't give any context
about what it is referring to. I think it needs to be worded more
similarly to the vacuum --maintenance-db option [2] to say it is
connecting to this database in order to "discover" the list of
databases.
SUGGESTION
To discover the list of all databases, connect to the source server
using the database name specified in the
<option>--publisher-server</option> connection string, or if not
specified, the <literal>postgres</literal> database will be used, or
if that does not exist, <literal>template1</literal> will be used.
~
1c.
I didn't think the sentence quite belongs here because it isn't
describing anything about the --all option. Instead, it is describing
how the source server connection is made. So, I felt this might be
better put later in the "Notes/Prerequisites" section where other
source server connection information is described.
======
src/bin/pg_basebackup/pg_createsubscriber.c
get_publisher_databases:
2.
+/*
+ * Fetch a list of all not-template databases from the source server.
+ * Internally, this is treated as if the user specified multiple --database
+ * options, one for each source database.
+ */
/not-template/connectable non-template/
======
Patches are attached to implement the above.
0001. Docs some fixes to the --all description. (see #1a and #1b)
0002. Docs moves part of the --all description to the
Note/Prerequisites section. (see #1c)
0003. Fixes to code comments. (see #2)
======
[1] https://github.com/postgres/postgres/commit/fb2ea12f42b9453853be043b8ed107e136e1ccb7
[2] https://www.postgresql.org/docs/current/app-vacuumdb.html
Kind Regards,
Peter Smith.
Fujitsu Australia