diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-03-09 00:15:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-03-09 00:15:54 +0100 |
commit | 99350928f4087a116de62350d7d3f293e50e468c (patch) | |
tree | 84f143effd684bfda4447c11fb256e7ec65d6243 | |
parent | 4bf28bcaa25b8da6c28520a1aa18275dbe5f27a4 (diff) | |
download | gnunet-99350928f4087a116de62350d7d3f293e50e468c.tar.gz gnunet-99350928f4087a116de62350d7d3f293e50e468c.zip |
we use CREATE INDEX IF NOT EXITS, this requires postgres>=9.6, bump dependency requirements
-rw-r--r-- | README | 4 | ||||
-rw-r--r-- | configure.ac | 2 | ||||
-rw-r--r-- | po/POTFILES.in | 2 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 18 |
4 files changed, 17 insertions, 9 deletions
@@ -13,7 +13,7 @@ worldwide group of independent free software developers. GNUnet is a | |||
13 | GNU package (http://www.gnu.org/). | 13 | GNU package (http://www.gnu.org/). |
14 | 14 | ||
15 | This is an ALPHA release. There are known and significant bugs as | 15 | This is an ALPHA release. There are known and significant bugs as |
16 | well as many missing features in this release. | 16 | well as many missing features in this release. |
17 | 17 | ||
18 | Additional documentation about GNUnet can be found at | 18 | Additional documentation about GNUnet can be found at |
19 | https://gnunet.org/. | 19 | https://gnunet.org/. |
@@ -42,7 +42,7 @@ These are the direct dependencies for running GNUnet: | |||
42 | - libltdl >= 2.2 (part of GNU libtool) | 42 | - libltdl >= 2.2 (part of GNU libtool) |
43 | - sqlite >= 3.8 (default database, required) | 43 | - sqlite >= 3.8 (default database, required) |
44 | - mysql >= 5.1 (alternative to sqlite) | 44 | - mysql >= 5.1 (alternative to sqlite) |
45 | - postgres >= 8.3 (alternative to sqlite) | 45 | - postgres >= 9.6 (alternative to sqlite) |
46 | - libopus >= 1.0.1 (optional for experimental conversation tool) | 46 | - libopus >= 1.0.1 (optional for experimental conversation tool) |
47 | - libpulse >= 2.0 (optional for experimental conversation tool) | 47 | - libpulse >= 2.0 (optional for experimental conversation tool) |
48 | - libogg >= 1.3.0 (optional for experimental conversation tool) | 48 | - libogg >= 1.3.0 (optional for experimental conversation tool) |
diff --git a/configure.ac b/configure.ac index 9fa620128..273301f1b 100644 --- a/configure.ac +++ b/configure.ac | |||
@@ -818,7 +818,7 @@ CPPFLAGS=$SAVE_CPPFLAGS | |||
818 | postgres=false | 818 | postgres=false |
819 | # even running the check for postgres breaks emscripten ... | 819 | # even running the check for postgres breaks emscripten ... |
820 | if test "$taler_only" != yes; then | 820 | if test "$taler_only" != yes; then |
821 | AX_LIB_POSTGRESQL([]) | 821 | AX_LIB_POSTGRESQL([9.6]) |
822 | if test "$found_postgresql" = "yes"; then | 822 | if test "$found_postgresql" = "yes"; then |
823 | CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" | 823 | CPPFLAGS="$CPPFLAGS $POSTGRESQL_CPPFLAGS" |
824 | AC_CHECK_HEADERS([libpq-fe.h], | 824 | AC_CHECK_HEADERS([libpq-fe.h], |
diff --git a/po/POTFILES.in b/po/POTFILES.in index 6c156336b..aea7d5ef7 100644 --- a/po/POTFILES.in +++ b/po/POTFILES.in | |||
@@ -311,6 +311,7 @@ src/rest/gnunet-rest-server.c | |||
311 | src/rest/rest.c | 311 | src/rest/rest.c |
312 | src/revocation/gnunet-revocation.c | 312 | src/revocation/gnunet-revocation.c |
313 | src/revocation/gnunet-service-revocation.c | 313 | src/revocation/gnunet-service-revocation.c |
314 | src/revocation/plugin_block_revocation.c | ||
314 | src/revocation/revocation_api.c | 315 | src/revocation/revocation_api.c |
315 | src/rps/gnunet-rps.c | 316 | src/rps/gnunet-rps.c |
316 | src/rps/gnunet-service-rps.c | 317 | src/rps/gnunet-service-rps.c |
@@ -339,6 +340,7 @@ src/set/gnunet-set-ibf-profiler.c | |||
339 | src/set/gnunet-set-profiler.c | 340 | src/set/gnunet-set-profiler.c |
340 | src/set/ibf.c | 341 | src/set/ibf.c |
341 | src/set/ibf_sim.c | 342 | src/set/ibf_sim.c |
343 | src/set/plugin_block_set_test.c | ||
342 | src/set/set_api.c | 344 | src/set/set_api.c |
343 | src/social/gnunet-service-social.c | 345 | src/social/gnunet-service-social.c |
344 | src/social/gnunet-social.c | 346 | src/social/gnunet-social.c |
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index 7b04cc68a..8b8737935 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -114,13 +114,17 @@ init_connection (struct Plugin *plugin) | |||
114 | if (PQresultStatus (ret) == PGRES_COMMAND_OK) | 114 | if (PQresultStatus (ret) == PGRES_COMMAND_OK) |
115 | { | 115 | { |
116 | if ((GNUNET_OK != | 116 | if ((GNUNET_OK != |
117 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || | 117 | GNUNET_POSTGRES_exec (plugin->dbh, |
118 | "CREATE INDEX IF NOT EXISTS idx_hash ON gn090 (hash)")) || | ||
118 | (GNUNET_OK != | 119 | (GNUNET_OK != |
119 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || | 120 | GNUNET_POSTGRES_exec (plugin->dbh, |
121 | "CREATE INDEX IF NOT EXISTS idx_hash_vhash ON gn090 (hash,vhash)")) || | ||
120 | (GNUNET_OK != | 122 | (GNUNET_OK != |
121 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || | 123 | GNUNET_POSTGRES_exec (plugin->dbh, |
124 | "CREATE INDEX IF NOT EXISTS idx_prio ON gn090 (prio)")) || | ||
122 | (GNUNET_OK != | 125 | (GNUNET_OK != |
123 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || | 126 | GNUNET_POSTGRES_exec (plugin->dbh, |
127 | "CREATE INDEX IF NOT EXISTS idx_expire ON gn090 (expire)")) || | ||
124 | (GNUNET_OK != | 128 | (GNUNET_OK != |
125 | GNUNET_POSTGRES_exec (plugin->dbh, | 129 | GNUNET_POSTGRES_exec (plugin->dbh, |
126 | "CREATE INDEX IF NOT EXISTS idx_prio_anon ON gn090 (prio,anonLevel)")) || | 130 | "CREATE INDEX IF NOT EXISTS idx_prio_anon ON gn090 (prio,anonLevel)")) || |
@@ -128,9 +132,11 @@ init_connection (struct Plugin *plugin) | |||
128 | GNUNET_POSTGRES_exec (plugin->dbh, | 132 | GNUNET_POSTGRES_exec (plugin->dbh, |
129 | "CREATE INDEX IF NOT EXISTS idx_prio_hash_anon ON gn090 (prio,hash,anonLevel)")) || | 133 | "CREATE INDEX IF NOT EXISTS idx_prio_hash_anon ON gn090 (prio,hash,anonLevel)")) || |
130 | (GNUNET_OK != | 134 | (GNUNET_OK != |
131 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || | 135 | GNUNET_POSTGRES_exec (plugin->dbh, |
136 | "CREATE INDEX IF NOT EXISTS idx_repl_rvalue ON gn090 (repl,rvalue)")) || | ||
132 | (GNUNET_OK != | 137 | (GNUNET_OK != |
133 | GNUNET_POSTGRES_exec (plugin->dbh, "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) | 138 | GNUNET_POSTGRES_exec (plugin->dbh, |
139 | "CREATE INDEX IF NOT EXISTS idx_expire_hash ON gn090 (expire,hash)"))) | ||
134 | { | 140 | { |
135 | PQclear (ret); | 141 | PQclear (ret); |
136 | PQfinish (plugin->dbh); | 142 | PQfinish (plugin->dbh); |