diff options
author | Christian Grothoff <christian@grothoff.org> | 2010-08-26 23:32:10 +0000 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2010-08-26 23:32:10 +0000 |
commit | ac955dcaf0eb30869f47d6aaf3464ceaebd5fa26 (patch) | |
tree | 1d243a4ce3aeb1deb846fb960b9597e5cbcb1e91 /src/datastore | |
parent | a52fe978a15db0438ba5534e73724f6308d60330 (diff) | |
download | gnunet-ac955dcaf0eb30869f47d6aaf3464ceaebd5fa26.tar.gz gnunet-ac955dcaf0eb30869f47d6aaf3464ceaebd5fa26.zip |
stuff
Diffstat (limited to 'src/datastore')
-rw-r--r-- | src/datastore/perf_plugin_datastore_data_postgres.conf | 4 | ||||
-rw-r--r-- | src/datastore/plugin_datastore_postgres.c | 21 | ||||
-rw-r--r-- | src/datastore/test_datastore_api_data_postgres.conf | 4 |
3 files changed, 11 insertions, 18 deletions
diff --git a/src/datastore/perf_plugin_datastore_data_postgres.conf b/src/datastore/perf_plugin_datastore_data_postgres.conf index 82ee17314..c2a181bc7 100644 --- a/src/datastore/perf_plugin_datastore_data_postgres.conf +++ b/src/datastore/perf_plugin_datastore_data_postgres.conf | |||
@@ -27,7 +27,3 @@ AUTOSTART = NO | |||
27 | 27 | ||
28 | [datastore-postgres] | 28 | [datastore-postgres] |
29 | CONFIG = dbname=gnunetcheck | 29 | CONFIG = dbname=gnunetcheck |
30 | # USER = | ||
31 | # PASSWORD = | ||
32 | # HOST = | ||
33 | # PORT = | ||
diff --git a/src/datastore/plugin_datastore_postgres.c b/src/datastore/plugin_datastore_postgres.c index c3f3b9af4..889309784 100644 --- a/src/datastore/plugin_datastore_postgres.c +++ b/src/datastore/plugin_datastore_postgres.c | |||
@@ -231,7 +231,7 @@ init_connection (struct Plugin *plugin) | |||
231 | if (PQstatus (plugin->dbh) != CONNECTION_OK) | 231 | if (PQstatus (plugin->dbh) != CONNECTION_OK) |
232 | { | 232 | { |
233 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, | 233 | GNUNET_log_from (GNUNET_ERROR_TYPE_ERROR, |
234 | "postgres", | 234 | "datastore-postgres", |
235 | _("Unable to initialize Postgres: %s"), | 235 | _("Unable to initialize Postgres: %s"), |
236 | PQerrorMessage (plugin->dbh)); | 236 | PQerrorMessage (plugin->dbh)); |
237 | PQfinish (plugin->dbh); | 237 | PQfinish (plugin->dbh); |
@@ -521,7 +521,7 @@ postgres_plugin_put (void *cls, | |||
521 | plugin->payload += size; | 521 | plugin->payload += size; |
522 | #if DEBUG_POSTGRES | 522 | #if DEBUG_POSTGRES |
523 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 523 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
524 | "postgres", | 524 | "datastore-postgres", |
525 | "Stored %u bytes in database, new payload is %llu\n", | 525 | "Stored %u bytes in database, new payload is %llu\n", |
526 | (unsigned int) size, | 526 | (unsigned int) size, |
527 | (unsigned long long) plugin->payload); | 527 | (unsigned long long) plugin->payload); |
@@ -561,7 +561,7 @@ postgres_next_request_cont (void *next_cls, | |||
561 | { | 561 | { |
562 | #if DEBUG_POSTGRES | 562 | #if DEBUG_POSTGRES |
563 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 563 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
564 | "postgres", | 564 | "datastore-postgres", |
565 | "Ending iteration (%s)\n", | 565 | "Ending iteration (%s)\n", |
566 | (GNUNET_YES == nrc->end_it) ? "client requested it" : "completed result set"); | 566 | (GNUNET_YES == nrc->end_it) ? "client requested it" : "completed result set"); |
567 | #endif | 567 | #endif |
@@ -594,7 +594,7 @@ postgres_next_request_cont (void *next_cls, | |||
594 | { | 594 | { |
595 | #if DEBUG_POSTGRES | 595 | #if DEBUG_POSTGRES |
596 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 596 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
597 | "postgres", | 597 | "datastore-postgres", |
598 | "Ending iteration (postgres error)\n"); | 598 | "Ending iteration (postgres error)\n"); |
599 | #endif | 599 | #endif |
600 | nrc->iter (nrc->iter_cls, | 600 | nrc->iter (nrc->iter_cls, |
@@ -609,7 +609,7 @@ postgres_next_request_cont (void *next_cls, | |||
609 | /* no result */ | 609 | /* no result */ |
610 | #if DEBUG_POSTGRES | 610 | #if DEBUG_POSTGRES |
611 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 611 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
612 | "postgres", | 612 | "datastore-postgres", |
613 | "Ending iteration (no more results)\n"); | 613 | "Ending iteration (no more results)\n"); |
614 | #endif | 614 | #endif |
615 | nrc->iter (nrc->iter_cls, | 615 | nrc->iter (nrc->iter_cls, |
@@ -663,7 +663,7 @@ postgres_next_request_cont (void *next_cls, | |||
663 | 663 | ||
664 | #if DEBUG_POSTGRES | 664 | #if DEBUG_POSTGRES |
665 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 665 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
666 | "postgres", | 666 | "datastore-postgres", |
667 | "Found result of size %u bytes and type %u in database\n", | 667 | "Found result of size %u bytes and type %u in database\n", |
668 | (unsigned int) size, | 668 | (unsigned int) size, |
669 | (unsigned int) type); | 669 | (unsigned int) type); |
@@ -683,7 +683,7 @@ postgres_next_request_cont (void *next_cls, | |||
683 | { | 683 | { |
684 | #if DEBUG_POSTGRES | 684 | #if DEBUG_POSTGRES |
685 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 685 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
686 | "postgres", | 686 | "datastore-postgres", |
687 | "Ending iteration (client error)\n"); | 687 | "Ending iteration (client error)\n"); |
688 | #endif | 688 | #endif |
689 | return; | 689 | return; |
@@ -694,7 +694,7 @@ postgres_next_request_cont (void *next_cls, | |||
694 | { | 694 | { |
695 | #if DEBUG_POSTGRES | 695 | #if DEBUG_POSTGRES |
696 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 696 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
697 | "postgres", | 697 | "datastore-postgres", |
698 | "Deleting %u bytes from database, current payload is %llu\n", | 698 | "Deleting %u bytes from database, current payload is %llu\n", |
699 | (unsigned int) size, | 699 | (unsigned int) size, |
700 | (unsigned long long) plugin->payload); | 700 | (unsigned long long) plugin->payload); |
@@ -703,7 +703,7 @@ postgres_next_request_cont (void *next_cls, | |||
703 | plugin->payload -= size; | 703 | plugin->payload -= size; |
704 | #if DEBUG_POSTGRES | 704 | #if DEBUG_POSTGRES |
705 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, | 705 | GNUNET_log_from (GNUNET_ERROR_TYPE_DEBUG, |
706 | "postgres", | 706 | "datastore-postgres", |
707 | "Deleted %u bytes from database, new payload is %llu\n", | 707 | "Deleted %u bytes from database, new payload is %llu\n", |
708 | (unsigned int) size, | 708 | (unsigned int) size, |
709 | (unsigned long long) plugin->payload); | 709 | (unsigned long long) plugin->payload); |
@@ -1220,7 +1220,8 @@ libgnunet_plugin_datastore_postgres_init (void *cls) | |||
1220 | api->iter_all_now = &postgres_plugin_iter_all_now; | 1220 | api->iter_all_now = &postgres_plugin_iter_all_now; |
1221 | api->drop = &postgres_plugin_drop; | 1221 | api->drop = &postgres_plugin_drop; |
1222 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, | 1222 | GNUNET_log_from (GNUNET_ERROR_TYPE_INFO, |
1223 | "postgres", _("Postgres database running\n")); | 1223 | "datastore-postgres", |
1224 | _("Postgres database running\n")); | ||
1224 | return api; | 1225 | return api; |
1225 | } | 1226 | } |
1226 | 1227 | ||
diff --git a/src/datastore/test_datastore_api_data_postgres.conf b/src/datastore/test_datastore_api_data_postgres.conf index 0bc55852e..b370c5cbb 100644 --- a/src/datastore/test_datastore_api_data_postgres.conf +++ b/src/datastore/test_datastore_api_data_postgres.conf | |||
@@ -37,10 +37,6 @@ BINARY = gnunet-service-datastore | |||
37 | 37 | ||
38 | [datastore-postgres] | 38 | [datastore-postgres] |
39 | CONFIG = dbname=gnunetcheck | 39 | CONFIG = dbname=gnunetcheck |
40 | # USER = | ||
41 | # PASSWORD = | ||
42 | # HOST = | ||
43 | # PORT = | ||
44 | 40 | ||
45 | [statistics] | 41 | [statistics] |
46 | PORT = 22667 | 42 | PORT = 22667 |