X-Git-Url: https://git.openstreetmap.org./nominatim.git/blobdiff_plain/234b1b0293aff8fe8bd13df986805e7d1b39bca2..7ea1ef3feb587b58f74784e6802c2e74d90e22cc:/nominatim/index.c diff --git a/nominatim/index.c b/nominatim/index.c index 90a3abea..ab87bdca 100644 --- a/nominatim/index.c +++ b/nominatim/index.c @@ -218,7 +218,7 @@ struct index_thread_data * thread_data, const char *structuredoutputfile) usleep(1000); // Aim for one update per second - if (sleepcount++ > 500) + if (sleepcount++ > 1000) { rankPerSecond = ((float)rankCountTuples + (float)count) / MAX(difftime(time(0), rankStartTime),1); if(interpolation) @@ -376,7 +376,7 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co 1, pg_prepare_params); if (PQresultStatus(res) != PGRES_COMMAND_OK) { - fprintf(stderr, "Failed preparing index_placex: %s\n", PQerrorMessage(conn)); + fprintf(stderr, "Failed preparing index_placex: %s\n", PQerrorMessage(thread_data[i].conn)); exit(EXIT_FAILURE); } PQclear(res); @@ -387,18 +387,19 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co 1, pg_prepare_params); if (PQresultStatus(res) != PGRES_COMMAND_OK) { - fprintf(stderr, "Failed preparing index_osmline: %s\n", PQerrorMessage(conn)); + fprintf(stderr, "Failed preparing index_osmline: %s\n", PQerrorMessage(thread_data[i].conn)); exit(EXIT_FAILURE); } PQclear(res); - /*res = PQexec(thread_data[i].conn, "set enable_seqscan = false"); + // Make sure the error message is not localized as we parse it later. + res = PQexec(thread_data[i].conn, "SET lc_messages TO 'C'"); if (PQresultStatus(res) != PGRES_COMMAND_OK) { - fprintf(stderr, "Failed disabling sequential scan: %s\n", PQerrorMessage(conn)); + fprintf(stderr, "Failed to set langauge: %s\n", PQerrorMessage(thread_data[i].conn)); exit(EXIT_FAILURE); } - PQclear(res);*/ + PQclear(res); nominatim_exportCreatePreparedQueries(thread_data[i].conn); }