
= Skytools ToDo list =

== Next minor release - 2.1.5 ==

=== Done ===

 * londiste fkeys: look also at dependers not only dependencies.
 * pgq.consumer: make queue seeking in case of failover more strict.
 * scriptmgr: dont die on user error.
 * pgq: there was still fallout from reorg - 2 missing indexes.
 * Due to historical reasons SerialConsumer (and thus Londiste)
   accessed completed tick table directly, not via functions.
   Make it use functions again.
 * Support psycopg2, preferring it to psycopg1.
 * Improved bulk_loader, using temp tables exclusively.
 * skytools.config: API change to allow usage without config file.
 * quote_ident(), quote_fqident()
 * Rewrite pgq.insert_event() in C, thus PgQ core is not
   dependant on PL/Python anymore.
 * set client_encoding on subscriber same as on provider
 * Write PgQ triggers (pgq.logtriga(), pgq.logutriga(), pgq.sqltriga()) in C.
 * londiste: remove tbl should work also if table is already dropped [dimitri]
 * install .sql files under share/skytools in addition to contrib/ [marko]
 * pgq: pgqadm also vacuums londiste and pgq_ext tables, if they exist
 * londiste: provider add/remove --all [hans]
 * londiste: remove denytrigger from source, thus no plpython anymore...
   it was unused anyway.
 * replace logtriga() with pgq.logtriga() for londiste trigger
 * backend modules need to be ported to 8.3
 * londiste: good fkey support: store them in subscriber db and apply when both tables are in sync. [erik]
 * document add-seq, remove-seq
 * pgq/londiste/pgq_ext: schema upgrade scripts  [marko]
 * pgq: fetch events from batch via cursor, thus allowing larger batches
 * londiste: trigger handling [erik]
 * txid: use bsearch() on larger snapshots

=== To Do ===

 * -rc1 for testing
 * trigger docs

== Next major release - 2.2 ==

 * cascaded replication, switchover, failover [marko]
 * skytools: config from database
 * drop support for psycopg1
 * drop support for 8.1?

== High-prority ==

=== Larger things ===

 * docs: londiste, pgq/python, pgq/sql, skytools, walmgr

=== Smaller things ===

 * pgq: RemoteConsumer/SerialConsumer/pgq_ext sanity, too much duplication [marko]
 * londiste: create tables on subscriber
 * pgqadm: Utility commands:
  - reg-copy que cons1 cons2
  - reg-move que cons1 cons2
  - queue-rename
  - show-batch-events
  - del-event
 * londiste: londiste status cmd
  - check what modules are installed
  - check if replay is running (lag?)
  - check if copy is running (lag?)
  - count of tables done, count of unsynced
  - table in the middle of copy

== Low-priority ==

=== Larger things ===

 * londiste: denytriggers on subscriber
 * londiste: Quote SQL identifiers, keep combined name, rule will be "Split schema as first dot"
 * skylog: publish sample logdb schema, with some tools
 * londiste: allow table redirection on subscriber side

=== Smaller things ===

 * londiste: make sure unprivileged provider connection works for ordinery replication,
   but not for admin commands.  Need to remove SECURITY DEFINER from londiste
   admin functions (both provider and subscriber, because londiste needs admin
   rights on subscriber anyway).
 * pgqadm: separate priod for retry queue processing
 * skytools: switch for silence for cron scripts
 * pgq: drop_fkeys.sql for live envs
 * logdb: hostname
 * DBScript: failure to write pidfile should be logged (cronscripts)
 * ideas from SlonyI:
  - force timestamps to ISO
  - when buffering queries, check their size
  - store event_id with tick, thus making possible to guess the size of
    upcoming batches.
 * pgqadm: show count of events to be processed [--count switch].
   it should be relatively cheap with optimized query if consumers are not lagging.
   - exact method - `SELECT count(*) FROM pgq.event_X WHERE NOT txid_in_snapshot(ev_txid, last_tick_snapshot) AND ev_txid > xmin;`
     Can be optimized: `(ev_txid > xmax OR ev_txid IN get_snapshot_active())`.
     Several consumer can be done in one go if spread out to separate columns.
   - inexact method: take ev_id near xmax and compare with value from sequence
     * broken by retry events, rollbacked transactions and use of force_tick()
 * automatic "repair" - after reaching sync point, the "replay" must be killed/paused, then fixes can be applied
 * pgq: sqltriga/logtriga - dont cache table struct?

== Just ideas ==

 * skytools: config-less operation?
 * skytools: partial sql parser for log processing
 * londiste: EXECUTE SCRIPT
 * londiste: somehow automatic sync of table structure/functions/...?

== walmgr ==

(walmgr needs thorough review of pending issues)

 * copy master config to slave
 * slave needs to decide which config to use


