
= Live londiste upgrade =

It is possible to upgrade +londiste+ software without having to stop the service,
how to do so depends on specifics versions you're upgrading from and to.

This document list steps to follow once the new version of +skytools+ package is
installed on the provider and subscriber hosts where to operate a live upgrade.

As the +skytools+ software contains code which is run directly from inside the
database server (+PostgreSQL+ functions), installing the new package version at
the OS level is not enough to perform the upgrade.

The following sections list the manual steps to perform in order to upgrade a
running londiste and PgQ solution at the database side.


== upgrading from 2.1.5 to 2.1.6 ==

First, +PgQ+ software has to be upgraded. It often is installed on the provider
side of your replication setup, and runs on the provider host.

Then +londiste+ database functions have to be updated too, which are run on
both provider and subscriber. You need to repeat the londiste steps for each and
every running subscriber.


=== PgQ upgrade ===

 * PgQ (used on Londiste provider side), table structure, plpgsql functions:

   $ psql dbname -f upgrade/final/v2.1.5.pgq_core.sql

 * PgQ new insert_event(), written in C:

    $ psql dbname -f sql/pgq/lowlevel/pgq_lowlevel.sql

 * PgQ new triggers (sqltriga, logtriga, logutriga), written in C:

    $ psql dbname -f sql/pgq/triggers/pgq_triggers.sql

=== Londiste upgrade ===

 * Londiste (both provider and subscriber side)

    $ psql dbname -f upgrade/final/v2.1.5.londiste.sql

 * pgq_ext:

    $ psql dbname -f upgrade/final/v2.1.5.pgq_ext.sql


