Skip to content

perf: Set tables UNLOGGED before converter COPY in direct-PG mode #30

@jakebromberg

Description

@jakebromberg

Problem

The UNLOGGED table optimization (PR #29) was only applied in `_run_database_build_post_import`, which runs after the Rust converter has already finished writing millions of rows via COPY to LOGGED tables. The heaviest I/O phase (bulk COPY) was still writing WAL.

Solution

Move `set_tables_unlogged` into `_run_xml_pipeline` before the converter call, so the converter's COPY operations target UNLOGGED tables. Remove the redundant call from `_run_database_build_post_import`.

Combined with WXYC/discogs-xml-converter's batch size increase (10K -> 100K), this should significantly reduce the direct-PG pipeline runtime.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions