Advent Calendar 2022 17

?


PostgreSQL 13
DB
PostgreSQL 15
DB
PostgreSQL 使 Pleroma/Rokoucha
PostgreSQL Pleroma Podman
VACUUM

1
2022-11-27 PostgreSQL 13 PostgreSQL 15
postgres_exporter 使 pg_upgrade
pg_dump pg_restore
pg_restore
_
pg_restore: while PROCESSING TOC:
pg_restore: from TOC entry 3507; 1259 95573 INDEX counter_cache_instance_index pleroma
pg_restore: error: could not execute query: ERROR: could not create unique index "counter_cache_instance_index"
DETAIL: Key (instance)=(example.com) is duplicated.
Command was: CREATE UNIQUE INDEX counter_cache_instance_index ON public.counter_cache USING btree (instance);
INDEX
20193?
INDEX
INDEX 1
INDEX 10

2
2022-12-04 VACUUM FULL DB
VACUUM FULL Pleroma
/dev/shm VACUUM
IPC
PostgreSQL
worker segfault
_
LOG: server process (PID 123) was terminated by signal 11: Segmentation fault
DETAIL: Failed process was running: COMMIT
LOG: terminating any other active server processes
WARNING: terminating connection because of crash of another server process
DETAIL: The postmaster has commanded this server process to roll back the current transaction and exit, because another server process exited abnormally and possibly corrupted shared memory.
JSONB JSONB
VACUUM

3
Pleroma !
2022-12-05 REINDEX
2022-12-07
VACUUM ANALYZE
pg_dump pg_restore
>@rokoucha:
>
>@rokoucha: PostgreSQL INDEX 8
>
>@rokoucha: PostgreSQL INDEX !!!!!!!!!!!!!!!!
REINDEX !
_
pg_restore: creating INDEX "public.objects_fts"
pg_restore: from TOC entry 3754; 1259 41869 INDEX objects_fts pleroma
pg_restore: error: could not execute query: ERROR: invalid byte sequence for encoding "UTF8": 0xe6 0xad 0x10

2022-12-112022-12-07 PostgreSQL
>@rokoucha: VACUUM FULL VACUUM ANALYZE 1
使
Pleroma
UNIQUE CONSTRAIT
!!!
VACUUM ANALYZE
! 10
VACUUM FULL
!
20GB DB 9GB

?
PostgreSQL
INDEX
?
pg_dump
pg_restore
VACUUM FULL
調
?
!

(3!)
!

Pleroma VACUUM

2022-12-24
Pleroma ANALYZE !!!!!!!!