Skip to content

Commit

Permalink
Merge pull request #495 from rhelmer/master
Browse files Browse the repository at this point in the history
(docs only) remove redundancy in postgres population docs
  • Loading branch information
rhelmer committed Apr 10, 2012
2 parents 489796a + d0033fd commit c7d1553
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 14 deletions.
15 changes: 1 addition & 14 deletions docs/installation.rst
Expand Up @@ -249,23 +249,10 @@ As the *postgres* user:
test=# \q
psql -d test -f /usr/share/pgsql/contrib/citext.sql

Load PostgreSQL Schema
````````````
From inside the Socorro checkout, as the *socorro* user:
::
cp scripts/config/setupdatabaseconfig.py.dist scripts/config/setupdatabaseconfig.py
export PYTHONPATH=.:thirdparty
export PGPASSWORD="aPassword"
psql -h localhost -U postgres -f scripts/schema/2.2/breakpad_roles.sql
psql -h localhost -U postgres breakpad -f scripts/schema/2.2/breakpad_schema.sql
cp scripts/config/createpartitionsconfig.py.dist scripts/config/createpartitionsconfig.py
python scripts/createPartitions.py


Populate PostgreSQL Database
````````````
Refer to :ref:`populatepostgres-chapter` for information about
populating the database.
loading the schema and populating the database.

This step is *required* to get basic information about existing product names
and versions into the system.
Expand Down
10 changes: 10 additions & 0 deletions docs/populatepostgres.rst
Expand Up @@ -26,6 +26,16 @@ From inside the Socorro checkout, as *postgres* user:
psql -f sql/schema/2.5/breakpad_roles.sql breakpad
psql -f sql/schema/2.5/breakpad_schema.sql breakpad

The tables are partitioned by date (http://www.postgresql.org/docs/8.3/static/ddl-partitioning.html), there is a script to create them initial and they
are maintained by cron afterwards.
From inside the Socorro checkout, as *socorro* user:
::
cp scripts/config/setupdatabaseconfig.py.dist scripts/config/setupdatabaseconfig.py
export PYTHONPATH=.:thirdparty
export PGPASSWORD="aPassword"
cp scripts/config/createpartitionsconfig.py.dist scripts/config/createpartitionsconfig.py
python scripts/createPartitions.py

Customize CSVs, at minimum you probably need to bump the dates and build IDs in:
raw_adu.csv reports.csv releases_raw.csv

Expand Down

0 comments on commit c7d1553

Please sign in to comment.