~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/helpers.py

  • Committer: Stuart Bishop
  • Date: 2011-05-12 07:56:18 UTC
  • mto: This revision was merged to the branch mainline in revision 13034.
  • Revision ID: stuart.bishop@canonical.com-20110512075618-e65uqdq8ren6ipsj
Replication should ignore tables and sequences with names starting with 'temp_'

Show diffs side-by-side

added added

removed removed

Lines of Context:
473
473
    all_tables = all_tables_in_schema(cur, 'public')
474
474
    all_sequences = all_sequences_in_schema(cur, 'public')
475
475
 
 
476
    # Ignore any tables and sequences starting with temp_. These are
 
477
    # transient and not to be replicated per Bug #778338.
 
478
    all_tables = set(
 
479
        table for table in all_tables
 
480
            if not table.startswith('public.temp_'))
 
481
    all_sequences = set(
 
482
        sequence for sequence in all_sequences
 
483
            if not sequence.startswith('public.temp_'))
 
484
 
476
485
    cur.execute("""
477
486
        SELECT tab_nspname, tab_relname FROM %s
478
487
        WHERE tab_nspname = 'public'