Search code examples
databasedatabase-administrationdatabase-backupsgreenplum

Incremental backup of greenplum database not working


In greenplum database while using gpbackup utility, I understand the heap tables, even when partitioned take full backup of the table even when we take incremental backup. But if I create the primary key or index on the heap table, shouldn't it start behaving as an append organized table? But it still takes full backup when --incremental is specified. Any reason for that?


Solution

  • gpcrondump utility only compares the state of each table in the database against the last backup using state files. If there is any change in the state of the table since the last backup, it is marked dirty and is backed up during an incremental backup.

    At the file level, heap tables, when vacuumed, have empty tuple slots that are filled by the next available tuple -- as soon as that slot is filled, that whole file has been modified.

    As such, gpcrondump can only take incremental backups of "append-only" tables.

    I would take a look at gpbackup - which has incremental backups on the roadmap and currently is operating much faster than gpcrondump for most backup operations.