Mercurial > p > roundup > code
annotate doc/postgresql.txt @ 7399:deb8e7e6d66d
Skip redis tests if unable to communicate with the server.
If the redis module is in the test environment, the redis tests will
not be skipped. If connecting to redis during testing fails with a
ConnectionError because there is no redis server at localhost, or if
it fails with an AuthenticationError, you would fail a slew of tests.
This causes the tests to report as skipped if either of the two errors
occurs. It is very inefficient as it fails in setup() for the tests,
but at least it does report skipping the tests.
Also documented how to pass the redis password to the tests in the
test part of the install docs. Future note: running tests needs proper
docs in development.txt (including database setup) and a link left to
that doc in installation.txt.
| author | John Rouillard <rouilj@ieee.org> |
|---|---|
| date | Wed, 24 May 2023 12:52:53 -0400 |
| parents | a0a100453eb9 |
| children | b21ebabeb2ef |
| rev | line source |
|---|---|
| 6167 | 1 .. index:: postgres; deployment notes |
| 6163 | 2 |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
3 ========================== |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
4 PostgreSQL/psycopg Backend |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
5 ========================== |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
6 |
|
3059
213468d6e7c9
Add installation documentation for tsearch2.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
2860
diff
changeset
|
7 This are notes about PostqreSQL backend based on the psycopg adapter for |
|
213468d6e7c9
Add installation documentation for tsearch2.
Johannes Gijsbers <jlgijsbers@users.sourceforge.net>
parents:
2860
diff
changeset
|
8 Roundup issue tracker. |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
9 |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
10 Prerequisites |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
11 ============= |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
12 |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
13 To use PostgreSQL as backend for storing roundup data, you should |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
14 additionally install: |
|
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
15 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
16 1. PostgreSQL_ 8.x or higher |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
17 |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
18 2. The psycopg_ python interface to PostgreSQL_ |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
19 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
20 Note that you currently need at least version 2.8 of psycopg_ -- the |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
21 postgresql backend will work with 2.7 but if you're using the native |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
22 postgresql indexer you need at least 2.8. Also if you want to run the |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
23 tests, these also need 2.8. If your distribution has an older version we |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
24 suggest that you install into a python virtual environment. |
|
3666
8304a1c1cc98
encourage use of latest psycopg
Richard Jones <richard@users.sourceforge.net>
parents:
3500
diff
changeset
|
25 |
|
6662
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
26 .. _psycopg: https://www.psycopg.org/ |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
27 .. _PostgreSQL: https://www.postgresql.org/ |
|
a0a100453eb9
Document minimum psycopg version
Ralf Schlatterbeck <rsc@runtux.com>
parents:
6262
diff
changeset
|
28 |
|
3666
8304a1c1cc98
encourage use of latest psycopg
Richard Jones <richard@users.sourceforge.net>
parents:
3500
diff
changeset
|
29 |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
30 |
|
1906
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
31 Running the PostgreSQL unit tests |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
32 ================================= |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
33 |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
34 The user that you're running the tests as will need to be able to access |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
35 the postgresql database on the local machine and create and drop |
|
4513
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
4512
diff
changeset
|
36 databases. See the config values in 'test/db_test_base.py' |
|
6a32a2fb95b4
Docs update for mysql and postgresl: Mentioned test/db_test_base.py because
Bernhard Reiter <Bernhard.Reiter@intevation.de>
parents:
4512
diff
changeset
|
37 about which database connection, name and user will be used. |
|
1906
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
38 |
|
f255363e6d97
PostgreSQL backend lands.
Richard Jones <richard@users.sourceforge.net>
parents:
1875
diff
changeset
|
39 |
|
2594
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
40 Credit |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
41 ====== |
|
1873
f63aa57386b0
Backend improvements.
Richard Jones <richard@users.sourceforge.net>
parents:
diff
changeset
|
42 |
|
2594
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
43 The postgresql backend was originally submitted by Federico Di Gregorio |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
44 <fog@initd.org> |
|
c0d6d5004464
rdbms doc updates
Richard Jones <richard@users.sourceforge.net>
parents:
1906
diff
changeset
|
45 |
