[pgrouting-users] ERROR: relation with OID 156906 does not exist

Stephen Woodbridge woodbri at swoodbridge.com
Wed Sep 17 16:30:19 EDT 2008

Hi all,

I have run into a really annoying issue. When I want to rebuild the 
vertices_tmp table. I do something like:

drop index source_idx;
drop index target_idx;
update st set source=null, target=null;
delete from geometry_columns where f_table_name='vertices_tmp';
vacuum analyze;

select assign_vertex_id('st', 0.0000005, 'the_geom', 'gid');
create unique index vertices_tmp_id_idx on vertices_tmp using btree(id);
create index source_idx on st using btree(source);
create index target_idx on st using btree(target);
vacuum analyze;

But I get this error:

routing=# select assign_vertex_id('st', 0.0000005, 'the_geom', 'gid');
NOTICE:  CREATE TABLE will create implicit sequence 
"vertices_tmp_id_seq" for serial column "vertices_tmp.id"
CONTEXT:  SQL statement "CREATE TABLE vertices_tmp (id serial)"
PL/pgSQL function "assign_vertex_id" line 21 at execute statement
ERROR:  relation with OID 156906 does not exist
CONTEXT:  SQL statement "SELECT id, the_geom FROM vertices_tmp WHERE 
expand( $1 ,  $2 ) && the_geom and distance(the_geom,  $1 ) <  $2 "
PL/pgSQL function "point_to_id" line 7 at SQL statement
PL/pgSQL function "assign_vertex_id" line 61 at assignment

The only way I have found to clear this error and get things to run 
again, is to reload function assign_vertex_id().

What is causing it? and how can I avoid it in the future?


More information about the Pgrouting-users mailing list