{"id":49634252,"url":"https://github.com/pg-expecto/pg_expecto","last_synced_at":"2026-05-05T14:02:27.803Z","repository":{"id":321731196,"uuid":"1086938376","full_name":"pg-expecto/pg_expecto","owner":"pg-expecto","description":"Комплекс pg_expecto для статистического анализа производительности и нагрузочного тестирования  СУБД PostgreSQL","archived":false,"fork":false,"pushed_at":"2026-05-03T12:36:20.000Z","size":784,"stargazers_count":21,"open_issues_count":2,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2026-05-03T14:24:25.833Z","etag":null,"topics":["load-testing","performance","performance-analysis","performance-monitoring","performance-testing","postgresql","statistical-analysis","statistics"],"latest_commit_sha":null,"homepage":"https://dzen.ru/kznalp","language":"PLpgSQL","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/pg-expecto.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-10-31T06:03:51.000Z","updated_at":"2026-05-03T12:36:24.000Z","dependencies_parsed_at":"2025-10-31T08:26:36.957Z","dependency_job_id":null,"html_url":"https://github.com/pg-expecto/pg_expecto","commit_stats":null,"previous_names":["pg-expecto/pg_expecto"],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/pg-expecto/pg_expecto","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pg-expecto%2Fpg_expecto","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pg-expecto%2Fpg_expecto/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pg-expecto%2Fpg_expecto/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pg-expecto%2Fpg_expecto/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/pg-expecto","download_url":"https://codeload.github.com/pg-expecto/pg_expecto/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/pg-expecto%2Fpg_expecto/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32652474,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-05T11:29:49.557Z","status":"ssl_error","status_checked_at":"2026-05-05T11:29:48.587Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["load-testing","performance","performance-analysis","performance-monitoring","performance-testing","postgresql","statistical-analysis","statistics"],"created_at":"2026-05-05T14:01:25.662Z","updated_at":"2026-05-05T14:02:27.797Z","avatar_url":"https://github.com/pg-expecto.png","language":"PLpgSQL","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pg_expecto – Статистический анализ производительности и ожиданий СУБД PostgreSQL\n\n**pg_expecto** – это комплексный инструмент для глубокого статистического анализа и тестирования производительности PostgreSQL. Релиз знаменует появление мощного и свободно распространяемого решения для администраторов баз данных и разработчиков.\n\nОсновная задача pg_expecto – предоставить администраторам и разработчикам инструментарий для выявления узких мест и оптимизации работы PostgreSQL. В отличие от некоторых современных решений, pg_expecto сознательно фокусируется на надёжных и проверенных статистических методах, что обеспечивает полный контроль и прозрачность процесса анализа.\n\n## Ключевые особенности\n\n- **Всесторонний статистический и корреляционный анализ** – глубокий анализ производительности PostgreSQL и событий ожидания (`wait_event_type` / `wait_event`), установление корреляции между внутренним состоянием СУБД и общей производительностью системы.\n- **Мониторинг операционной системы** – сбор и анализ метрик ОС с помощью утилит `vmstat` и `iostat`, что позволяет напрямую увязать нагрузку на диск, память и процессор с поведением базы данных.\n- **Встроенное нагрузочное тестирование** – проведение нагрузочных тестов для оценки поведения базы данных под давлением и определения пределов её производительности.\n- **Построение отчетов для Excel** – экспорт результатов анализа в форматы, совместимые с Microsoft Excel, для дальнейшей обработки, визуализации и представления данных.\n- **Обширная база знаний** – передача пользователям большого объёма материалов по результатам экспериментов с проектом [pg_hazel](https://dzen.ru/suite/009d4a06-f053-4377-8fdc-76721bf79c50), служащих ценным источником знаний и практических примеров.\n- **Проактивный мониторинг** – формирование репрезентативных профилей производительности систем наблюдения посредством разработки стандартизированных файлов метрических данных. Регистрация события снижения производительности СУБД служит триггером инициирования стандартных и приоритетных инцидентов реагирования.\n- **Интеграция с нейросетью** – автоматическая подготовка промптов для нейросети с целью анализа статистически обработанных метрик производительности СУБД и инфраструктуры.\n- **Версия 7** – статистическая обработка метрик, промпты для подготовки отчетов нейросетью.\n\n## Системные требования\n\nДля работы pg_expecto требуются установленные утилиты **vmstat** и **iostat**.\nРекомендуется - архиватор **zip** для архивации отчетов и промптов.\n\n### Важно\n1. Для работы pg_expecto требуются установленные библиотеки расширений **pg_stat_statements** и **pg_wait_sampling**.\n\nЗначение параметра `shared_preload_libraries` должно быть:\n\n```\nshared_preload_libraries = 'pg_stat_statements, pg_wait_sampling'\n```\n**Порядок библиотек важен.**\n\n2. Для анализа фоновых процессов и ошибок СУБД, **необходимо** установить конфигурационные параметры управления логированием:\n- log_checkpoints = on\n- log_autovacuum_min_duration = 0\n- log_temp_files = 0 \n- track_io_timing = on\n- logging_collector = 'on'\n- log_directory = '/log/pg_log'\n- log_destination = 'stderr'\n- log_rotation_size = '0'\n- log_rotation_age = '1d'\n- log_line_prefix = '%m| %d| %a| %u| %h| %p| %e| '\n- log_truncate_on_rotation = 'on'\n\n## Установка\n\n1. Распаковать zip-архив проекта (`pg_expecto-main.zip`). В результате будет подготовлена папка: **pg_expecto-main**.\n2. Скопировать содержимое на целевой сервер СУБД в папку: `/tmp/pg_expecto`.\n3. Используя учётную запись *postgres*, на целевом сервере СУБД создать сервисную папку:  \n   `mkdir /postgres/pg_expecto`\n4. Скопировать инсталлятор:  \n   `cp /tmp/pg_expecto/pg_expecto_install.sh /postgres/pg_expecto/`\n5. Перейти в папку для начала установки:  \n   `cd /postgres/pg_expecto`\n6. Подготовить скрипт инсталлятора:  \n   `chmod 750 pg_expecto_install.sh`\n7. Запустить инсталлятор:  \n   `./pg_expecto_install.sh`\n\n## Мониторинг работоспособности pg_expecto\n\nДля просмотра лога работы используйте команду:\n\n```bash\ntail -f /postgres/pg_expecto/sh/pg_expecto.log\n```\n\n## Использование\n\nПодробный пример использования pg_expecto v.7 с нейросетью DeepSeek описан в статье:  \n[PG_EXPECTO v.7 + DeepSeek: полный цикл диагностики производительности PostgreSQL — от нагрузочного тестирования до разбора инцидентов](https://dzen.ru/a/aaATukWy4T8iHW1t?share_to=link)\n\n## Контакты\n\n- Ринат Сунгатуллин: **kznalp@yandex.ru**\n- [Дзен-канал](https://dzen.ru/kznalp) : https://dzen.ru/kznalp\n- [Телеграм-канал](https://t.me/pg_expecto) : https://t.me/pg_expecto\n- [Max](https://max.ru/join/T8sCiETC85Tr4Dkh_nM362PVcCbGDLagF4RZKHf4Udg)\n\n## Статус проекта\n\nТекущая версия: 8.1\n\n## 📜 Лицензия\n\nНачиная с версии 8.0, проект `pg_expecto` распространяется под лицензией [Apache License 2.0](LICENSE).  \nПредыдущие версии (до 12.04.2026) доступны под лицензией MIT.  \nПолный текст лицензии находится в файле [LICENSE](LICENSE) в корне репозитория.\n\n---\n\n# pg_expecto – Statistical Performance and Wait Event Analysis for PostgreSQL\n\n**pg_expecto** is a comprehensive toolkit for deep statistical analysis and performance testing of PostgreSQL. This release marks the arrival of a powerful, freely distributable solution for database administrators and developers.\n\nThe main goal of pg_expecto is to provide administrators and developers with the tools to identify bottlenecks and optimize PostgreSQL performance. Unlike some modern solutions, pg_expecto deliberately focuses on reliable and proven statistical methods, ensuring full control and transparency of the analysis process.\n\n## Key Features\n\n- **Comprehensive statistical and correlation analysis** – deep analysis of PostgreSQL performance and wait events (`wait_event_type` / `wait_event`), establishing correlations between the internal state of the DBMS and overall system performance.\n- **Operating system monitoring** – collection and analysis of OS metrics using `vmstat` and `iostat`, directly linking disk, memory, and CPU load to database behavior.\n- **Built-in load testing** – the ability to run load tests to evaluate database behavior under pressure and determine performance limits.\n- **Excel reporting** – export analysis results to Microsoft Excel‑compatible formats for further processing, visualization, and presentation.\n- **Extensive knowledge base** – a wealth of materials from experiments with the [pg_hazel](https://dzen.ru/suite/009d4a06-f053-4377-8fdc-76721bf79c50) project, serving as a valuable source of knowledge and practical examples.\n- **Proactive monitoring** – creation of representative performance profiles for monitoring systems through standardized metric data files. Detection of DBMS performance degradation events triggers standard and priority incident response workflows.\n- **Neural network integration** – automatic generation of prompts for neural networks to analyze statistically processed DBMS and infrastructure performance metrics.\n- **Version 7** – statistical processing of metrics and prompts for generating neural‑network‑assisted reports.\n\n## System Requirements\n\npg_expecto requires the **vmstat** and **iostat** utilities to be installed.\n\n### Important\npg_expecto requires the **pg_stat_statements** and **pg_wait_sampling** extension libraries to be installed.\n\nThe `shared_preload_libraries` parameter must be set as follows:\n\n```\nshared_preload_libraries = 'pg_stat_statements, pg_wait_sampling'\n```\n\n**The order of libraries is important.**\n\n## Installation\n\n1. Unpack the project zip archive (`pg_expecto-main.zip`). This will create the folder **pg_expecto-main**.\n2. Copy the contents to the target DBMS server into `/tmp/pg_expecto`.\n3. Using the *postgres* account, create a service directory on the target DBMS server:  \n   `mkdir /postgres/pg_expecto`\n4. Copy the installer:  \n   `cp /tmp/pg_expecto/pg_expecto_install.sh /postgres/pg_expecto/`\n5. Change to the installation directory:  \n   `cd /postgres/pg_expecto`\n6. Make the installer script executable:  \n   `chmod 750 pg_expecto_install.sh`\n7. Run the installer:  \n   `./pg_expecto_install.sh`\n\n## Monitoring pg_expecto\n\nTo view the log, use:\n\n```bash\ntail -f /postgres/pg_expecto/sh/pg_expecto.log\n```\n\n## Usage\n\nA detailed example of using pg_expecto v.7 with the DeepSeek neural network is available in the article (Russian):  \n[PG_EXPECTO v.7 + DeepSeek: полный цикл диагностики производительности PostgreSQL — от нагрузочного тестирования до разбора инцидентов](https://dzen.ru/a/aaATukWy4T8iHW1t?share_to=link)\n\n## Contacts\n\n- Rinat Sungatullin: **kznalp@yandex.ru**\n- [Dzen channel](https://dzen.ru/kznalp) : https://dzen.ru/kznalp\n- [Telegram channel](https://t.me/pg_expecto) : https://t.me/pg_expecto\n- [Max](https://max.ru/join/T8sCiETC85Tr4Dkh_nM362PVcCbGDLagF4RZKHf4Udg)\n\n## Project Status\n\nCurrent version: 8.1\n\n## 📜 License\n\nStarting from version 8.0, `pg_expecto` is distributed under the [Apache License 2.0](LICENSE).  \nPrevious versions (prior to 2026-04-12) are available under the MIT License.  \nThe full license text is available in the [LICENSE](LICENSE) file in the repository root.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpg-expecto%2Fpg_expecto","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fpg-expecto%2Fpg_expecto","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fpg-expecto%2Fpg_expecto/lists"}