다음과 같은 문제가 있습니다. "수직"Linux 배포 (Sophos UMT)는 PostgreSQL 9.2와 함께 구성을 저장합니다. 불행히도 마지막 업데이트 이후 일부 인스턴스의 트랜잭션 로그 (WAL)가 플러시되지 않고 커지고있는 것 같습니다. 이로 인해 pg_xlog 폴더가 기본 폴더보다 몇 배 더 커집니다.
WAL 파일의 과도한 증가로 인해이 머신 중 하나 (VM)의 디스크가 월요일 전에 가득 찰 것입니다. 이미 공급 업체와 지원 사례를 열었지만 지금까지는 큰 도움이되지 않습니다 (더 큰 디스크로 VM을 다시 작성하는 것이 좋습니다).
이 데이터베이스는 소프트웨어가 다른 방식으로 백업을 수행하기 때문에 자체 백업 절차가 있고 이메일로 백업 파일을 전송하기 때문에 백업되지 않으며 WAF가 너무 커지는 이유라고 생각합니다.
PostgreSQL 전문가가 아니기 때문에 어리 석거나 명백한 질문을 할 가능성이 높지만 WAL 파일을 플러시하도록 요청하는 절차는 무엇입니까?
이상적으로는 벤더가 더 나은 수정 프로그램을 발행 할 수 있도록 충분한 시간을 확보하기 위해 문제가있는 시스템에서 이러한 WAL 파일을 플러시 할 수있는 절차를 찾고 있습니다.
편집 : 요청한대로 다음은 SELECT version();쿼리 출력입니다 .
PostgreSQL 9.2.4 on i686-pc-linux-gnu, compiled by gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973], 32-bit
(1 행)
그리고 SELECT name, current_setting(name), source
FROM pg_settings
WHERE source NOT IN ('default', 'override');쿼리
hot_standby | on | configuration file
listen_addresses | * | configuration file
log_destination | syslog | configuration file
log_min_duration_statement | -1 | configuration file
log_min_error_statement | error | configuration file
log_min_messages | notice | configuration file
maintenance_work_mem | 512MB | configuration file
max_connections | 300 | configuration file
max_files_per_process | 1000 | configuration file
max_prepared_transactions | 0 | configuration file
max_stack_depth | 2MB | configuration file
max_standby_streaming_delay | 10s | configuration file
max_wal_senders | 10 | configuration file
password_encryption | on | configuration file
pg_stat_statements.max | 1000 | configuration file
pg_stat_statements.save | on | configuration file
pg_stat_statements.track | all | configuration file
pg_stat_statements.track_utility | off | configuration file
port | 5432 | configuration file
random_page_cost | 2 | configuration file
replication_timeout | 1min | configuration file
seq_page_cost | 1 | configuration file
shared_buffers | 512MB | configuration file
shared_preload_libraries | pg_stat_statements | configuration file
ssl | off | configuration file
stats_temp_directory | pg_stat_tmp | configuration file
superuser_reserved_connections | 20 | configuration file
synchronous_commit | local | configuration file
syslog_facility | local0 | configuration file
syslog_ident | postgres | configuration file
temp_buffers | 256MB | configuration file
temp_file_limit | -1 | configuration file
TimeZone | GMT | configuration file
timezone_abbreviations | AlmostAll | configuration file
track_activities | on | configuration file
track_activity_query_size | 4096 | configuration file
track_counts | on | configuration file
track_functions | none | configuration file
track_io_timing | on | configuration file
unix_socket_directory | /var/run/postgresql | configuration file
unix_socket_group | postgres | configuration file
unix_socket_permissions | 0777 | configuration file
update_process_title | on | configuration file
vacuum_defer_cleanup_age | 0 | configuration file
wal_buffers | 16MB | configuration file
wal_keep_segments | 100 | configuration file
wal_level | hot_standby | configuration file
wal_receiver_status_interval | 5s | configuration file
work_mem | 512MB | configuration file
(69 rows)
편집 2
마지막으로 Sophos 지원팀의 요청에 따라 전체 서버를 다시 설치했지만 이전 버전과 더 큰 디스크를 사용했습니다. 분명히 이전 버전은 새 버전보다 WAL에 훨씬 적은 공간을 사용하고 있습니다.
호기심으로 인해 버전 및 7 기본이 아닌 pgsql 매개 변수에 대한 검사를 실행했으며 결과가 다릅니다.
PostgreSQL 8.4.14 on i686-pc-linux-gnu, compiled by GCC gcc (SUSE Linux) 4.3.4 [gcc-4_3-branch revision 152973], 32-bit
과
name | current_setting | source
---------------------------------+-----------------+----------------------
autovacuum_analyze_scale_factor | 0.0005 | configuration file
checkpoint_segments | 12 | configuration file
checkpoint_warning | 0 | configuration file
escape_string_warning | off | configuration file
fsync | on | configuration file
listen_addresses | * | configuration file
log_destination | syslog | configuration file
log_timezone | Europe/Zurich | command line
maintenance_work_mem | 1GB | configuration file
max_connections | 300 | configuration file
max_stack_depth | 2MB | environment variable
port | 5432 | configuration file
shared_buffers | 32MB | configuration file
standard_conforming_strings | off | configuration file
syslog_facility | local0 | configuration file
syslog_ident | postgres | configuration file
temp_buffers | 1024 | configuration file
TimeZone | UTC | configuration file
timezone_abbreviations | AlmostAll | configuration file
work_mem | 512MB | configuration file
(20 rows)
이 두 버전 사이에 많은 변화가 있었던 것처럼 보입니다.