[pgrouting-users] best/fastest way to calculate thousands of trsp routes
lr at pcorp.us
Fri Apr 28 07:28:52 PDT 2017
To avoid any issues with the upgrade machinery, especially since you are
coming from such an old version, I would do
DROP EXTENSION pgRouting;
CREATE EXTENSION pgRouting VERSION "2.4.1";
Doing DROP EXTENSION without doing CASCADE is pretty safe. It will bail out
if any of your tables, views, etc have dependencies on pgRouting functions
/types and will tell you what you need to temporarily backup and drop for it
If you don't have such dependencies (which is usually the case), the drop
will run fine.
Now it won't catch things like dependencies within plpgsql functions. This
is fine since the recreate extension should put most / if not all of them
This feature also allows you to downgrade. Note that the upgrade machinery
doesn't allow downgrading.
I use this approach all the time for quickly swapping between newer and
older / older and newer pgRouting versions to spot regression issues.
So to downgrade you'd do
DROP EXTENSION pgRouting
CREATE EXTENSION pgRouting VERSION "2.1.0";
The nice thing is since the dlls in 2.4.1 are versioned (I forget if they
were in 2.1.0) and dependencies are the same (you'll want to use the boost
and cgal libs from 2.4 since I think the boost and CGAL I ship is newer than
what I shipped with 2.1 but downward compatible with older), both versions
can coexist on the same PostgreSQL cluster, though you can have only one
version installed in any given database.
Hope that helps,
>Vicky Vergara vicky at georepublic.de
> Wed Apr 26 11:37:46 PDT 2017
> Please, save all your tables, views, functions, etc before upgrading,
> is a bug on the upgrading script that hasnt being fix, (recently found it)
> On Wed, Apr 26, 2017 at 3:55 AM, McDonaldR <McDonaldR at angus.gov.uk>
>> Wow! Thanks for that, Regina.
>> I've downloaded the file and will apply it as soon as I can.
>> Most of my pgRouting work has been done on 2.1 so it will be good see how
>> much has changed in 2.4.
More information about the Pgrouting-users