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)
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);
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);
}
uint64_t paramPlaceID;
uint64_t place_id;
time_t updateStartTime;
- uint table;
+ unsigned table;
- table = (uint)(thread_data->table);
+ table = thread_data->table;
while (1)
{