Skip to content

Fix PostgreSQL pool size setting for pgBouncer - #681

Open
DhruvShah-Dev wants to merge 1 commit into
TabularisDB:mainfrom
DhruvShah-Dev:fix/postgres-pool-size-setting
Open

Fix PostgreSQL pool size setting for pgBouncer#681
DhruvShah-Dev wants to merge 1 commit into
TabularisDB:mainfrom
DhruvShah-Dev:fix/postgres-pool-size-setting

Conversation

@DhruvShah-Dev

Copy link
Copy Markdown
Contributor

Summary

  • add a PostgreSQL poolMaxSize built-in driver setting
  • use the setting when creating the PostgreSQL connection pool, defaulting to the existing size of 10
  • clamp invalid, zero, or oversized values and cover parsing edge cases

Validation

  • pnpm.cmd typecheck
  • pnpm.cmd lint
  • pnpm.cmd exec vitest run tests/utils/driverUI.test.tsx tests/i18n/registryLocale.test.ts
  • cargo test postgres_pool_max_size --lib --no-run

Refs #71

@kilo-code-bot

kilo-code-bot Bot commented Aug 26, 2026

Copy link
Copy Markdown
Contributor

Code Review Summary

Status: No Issues Found | Recommendation: Merge

Files Reviewed (15 files)
  • src-tauri/src/drivers/postgres/mod.rs
  • src-tauri/src/pool_manager.rs
  • src-tauri/src/pool_manager_tests.rs
  • src/hooks/useDrivers.ts
  • src/i18n/locales/de.json
  • src/i18n/locales/en.json
  • src/i18n/locales/es.json
  • src/i18n/locales/fr.json
  • src/i18n/locales/it.json
  • src/i18n/locales/ja.json
  • src/i18n/locales/ko.json
  • src/i18n/locales/pt-BR.json
  • src/i18n/locales/ru.json
  • src/i18n/locales/tl.json
  • src/i18n/locales/zh.json

The new poolMaxSize PostgreSQL setting mirrors the existing MySQL built-in setting pattern precisely:

  • postgres_setting_value / postgres_pool_max_size_from_value in pool_manager.rs reuse the same parsing approach as the MySQL helpers, with correct edge-case handling (zero, negatives, non-numeric strings, oversized values all fall back to the default of 10 or clamp to the 64 cap).
  • The pool builder now calls postgres_pool_size() instead of the hard-coded 10.
  • The manifest (postgres/mod.rs) and TS fallback (useDrivers.ts) declare the setting consistently, and the default value is sourced from the shared DEFAULT_POSTGRES_POOL_MAX_SIZE constant on the Rust side.
  • Tests cover the no-setting, numeric, string, invalid, zero, and oversized cases.
  • i18n keys are added at the correct nesting level (pluginSettings.builtin.postgres.poolMaxSize) across all locales, matching the MySQL sibling structure.

No security, runtime, or logic issues identified in the changed lines.


Reviewed by glm-5.2 · Input: 32.2K · Output: 4.4K · Cached: 304.2K

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant