For various reasons I've migrated my database schema from 4 tables with some additional indexes to keep integrity and stuff to 1 table only. That made some of the former used indexes obsolete and resulted in overall less consumed storage:
The old schema consumed ~42 GiB, while the new is ~16 GiB without the formerly available indexes and ~25 GiB with the same logical indexes. Though, a created dump of the new schema has increased from ~5,52 GiB to 6,38 GiB. Of course I'm using the same settings to create both dumps:
pg_dump.exe "--username=%USERNAME%" "--encoding=UTF-8" "--compress=9" "--format=c" "--dbname=%DB_NAME%" > "%DMP_PATH%"
My expectation was that the dump would be smaller as well, because the data itself is the same, while lots of duplicate IDs, obsolete indexes etc. in not available tables anymore have been removed.
Any explanation for the increased dump size? Thanks!
The tables themself were changed like the following:
CREATE TABLE clt_rec ( id bigserial NOT NULL, oms_rec bigint NOT NULL, captured_at timestamp with time zone NOT NULL, rssi smallint NOT NULL );
CREATE TABLE oms_rec ( id bigserial NOT NULL, meter integer NOT NULL, encrypted bytea, decrypted bytea );
CREATE TABLE clt_rec_src ( id bigserial NOT NULL, real_estate integer NOT NULL, collector integer NOT NULL, clt_rec bigserial );
CREATE TABLE meter_status_history ( id serial NOT NULL, oms_rec bigint NOT NULL, status smallint );
CREATE TABLE datagram ( id bigserial NOT NULL, src_re integer NOT NULL, src_clt integer NOT NULL, src_meter integer NOT NULL, captured_at timestamp with time zone NOT NULL, captured_rssi smallint NOT NULL, oms_status smallint NOT NULL, oms_enc bytea, oms_dec bytea );