~launchpad-pqm/launchpad/devel

« back to all changes in this revision

Viewing changes to database/replication/helpers.py

[r=stub][bug=778338] Transient tables created by Multitable Copy
 should not be replicated

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'