提交 6b3d57b6 编写于 作者: A Andreas Scherbaum 提交者: Andreas Scherbaum

Replace "template1" with "postgres" database (#2530)

* Replace "template1" with "postgres" database
上级 bbee497d
......@@ -13,8 +13,8 @@
<codeblock>$ psql</codeblock>
</p>
<p>If a user-defined database has not yet been created, you can access the system by
connecting to the <codeph>template1</codeph> database. For
example:<codeblock>$ psql template1</codeblock>
connecting to the <codeph>postgres</codeph> database. For
example:<codeblock>$ psql postgres</codeblock>
</p>
<p>After connecting to a database, <codeph>psql</codeph> provides a prompt with the name of
the database to which <codeph>psql</codeph> is currently connected, followed by the string
......
......@@ -37,7 +37,7 @@
<row>
<entry colname="col1">Database name</entry>
<entry colname="col2">The name of the database to which you want to connect. For a
newly initialized system, use the <codeph>template1</codeph> database to
newly initialized system, use the <codeph>postgres</codeph> database to
connect for the first time.</entry>
<entry colname="col3">
<codeph>$PGDATABASE</codeph>
......
......@@ -95,7 +95,7 @@
<li>Create a PgBouncer configuration file, for example <codeph>pgbouncer.ini</codeph>.
Here is a simple configuration
file:<codeblock>[databases]
template1 = host=127.0.0.1 port=5432 dbname=template1
postgres = host=127.0.0.1 port=5432 dbname=postgres
mydb = host=127.0.0.1 port=5432 dbname=mydb
[pgbouncer]
......@@ -146,7 +146,7 @@ md53ce96652dedd8226c498e09ae2d26220</codeblock></p><p>And
options.</p></li>
<li>Update client applications to connect to <codeph>pgbouncer</codeph> instead of
directly to Greenplum Database server. To start <codeph>psql</codeph>, for
example:<codeblock>$ psql -p 6543 -U <varname>someuser</varname> template1</codeblock></li>
example:<codeblock>$ psql -p 6543 -U <varname>someuser</varname> postgres</codeblock></li>
</ol>
</body>
</topic>
......
......@@ -16,15 +16,14 @@
<title id="im140508">About Template Databases</title>
<body>
<p>Each new database you create is based on a <i>template</i>. Greenplum provides a default database, <i>template1</i>. Use
<i>template1</i> to connect to Greenplum Database for the first time.
<i>postgres</i> to connect to Greenplum Database for the first time.
Greenplum Database uses <i>template1</i> to create databases unless you
specify another template. Do not create any objects in <i>template1</i> unless you want
those objects to be in every database you create. </p>
<p>Greenplum Database uses two other database templates, <i>template0</i> and
<i>postgres</i>, internally. Do not drop or modify <i>template0</i> or <i>postgres</i>.
You can use <i>template0</i> to create a completely clean database containing only the
standard objects predefined by Greenplum Database at initialization,
especially if you modified <i>template1</i>.</p>
<p>Greenplum Database uses another database templates, <i>template0</i>, internally. Do not drop or
modify <i>template0</i>. You can use <i>template0</i> to create a completely clean
database containing only the standard objects predefined by Greenplum Database at
initialization, especially if you modified <i>template1</i>.</p>
</body>
</topic>
<topic id="topic4" xml:lang="en">
......@@ -93,10 +92,10 @@
system catalog entries for the database and deletes the database directory on disk that
contains the data. You must be the database owner or a superuser to drop a database, and you
cannot drop a database while you or anyone else is connected to it. Connect to
<codeph>template1</codeph> (or another database) before dropping a database. For
<codeph>postgres</codeph> (or another database) before dropping a database. For
example:</p>
<p>
<codeblock>=&gt; \c template1
<codeblock>=&gt; \c postgres
=&gt; DROP DATABASE mydatabase;</codeblock>
</p>
<p>You can also use the client program <codeph>dropdb</codeph> to drop a database. For
......
......@@ -458,7 +458,7 @@ print(my_data)</codeblock>
<li>
<p>This error can occur when the Kerberos keytab does not contain a matching
cryptographic type to a client attempting to connect.
<codeblock>psql -h 'hostname' template1
<codeblock>psql -h 'hostname' postgres
psql: GSSAPI continuation error: Unspecified GSS failure. Minor code may provide more information
GSSAPI continuation error: Key version is not available</codeblock></p>
<p>The resolution is to add the additional encryption types to the keytab using
......
......@@ -305,13 +305,13 @@ Valid starting     Expires            Service principal
<steps>
<step>
<cmd>Create a Greenplum Database administrator role in the database
<codeph>template1</codeph> for the Kerberos principal that is used as the database
<codeph>postgres</codeph> for the Kerberos principal that is used as the database
administrator. The following example uses <codeph>gpamin/kerberos-gpdb</codeph>.</cmd>
<stepxmp>
<codeblock>psql template1 -c 'create role "gpadmin/kerberos-gpdb" login superuser;'
<codeblock>psql postgres -c 'create role "gpadmin/kerberos-gpdb" login superuser;'
</codeblock>
</stepxmp>
<info> The role you create in the database <codeph>template1</codeph> will be available
<info> The role you create in the database <codeph>postgres</codeph> will be available
in any new Greenplum Database that you create. </info>
</step>
<step id="nr157586">
......@@ -346,7 +346,7 @@ Valid starting     Expires            Service principal
<cmd>As a test, log in to the database as the <codeph>gpadmin</codeph> role with the
Kerberos credentials <codeph>gpadmin/kerberos-gpdb</codeph>:</cmd>
<stepxmp>
<codeblock>psql -U "gpadmin/kerberos-gpdb" -h master.test template1
<codeblock>psql -U "gpadmin/kerberos-gpdb" -h master.test postgres
</codeblock>
</stepxmp>
<info>
......
......@@ -41,7 +41,7 @@
<row>
<entry colname="col1">Database name</entry>
<entry colname="col2">The name of the database to which you want to connect. For a
newly initialized system, use the <codeph>template1</codeph> database to connect for
newly initialized system, use the <codeph>postgres</codeph> database to connect for
the first time.</entry>
<entry colname="col3">
<codeph>$PGDATABASE</codeph>
......@@ -210,8 +210,8 @@
<codeblock>$ psql</codeblock>
</p>
<p>If a user-defined database has not yet been created, you can access the system by
connecting to the <codeph>template1</codeph> database. For
example:<codeblock>$ psql template1</codeblock></p>
connecting to the <codeph>postgres</codeph> database. For
example:<codeblock>$ psql postgres</codeblock></p>
<p>After connecting to a database, <codeph>psql</codeph> provides a prompt with the name
of the database to which <codeph>psql</codeph> is currently connected, followed by the
string <codeph>=&gt;</codeph> (or <codeph>=#</codeph> if you are the database
......
......@@ -8,7 +8,7 @@
<p>The <codeph>gp_dump</codeph> utility dumps the contents of a database into SQL script files,
which can then be used to restore the database schema and user data at a later time using
<codeph>gp_restore</codeph> The following command will create a schema dump of the
<codeph>template1</codeph> database:</p>
<codeblock>$ gp_dump -s template1</codeblock>
<codeph>postgres</codeph> database:</p>
<codeblock>$ gp_dump -s postgres</codeblock>
</body>
</topic>
......@@ -268,7 +268,7 @@ gp_email_to='gpdb_dba_group@example.com'
<p>If the master host can contact the SMTP server, log in to <codeph>psql</codeph> and
test email notifications with the following command:</p>
<p>
<codeblock>$ psql template1
<codeblock>$ psql postgres
=# SELECT gp_elog('Test GPDB Email',true); gp_elog
</codeblock>
</p>
......
......@@ -103,7 +103,7 @@
<cmd>Connect to the master in maintenance mode to do catalog maintenance. For
example:</cmd>
<stepxmp>
<codeblock id="kg155401">$ PGOPTIONS='-c gp_session_role=utility' psql template1</codeblock>
<codeblock id="kg155401">$ PGOPTIONS='-c gp_session_role=utility' psql postgres</codeblock>
</stepxmp>
</step>
<step>
......
......@@ -27,15 +27,14 @@
<title id="im140508">About Template Databases</title>
<body>
<p>Each new database you create is based on a <i>template</i>. Greenplum provides a default
database, <i>template1</i>. Use <i>template1</i> to connect to Greenplum Database for the
database, <i>template1</i>. Use <i>postgres</i> to connect to Greenplum Database for the
first time. Greenplum Database uses <i>template1</i> to create databases unless you
specify another template. Do not create any objects in <i>template1</i> unless you want
those objects to be in every database you create. </p>
<p>Greenplum uses two other database templates, <i>template0</i> and <i>postgres</i>,
internally. Do not drop or modify <i>template0</i> or <i>postgres</i>. You can use
<i>template0</i> to create a completely clean database containing only the standard
objects predefined by Greenplum Database at initialization, especially if you modified
<i>template1</i>.</p>
<p>Greenplum uses another database templates, <i>template0</i>, internally. Do not drop or
modify <i>template0</i>. You can use <i>template0</i> to create a completely clean
database containing only the standard objects predefined by Greenplum Database at
initialization, especially if you modified <i>template1</i>.</p>
</body>
</topic>
<topic id="topic4" xml:lang="en">
......@@ -108,10 +107,10 @@
system catalog entries for the database and deletes the database directory on disk that
contains the data. You must be the database owner or a superuser to drop a database, and
you cannot drop a database while you or anyone else is connected to it. Connect to
<codeph>template1</codeph> (or another database) before dropping a database. For
<codeph>postgres</codeph> (or another database) before dropping a database. For
example:</p>
<p>
<codeblock>=&gt; \c template1
<codeblock>=&gt; \c postgres
=&gt; DROP DATABASE mydatabase;</codeblock>
</p>
<p>You can also use the client program <codeph>dropdb</codeph> to drop a database. For
......
......@@ -238,7 +238,7 @@
into the Greenplum Database on the machine
<codeph>kerberos-gpdb</codeph> as the <codeph>gpadmin</codeph>
user with the Kerberos credentials
<codeph>gpadmin/kerberos-gpdb</codeph>:</p><codeblock>$ psql -U "gpadmin/kerberos-gpdb" -h kerberos-gpdb template1</codeblock></li>
<codeph>gpadmin/kerberos-gpdb</codeph>:</p><codeblock>$ psql -U "gpadmin/kerberos-gpdb" -h kerberos-gpdb postgres</codeblock></li>
</ol>
</section>
</body>
......
......@@ -33,7 +33,7 @@
<entry colname="col1">Database name</entry>
<entry colname="col2">The name of the database to which you want to
connect. For a newly initialized system, use the
<codeph>template1</codeph> database to connect for the first
<codeph>postgres</codeph> database to connect for the first
time.</entry>
<entry colname="col3"><codeph>$PGDATABASE</codeph></entry>
</row>
......@@ -80,8 +80,8 @@ $ psql.exe gpdatabase
$ psql.exe</codeblock>
<p>If a user-defined database has not yet been created, you can access the system by
connecting to the <codeph>template1</codeph> database. For example:</p>
<codeblock>$ psql.exe template1</codeblock>
connecting to the <codeph>postgres</codeph> database. For example:</p>
<codeblock>$ psql.exe postgres</codeblock>
<p>After connecting to a database, <codeph>psql</codeph> provides a prompt with the name
of the database to which <codeph>psql</codeph> is currently connected, followed by
the string <codeph>=&gt;</codeph> (or <codeph>=#</codeph> if you are the database
......
......@@ -130,7 +130,7 @@ Driver =
greenplum-connectivity-4.3.x.x/drivers/odbc/psqlodbc-02.08.0500/unixodbc-2.2.14/psqlodbcw.so
Trace = 1
Debug=1
Database = template1
Database = postgres
Servername = gpmaster_hostname
UserName = gpadmin
Password = dbpassword_for_gpadmin
......
......@@ -4,7 +4,7 @@
<topic id="topic1"><title id="cr20941">DROP DATABASE</title><body><p id="sql_command_desc">Removes a database.</p><section id="section2"><title>Synopsis</title><codeblock id="sql_command_synopsis">DROP DATABASE [IF EXISTS] <varname>name</varname></codeblock></section><section id="section3"><title>Description</title><p><codeph>DROP DATABASE</codeph> drops a database. It removes the catalog entries for the database
and deletes the directory containing the data. It can only be executed by the database
owner. Also, it cannot be executed while you or anyone else are connected to the target
database. (Connect to <codeph>template1</codeph> or any other database to issue this
database. (Connect to <codeph>postgres</codeph> or any other database to issue this
command.) </p><note type="warning"><codeph>DROP DATABASE</codeph> cannot be undone. Use it with care!</note></section><section id="section4"><title>Parameters</title><parml><plentry><pt>IF EXISTS</pt><pd>Do not throw an error if the database does not exist. A notice is
issued in this case. </pd></plentry><plentry><pt><varname>name</varname></pt><pd>The name of the database to remove.</pd></plentry></parml></section><section id="section5"><title>Notes</title><p><codeph>DROP DATABASE</codeph> cannot be executed inside a transaction
block.</p><p>This command cannot be executed while connected to the target database.
......
......@@ -741,7 +741,7 @@ db = ...
<b>Minimal Configuration</b>
</p>
<codeblock>[databases]
template1 = host=127.0.0.1 dbname=template1 auth_user=gpadmin
postgres = host=127.0.0.1 dbname=postgres auth_user=gpadmin
[pgbouncer]
pool_mode = session
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册