hawq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From yo...@apache.org
Subject incubator-hawq-docs git commit: HAWQ-1263 docs - miscellaneous improvements (closes #86)
Date Tue, 17 Jan 2017 00:55:42 GMT
Repository: incubator-hawq-docs
Updated Branches:
  refs/heads/develop 87328a58b -> df87f9ae8


HAWQ-1263 docs - miscellaneous improvements (closes #86)


Project: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/commit/df87f9ae
Tree: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/tree/df87f9ae
Diff: http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/diff/df87f9ae

Branch: refs/heads/develop
Commit: df87f9ae8e964c5c0722f75127fa2b3029f62971
Parents: 87328a5
Author: Lisa Owen <lowen@pivotal.io>
Authored: Mon Jan 16 16:55:38 2017 -0800
Committer: David Yozie <yozie@apache.org>
Committed: Mon Jan 16 16:55:38 2017 -0800

----------------------------------------------------------------------
 ...reating-external-tables-examples.html.md.erb |  2 +-
 markdown/ddl/ddl-database.html.md.erb           | 46 +++++-----
 markdown/install/aws-config.html.md.erb         | 93 ++++++++++++--------
 .../reference/sql/CREATE-DATABASE.html.md.erb   | 14 +--
 4 files changed, 87 insertions(+), 68 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/df87f9ae/markdown/datamgmt/load/creating-external-tables-examples.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/datamgmt/load/creating-external-tables-examples.html.md.erb b/markdown/datamgmt/load/creating-external-tables-examples.html.md.erb
index 8cdbff1..7d38971 100644
--- a/markdown/datamgmt/load/creating-external-tables-examples.html.md.erb
+++ b/markdown/datamgmt/load/creating-external-tables-examples.html.md.erb
@@ -19,7 +19,7 @@ Creates a readable external table, `ext_expenses`, using the `gpfdist` protocol.
 ``` sql
 =# CREATE EXTERNAL TABLE ext_expenses
         ( name text, date date, amount float4, category text, desc1 text )
-    LOCATION ('gpfdist://etlhost-1:8081/*', 'gpfdist://etlhost-1:8082/*')
+    LOCATION ('gpfdist://etlhost-1:8081/*')
     FORMAT 'TEXT' (DELIMITER '|');
 ```
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/df87f9ae/markdown/ddl/ddl-database.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/ddl/ddl-database.html.md.erb b/markdown/ddl/ddl-database.html.md.erb
index 2ef9f9f..d643fae 100644
--- a/markdown/ddl/ddl-database.html.md.erb
+++ b/markdown/ddl/ddl-database.html.md.erb
@@ -2,77 +2,75 @@
 title: Creating and Managing Databases
 ---
 
-A HAWQ system is a single instance of HAWQ. There can be several separate HAWQ systems installed,
but usually just one is selected by environment variable settings. See your HAWQ administrator
for details.
-
-There can be multiple databases in a HAWQ system. This is different from some database management
systems \(such as Oracle\) where the database instance *is* the database. Although you can
create many databases in a HAWQ system, client programs can connect to and access only one
database at a time — you cannot cross-query between databases.
+Your HAWQ deployment may have multiple databases. This is different from some database management
systems \(such as Oracle\) where the database instance *is* the database. Although you can
create many databases in a HAWQ system, client programs can connect to and access only one
database at a time — you cannot cross-query between databases.
 
 ## <a id="topic3"></a>About Template Databases 
 
-Each new database you create is based on a *template*. HAWQ provides a default database,
*template1*. Use *template1* to connect to HAWQ for the first time. HAWQ uses *template1*
to create databases unless you specify another template. Do not create any objects in *template1*
unless you want those objects to be in every database you create.
+Each new database you create is based on a *template*. HAWQ provides a default database,
`template1`. HAWQ uses `template1` to create databases unless you specify another template.
Do not create any objects in `template1` unless you want those objects to be in every database
you create.
 
-HAWQ uses two other database templates, *template0* and *postgres*, internally. Do not drop
or modify *template0* or *postgres*. You can use *template0* to create a completely clean
database containing only the standard objects predefined by HAWQ at initialization, especially
if you modified *template1*.
+HAWQ uses two other database templates internally, `template0` and `postgres`. Do not drop
or modify `template0` or `postgres`. You can use `template0` to create a completely clean
database containing only the standard objects predefined by HAWQ at initialization. This may
be necessary if you have modified `template1`.
 
 ## <a id="topic4"></a>Creating a Database 
 
-The `CREATE DATABASE` command creates a new database. For example:
+You must have appropriate privileges or be a HAWQ superuser to create a database. If you
do not have the correct privileges, you cannot create a database. The HAWQ administrator must
either grant you the necessary privileges or create a database for you.
+
+The [CREATE DATABASE](../reference/sql/CREATE-DATABASE.html) command creates a new database.
For example:
 
 ``` sql
-=> CREATE DATABASE new_dbname;
+=# CREATE DATABASE <new_dbname>;
 ```
 
-To create a database, you must have privileges to create a database or be a HAWQ superuser.
If you do not have the correct privileges, you cannot create a database. The HAWQ administrator
must either give you the necessary privileges or to create a database for you.
-
-You can also use the client program `createdb` to create a database. For example, running
the following command in a command line terminal connects to HAWQ using the provided host
name and port and creates a database named *mydatabase*:
+You can also use the client program `createdb` to create a database. For example, running
the following command connects to HAWQ on the host named `hmaster` at port `5432` and creates
a database named `mydatabase`:
 
 ``` shell
-$ createdb -h masterhost -p 5432 mydatabase
+$ createdb -h hmaster -p 5432 mydatabase
 ```
 
-The host name and port must match the host name and port of the installed HAWQ system.
+The host name and port must match the host name and port of the HAWQ master node.
 
-Some objects, such as roles, are shared by all the databases in a HAWQ system. Other objects,
such as tables that you create, are known only in the database in which you create them.
+Some objects, such as roles, are shared by all of the databases in a HAWQ deployment. Other
objects, such as tables that you create, are known only to the database in which you create
them.
 
 ### <a id="topic5"></a>Cloning a Database 
 
-By default, a new database is created by cloning the standard system database template, *template1*.
Any database can be used as a template when creating a new database, thereby providing the
capability to 'clone' or copy an existing database and all objects and data within that database.
For example:
+By default, a new database is created by cloning the standard system database template, `template1`.
You can identify an alternate template to use for database creation. As mentioned in the section
above, you can specify `template0` as the template:
 
 ``` sql
-=> CREATE DATABASE new_dbname TEMPLATE old_dbname
+=# CREATE DATABASE <new_dbname> WITH TEMPLATE template0;
 ```
 
 ## <a id="topic6"></a>Viewing the List of Databases 
 
-If you are working in the `psql` client program, you can use the `\l` meta-command to show
the list of databases and templates in your HAWQ system. If using another client program and
you are a superuser, you can query the list of databases from the `pg_database` system catalog
table. For example:
+You can use the `\l` meta-command of the `psql` client subsystem to display the list of databases
and templates in your HAWQ deployment. If you are a database superuser, you can query the
list of databases from the `pg_database` system catalog table. For example:
 
 ``` sql
-=> SELECT datname FROM pg_database;
+=# SELECT datname FROM pg_database;
 ```
 
 ## <a id="topic7"></a>Altering a Database 
 
-The ALTER DATABASE command changes database attributes such as owner, name, or default configuration
attributes. For example, the following command alters a database by setting its default schema
search path \(the `search_path` configuration parameter\):
+Use the [ALTER DATABASE](../reference/sql/ALTER-DATABASE.html) command to update database
attributes including owner or name. You can also use ALTER DATABASE to update a database's
default configuration. For example, the following command alters the `search_path` server
configuration parameter to change the default schema search path for database `mydatabase`:
 
 ``` sql
-=> ALTER DATABASE mydatabase SET search_path TO myschema, public, pg_catalog;
+=# ALTER DATABASE mydatabase SET search_path TO myschema, public, pg_catalog;
 ```
 
 To alter a database, you must be the owner of the database or a superuser.
 
 ## <a id="topic8"></a>Dropping a Database 
 
-The `DROP DATABASE` command drops \(or deletes\) a database. It removes the 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 `template1` \(or another database\)
before dropping a database. For example:
+The [DROP DATABASE](../reference/sql/DROP-DATABASE.html) command drops \(deletes\) a database.
It removes the system catalog entries for the database and deletes the data on disk. 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 `template1` \(or another database\) before
dropping a database. For example:
 
 ``` shell
-=> \c template1
+=# \c template1
 ```
 ``` sql
-=> DROP DATABASE mydatabase;
+=# DROP DATABASE mydatabase;
 ```
 
-You can also use the client program `dropdb` to drop a database. For example, the following
command connects to HAWQ using the provided host name and port and drops the database *mydatabase*:
+You can also use the client program `dropdb` to drop a database. For example, the following
command connects to HAWQ on the host named `hmaster` at port `5432` and drops the database
named `mydatabase`:
 
 ``` shell
-$ dropdb -h masterhost -p 5432 mydatabase
+$ dropdb -h hmaster -p 5432 mydatabase
 ```
 
 **Warning:** Dropping a database cannot be undone.

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/df87f9ae/markdown/install/aws-config.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/install/aws-config.html.md.erb b/markdown/install/aws-config.html.md.erb
index 21cadf5..1bb519e 100644
--- a/markdown/install/aws-config.html.md.erb
+++ b/markdown/install/aws-config.html.md.erb
@@ -14,31 +14,41 @@ For information about Amazon EC2, see the [EC2 User Guide](http://docs.aws.amazo
 
 ## <a id="topic_nhk_df4_2v"></a>Create and Launch HAWQ Instances
 
-Use the *Amazon EC2 Console* to launch instances and configure, start, stop, and terminate
(delete) virtual servers. When you launch a HAWQ instance, you select and configure key attributes
via the EC2 Console.
+Use the **Amazon EC2 Console** to launch instances and configure, start, stop, and terminate
(delete) virtual servers. When you launch a HAWQ instance, you select and configure key attributes
via the EC2 Console.
 
 
 ### <a id="topic_amitype"></a>Choose AMI Type
 
-An Amazon Machine Image (AMI) is a template that contains a software configuration including
the operating system, application server, and applications that best suit your purpose. When
configuring a HAWQ virtual instance, we recommend you use a *hardware virtualized* AMI running
64-bit Red Hat Enterprise Linux version 6.4 or 6.5 or 64-bit CentOS 6.4 or 6.5.  Obtain the
licenses and instances directly from the OS provider.
+An Amazon Machine Image (AMI) is a template that contains a specific software configuration
including the operating system, application server, and applications that best suit your purpose.
When configuring a HAWQ virtual instance, use a *hardware virtualized* (HVM) AMI supporting
enhanced 10Gbps networking. Ensure the AMI is running 64-bit Red Hat Enterprise Linux version
6.4 or 6.5 or 64-bit CentOS 6.4 or 6.5.  Obtain the licenses and instances directly from the
OS provider.
 
 ### <a id="topic_selcfgstorage"></a>Consider Storage
-EC2 instances can be launched as either Elastic Block Store (EBS)-backed or instance store-backed.
 
+You can launch EC2 instances as either Elastic Block Store (EBS)-backed or instance store-backed.
Choose the storage type based on the expected lifetime of your cluster and data.
 
-Instance store-backed storage is generally better performing than EBS and recommended for
HAWQ's large data workloads. SSD (solid state) instance store is preferred over magnetic drives.
+#### <a id="topic_selcfgstorage_instance"></a>Instance Store-Backed
 
-**Note** EC2 *instance store* provides temporary block-level storage. This storage is located
on disks that are physically attached to the host computer. While instance store provides
high performance, powering off the instance causes data loss. Soft reboots preserve instance
store data. 
-     
-Virtual devices for instance store volumes for HAWQ EC2 instance store instances are named
`ephemeralN` (where *N* varies based on instance type). CentOS instance store block device
are named `/dev/xvdletter` (where *letter* is a lower case letter of the alphabet).
+Use instance store-backed storage for short lived or transient clusters that do not require
long-term persistence of data. While instance store-backed storage is generally better performing
than EBS, it is not recommended for use in a production environment.
+
+**Warning**: EC2 instance store-backed storage provides *temporary* block-level storage.
This storage is located on disks that are physically attached to the host computer. You will
lose all instance store data when the AMI instance is powered off.
+
+
+#### <a id="topic_selcfgstorage_ebs"></a>EBS-Backed
+EBS volumes are reliable and highly-available. Use EBS-backed storage for longer running
clusters where data must be quickly accessible and must remain available for a long period
of time.
+
+
+#### <a id="topic_selcfgstorage_volume"></a>Volume Types
+When selecting between HDD and SSD volume types, the trade-offs are between speed, capacity,
and cost. HDD volumes are less expensive and have greater disk capacity, but may be less performant.
SSD (solid state drive) volumes are more performant, but costlier and typically have less
disk capacity.
 
 ### <a id="topic_cfgplacegrp"></a>Configure Placement Group 
 
-A placement group is a logical grouping of instances within a single availability zone that
together participate in a low-latency, 10 Gbps network.  Your HAWQ master and segment cluster
instances should support enhanced networking and reside in a single placement group (and subnet)
for optimal network performance.  
+A placement group is a logical grouping of instances within a single availability zone that
participate in a low-latency, 10 Gbps network. Your HAWQ master and segment cluster instances
should support enhanced networking and reside in a single placement group (and subnet) for
optimal network performance.
 
 If your Ambari node is not a DataNode, locating the Ambari node instance in a subnet separate
from the HAWQ master/segment placement group enables you to manage multiple HAWQ clusters
from the single Ambari instance.
 
 Amazon recommends that you use the same instance type for all instances in the placement
group and that you launch all instances within the placement group at the same time.
 
-Membership in a placement group has some implications on your HAWQ cluster.  Specifically,
growing the cluster over capacity may require shutting down all HAWQ instances in the current
placement group and restarting the instances to a new placement group. Instance store volumes
are lost in this scenario.
+Membership in a placement group has some implications for your HAWQ cluster.  Specifically,
growing the cluster beyond the placement group capacity may require shutting down all HAWQ
instances in the current placement group and restarting the instances in a new placement group.
**Warning**: Instance store volumes are lost in this scenario.
+
+**Note**: If cluster down time during expansion is not acceptable for your HAWQ deployment,
do not use placement groups.
 
 ### <a id="topic_selinsttype"></a>Select EC2 Instance Type
 
@@ -46,44 +56,53 @@ An EC2 instance type is a specific combination of CPU, memory, default
storage,
 
 Several instance store-backed EC2 instance types have shown acceptable performance for HAWQ
nodes in development and production environments: 
 
-| Instance Type  | Env | vCPUs | Memory (GB) | Disk Capacity (GB) | Storage Type |
-|-------|-----|------|--------|----------|--------|
-| cc2.8xlarge  | Dev | 32 | 60.5 | 4 x 840 | HDD |
-| d2.2xlarge  | Dev | 8 | 60 | 6 x 2000 | HDD |
-| d2.4xlarge  | Dev/QA | 16 | 122 | 12 x 2000 | HDD |
-| i2.8xlarge  | Prod | 32 | 244 | 8 x 800 | SSD |
-| hs1.8xlarge  | Prod | 16 | 117 | 24 x 2000 | HDD |
-| d2.8xlarge  | Prod | 36 | 244 | 24 x 2000 | HDD |
+| Instance Type  | Env | vCPUs | Memory (GB) | Disk Capacity (GB) | Storage Type | Network
Speed |
+|-------|-----|------|--------|----------|--------|-------|
+| d2.2xlarge  | Dev | 8 | 60 | 6 x 2000 | HDD | High |
+| d2.4xlarge  | Dev/QA | 16 | 122 | 12 x 2000 | HDD | High |
+| c3.8xlarge  | Dev/QA | 32 | 60 | 2 x 320 | SSD | 10 Gigabit |
+| r3.8xlarge  | Dev/QA | 32 | 244 | 2 x 320 | SSD | 10 Gigabit |
+| i2.8xlarge  | Prod | 32 | 244 | 8 x 800 | SSD | 10 Gigabit |
+| d2.8xlarge  | Prod | 36 | 244 | 24 x 2000 | HDD | 10 Gigabit |
  
-For optimal network performance, the chosen HAWQ instance type should support EC2 enhanced
networking. Enhanced networking results in higher performance, lower latency, and lower jitter.
Refer to [Enhanced Networking on Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html)
for detailed information on enabling enhanced networking in your instances.
+**Note**: This list is not exhaustive. You may find other instance types with similar specifications
suitable for your HAWQ deployment.
+
+For optimal network performance, the chosen HAWQ instance type should support EC2 enhanced
networking. Enhanced networking results in higher performance, lower latency, and lower jitter.
Refer to [Enhanced Networking on Linux Instances](http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/enhanced-networking.html)
for detailed information on enabling enhanced networking in supported EC2 instance types.
 
-All instance types identified in the table above support enhanced networking.
 
-### <a id="topic_cfgnetw"></a>Configure Networking 
+### <a id="topic_cfgnetw"></a>Configure Networking and VPC
 
-Your HAWQ cluster instances should be in a single VPC and on the same subnet. Instances are
always assigned a VPC internal IP address. This internal IP address should be used for HAWQ
communication between hosts. You can also use the internal IP address to access an instance
from another instance within the HAWQ VPC.
+Place your HAWQ cluster instances in a single VPC and on the same subnet. Instances are always
assigned a VPC internal IP address. Use this internal IP address for HAWQ communication between
hosts. You can also use the internal IP address to access an instance from another instance
within the HAWQ VPC.
 
 You may choose to locate your Ambari node on a separate subnet in the VPC. Both a public
IP address for the instance and an Internet gateway configured for the EC2 VPC are required
to access the Ambari instance from an external source and for the instance to access the Internet.

 
-Ensure your Ambari and HAWQ master instances are each assigned a public IP address for external
and internet access. We recommend you also assign an Elastic IP Address to the HAWQ master
instance.
+Ensure your Ambari and HAWQ master instances are each assigned a public IP address for external
and internet access. Also assign an Elastic IP Address to the HAWQ master instance.
 
 
 ###Configure Security Groups<a id="topic_cfgsecgrp"></a>
 
 A security group is a set of rules that control network traffic to and from your HAWQ instance.
 One or more rules may be associated with a security group, and one or more security groups
may be associated with an instance.
 
-To configure HAWQ communication between nodes in the HAWQ cluster, include and open the following
ports in the appropriate security group for the HAWQ master and segment nodes:
+To configure HAWQ communication between nodes in a HAWQ cluster, include and open appropriate
ports in the security group for the HAWQ master and segment nodes. For example, if you have
a single VPC, you may create a single security group named `hawq-cluster-sg` for your cluster,
and configure this security group to open the following ports:
+
+| Port  | Protocol | Application | Source |
+|-------|----------|--------------|-------------|
+| -1    |  ICMP | `ping` | `hawq-cluster-sg` |
+| 5432    | TCP     | HAWQ/Postgres | cidr 0.0.0.0/0 |
+| 50700    |  TCP   | HDFS NameNode |  cidr 0.0.0.0/0 |
+| 0-65535 | TCP | `ssh`, HAWQ segment communication  | `hawq-cluster-sg` |
+| 0-65535 | UDP | HAWQ segment communication  | `hawq-cluster-sg` |
 
-| Port  | Application |
-|-------|-------------------------------------|
-| 22    | ssh - secure connect to other hosts |
+This configuration allows communication between the HAWQ segment nodes. It also allows `ping`
on and `ssh` between all instances in the `hawq-cluster-sg`  security group. The HAWQ master
and HDFS NameNode ports are open with the above settings.
 
-To allow access to/from a source external to the Ambari management node, include and open
the following ports in an appropriate security group for your Ambari node:
+Open and/or restrict these and any additional ports required for your HAWQ deployment environment.
 
-| Port  | Application |
-|-------|-------------------------------------|
-| 22    | ssh - secure connect to other hosts |
-| 8080  | Ambari - HAWQ admin/config web console |  
+Include and open the following ports in an appropriate security group for your Ambari node
to allow access to/from a source external to this node:
+
+| Port  | Protocol | Application |
+|-------|-----------------|--------------------|
+| 22    | TCP | `ssh` - secure shell to/from other hosts |
+| 8080  | TCP | Ambari - HAWQ admininstration web console |
 
 
 ###Generate Key Pair<a id="topic_cfgkeypair"></a>
@@ -91,21 +110,23 @@ AWS uses public-key cryptography to secure the login information for
your instan
 
 A key pair for an EC2 instance consists of a *public key* that AWS stores, and a *private
key file* that you maintain. Together, they allow you to connect to your instance securely.
The private key file name typically has a `.pem` suffix.
 
-This example logs into an into EC2 instance from an external location with the private key
file `my-test.pem` as user `user1`.  In this example, the instance is configured with the
public IP address `192.0.2.0` and the private key file resides in the current directory.
+The following example logs into an into EC2 instance from an external location with the private
key file `my-test.pem` as user `user1`.  In this example, the instance is configured with
the public IP address `192.0.2.0` and the private key file resides in the current directory.
 
 ```shell
-$ ssh -i my-test.pem user1@192.0.2.0
+$ ssh -i ./my-test.pem user1@192.0.2.0
 ```
 
 ##Additional HAWQ Considerations <a id="topic_mj4_524_2v"></a>
 
-After launching your HAWQ instance, you will connect to and configure the instance. The 
*Instances* page of the EC2 Console lists the running instances and their associated network
access information.
+After launching your HAWQ instance, you will connect to and configure the instance. The **Instances**
page of the EC2 Console lists the running instances and their associated network access information.
 
-Before installing HAWQ, set up the EC2 instances as you would local host server machines.
Configure the host operating system, configure host network information (for example, update
the `/etc/hosts` file), set operating system parameters, and install operating system packages.
For information about how to prepare your operating system environment for HAWQ, see [Apache
HAWQ System Requirements](../requirements/system-requirements.html) and [Select HAWQ Host
Machines](../install/select-hosts.html).
+Before installing HAWQ, set up the EC2 instances as you would local host server machines.
Configure the host operating system, configure host network information (for example, update
the `/etc/hosts` file), set operating system parameters, and install operating system packages.
[Apache HAWQ System Requirements](../requirements/system-requirements.html) and [Select HAWQ
Host Machines](../install/select-hosts.html) provide the information necessary to prepare
your operating system environment for HAWQ.
 
 ###Passwordless SSH Configuration<a id="topic_pwdlessssh_cc"></a>
 
-HAWQ hosts will be configured during the installation process to use passwordless SSH for
intra-cluster communications. Temporary password-based authentication must be enabled on each
HAWQ host in preparation for this configuration. Password authentication is typically disabled
by default in cloud images. Update the cloud configuration in `/etc/cloud/cloud.cfg` to enable
password authentication in your AMI(s). Set `ssh_pwauth: True` in this file. If desired, disable
password authentication after HAWQ installation by setting the property back to `False`.
+HAWQ hosts are configured during the installation process to use passwordless SSH for intra-cluster
communications. Temporary password-based authentication must be enabled on each HAWQ host
in preparation for this configuration.
+
+Password authentication is typically disabled by default in cloud images. Update the cloud
configuration in `/etc/cloud/cloud.cfg` to enable password authentication in your AMI(s).
Set `ssh_pwauth: True` in this configuration file. If desired, set the property back to `False`
after HAWQ installation to disable password authentication.
   
 ##References<a id="topic_hgz_zwy_bv"></a>
 

http://git-wip-us.apache.org/repos/asf/incubator-hawq-docs/blob/df87f9ae/markdown/reference/sql/CREATE-DATABASE.html.md.erb
----------------------------------------------------------------------
diff --git a/markdown/reference/sql/CREATE-DATABASE.html.md.erb b/markdown/reference/sql/CREATE-DATABASE.html.md.erb
index 7ebab4e..1f5467e 100644
--- a/markdown/reference/sql/CREATE-DATABASE.html.md.erb
+++ b/markdown/reference/sql/CREATE-DATABASE.html.md.erb
@@ -25,20 +25,20 @@ where \<database\_attribute\> is:
 
 The creator becomes the owner of the new database by default. Superusers can create databases
owned by other users by using the `OWNER` clause. They can even create databases owned by
users with no special privileges. Non-superusers with `CREATEDB` privilege can only create
databases owned by themselves.
 
-By default, the new database will be created by cloning the standard system database `template1`.
A different template can be specified by writing `TEMPLATE <template>`. In particular,
by writing `TEMPLATE template0`, you can create a clean database containing only the standard
objects predefined by HAWQ. This is useful if you wish to avoid copying any installation-local
objects that may have been added to `template1`.
+By default, the new database is created by cloning the standard system database template
named `template1`. You can specify a different template by including the `WITH TEMPLATE=<template>`
clause in the `CREATE DATABASE` command. In particular, specifying `WITH TEMPLATE=template0`
creates a clean database containing only the standard objects predefined by HAWQ. This is
useful if you wish to avoid copying any installation-local objects that may have been added
to `template1`.
 
 ## <a id="topic1__section4"></a>Parameters
 
 <dt>\<database_name\></dt>
 <dd>The name of a database to create.
 
-**Note:** HAWQ reserves the database name "hcatalog" for system use.</dd>
+**Note:** HAWQ reserves the database name `hcatalog` for system use.</dd>
 
 <dt>OWNER=\<database_owner\> </dt>
 <dd>The name of the database user who will own the new database, or `DEFAULT` to use
the default owner (the user executing the command).</dd>
 
 <dt>TEMPLATE=\<template\> </dt>
-<dd>The name of the template from which to create the new database, or `DEFAULT` to
use the default template (*template1*).</dd>
+<dd>The name of the template from which to create the new database, or `DEFAULT` to
use the default template (`template1`).</dd>
 
 <dt>ENCODING=\<encoding\> </dt>
 <dd>Character set encoding to use in the new database. Specify a string constant (such
as `'SQL_ASCII'`), an integer encoding number, or `DEFAULT` to use the default encoding.</dd>
@@ -53,25 +53,25 @@ By default, the new database will be created by cloning the standard system
data
 
 `CREATE DATABASE` cannot be executed inside a transaction block.
 
-When you copy a database by specifying its name as the template, no other sessions can be
connected to the template database while it is being copied. New connections to the template
database are locked out until `CREATE DATABASE` completes.
+Only template databases may be specified in the `WITH TEMPLATE=<template>` clause.
When you specify `template1` or `template0` as the database template, no other sessions can
be connected to the template database during the create operation. New connections to the
template database are locked out until `CREATE DATABASE` completes.
 
 The `CONNECTION LIMIT` is not enforced against superusers.
 
 ## <a id="topic1__section6"></a>Examples
 
-To create a new database:
+To create a new database using the default template:
 
 ``` pre
 CREATE DATABASE gpdb;
 ```
 
-To create a database `sales` owned by user `salesapp` with a default tablespace of `salesspace`:
+To create a database named `sales` owned by user `salesapp` with a default tablespace of
`salesspace`:
 
 ``` pre
 CREATE DATABASE sales OWNER=salesapp TABLESPACE=salesspace;
 ```
 
-To create a database `music` which supports the ISO-8859-1 character set:
+To create a database named `music` which supports the ISO-8859-1 character set:
 
 ``` pre
 CREATE DATABASE music ENCODING='LATIN1';


Mime
View raw message