1. Jan 13, 2022
  2. Jan 12, 2022
    • Dimitri Fontaine's avatar
      make build · e8a2c7ef
      Dimitri Fontaine authored
      e8a2c7ef
    • Dimitri Fontaine's avatar
      Introduce --drop-if-exists (and PGCOPYDB_DROP_IF_EXISTS). · 18096f4f
      Dimitri Fontaine authored
      This allows using pg_restore --clean --if-exists, which drops target objects
      before creating them again. This is useful to run the pgcopydb command again
      and again.
      18096f4f
    • Dimitri Fontaine's avatar
      Use on-disk size to order the source tables. · 38e6d555
      Dimitri Fontaine authored
      The estimated row counts found in pg_catalog.pg_class.reltuples is only
      meaningful when ANALYZE was run recently enough, or at all, otherwise all
      the tables are reporting zero there.
      
      Instead, let's use pg_table_size() result. It's not that expensive to get.
      38e6d555
    • Dimitri Fontaine's avatar
      Review the CLI. · 0a8fbbad
      Dimitri Fontaine authored
      The new commands make more sense now. We got rid of the non-implemented
      per-table operation modes that aren't interesting anyway, and implement
      actually interesting sub-commands now with the schema manipulation bits.
      
        pgcopydb
          copy-db  Copy an entire database from source to target
        + dump     Dump database objects from a Postgres instance
        + restore  Restore database objects into a Postgres instance
        + list     List database objects from a Postgres instance
          help     print help message
          version  print pgcopydb version
      
        pgcopydb dump
          schema     Dump source database schema as custom files in target directory
          pre-data   Dump source database pre-data schema as custom files in target directory
          post-data  Dump source database post-data schema as custom files in target directory
      
        pgcopydb restore
          schema     Restore a database schema from custom files to target database
          pre-data   Restore a database pre-data schema from custom file to target database
          post-data  Restore a database post-data schema from custom file to target database
      
        pgcopydb list
          tables   List all the source tables to copy data from
          indexes  List all the indexes to create again after copying the data
      0a8fbbad
  3. Jan 11, 2022
  4. Jan 10, 2022
  5. Jan 08, 2022
    • Dimitri Fontaine's avatar
      Implement some tests, using pagila. · 26acab11
      Dimitri Fontaine authored
      This is a first step towards automated testing. Two Postgres instances are
      deployed, the pagila database is deployed in the source instance and then
      copied over to the target instance using pgcopydb.
      
      The next step consists of using a Postgres schema diff tool to check that
      the source and target schemas are indeed the same.
      26acab11
    • Dimitri Fontaine's avatar
      Bug fix: table/index jobs environment variable parsing. · d66ebc87
      Dimitri Fontaine authored
      This is a classic copy/paste bug where the wrong variable name is used, and
      because getopt makes the variable a global (well, I think that's what is
      happening here) it compiles clean anyway. Oops.
      
      Found while preparing some tests, which shows how much we need them...
      d66ebc87
    • Dimitri Fontaine's avatar
      Add a Dockerfile. · 1d1ef2b8
      Dimitri Fontaine authored
      This allows building pgcopydb for debian, and the commit includes some
      clean-up needed for Linux compatibility (missing headers, extra warnings).
      1d1ef2b8
  6. Jan 07, 2022
  7. Jan 06, 2022
  8. Jan 05, 2022
  9. Jan 04, 2022
  10. Jan 03, 2022
  11. Dec 24, 2021
  12. Dec 23, 2021
  13. Dec 22, 2021