]> git.openstreetmap.org Git - nominatim.git/blobdiff - nominatim/index.c
use json_encode in search stuff as well
[nominatim.git] / nominatim / index.c
index b6dd7236e0df0b622b301fe9f2f375f77330c0f3..9667e50565e4ea1e96b6fc7e2bcd056bb0876f71 100644 (file)
@@ -127,13 +127,13 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co
         }
         PQclear(res);
 
-        res = PQexec(thread_data[i].conn, "set enable_seqscan = false");
+        /*res = PQexec(thread_data[i].conn, "set enable_seqscan = false");
         if (PQresultStatus(res) != PGRES_COMMAND_OK)
         {
             fprintf(stderr, "Failed disabling sequential scan: %s\n", PQerrorMessage(conn));
             exit(EXIT_FAILURE);
         }
-        PQclear(res);
+        PQclear(res);*/
 
         nominatim_exportCreatePreparedQueries(thread_data[i].conn);
     }
@@ -145,7 +145,7 @@ void nominatim_index(int rank_min, int rank_max, int num_threads, const char *co
         writer = nominatim_exportXMLStart(structuredoutputfile);
     }
 
-    fprintf(stderr, "Starting indexing rank (%i to %i) using %i treads\n", rank_min, rank_max, num_threads);
+    fprintf(stderr, "Starting indexing rank (%i to %i) using %i threads\n", rank_min, rank_max, num_threads);
 
     for (rank = rank_min; rank <= rank_max; rank++)
     {
@@ -359,7 +359,7 @@ void *nominatim_indexThread(void * thread_data_in)
                        done = 1;
                else
                {
-                       if (strncmp(PQerrorMessage(thread_data->conn), "ERROR:  deadlock detected", 25))
+                       if (!strncmp(PQerrorMessage(thread_data->conn), "ERROR:  deadlock detected", 25))
                        {
                            fprintf(stderr, "index_placex: UPDATE failed - deadlock, retrying (%ld)\n", place_id);
                            PQclear(res);