diff --git a/Directory.Build.props b/Directory.Build.props index 5c1649d..126c0d0 100644 --- a/Directory.Build.props +++ b/Directory.Build.props @@ -1,6 +1,6 @@ - 0.1.0-alpha.2 + 0.1.0-alpha.3 enable enable true diff --git a/README.md b/README.md index 9a98c76..9dbfbd8 100644 --- a/README.md +++ b/README.md @@ -6,7 +6,7 @@ English | [Português (Brasil)](README.pt-BR.md) **The SQL Server Management Studio experience, for PostgreSQL.** A native Windows client with Object Explorer, F5 to run, execution plans, session monitoring and backup/restore, built for people who already think in SSMS. -**[Download v0.1.0-alpha.2 for Windows x64](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2)** · Graphical installer (EN/pt-BR) or portable ZIP, .NET runtime included · Works with PostgreSQL 17 and 18 +**[Download v0.1.0-alpha.3 for Windows x64](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3)** · Graphical installer (EN/pt-BR) or portable ZIP, .NET runtime included · Works with PostgreSQL 17 and 18 ![PGMS editor, Object Explorer and query results](docs/assets/pgms-results-m959.jpg) @@ -46,7 +46,7 @@ Get-FileHash .\PGMS-* -Algorithm SHA256 Compare the hashes with `SHA256SUMS.txt` in the release. Starting with v0.1.0-alpha.2 the assets are built by the [release workflow](.github/workflows/release.yml) on GitHub Actions and carry a build provenance attestation, so you can also confirm that the ZIP or installer came from that workflow and this repository (requires the [GitHub CLI](https://cli.github.com/)): ```powershell -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` v0.1.0-alpha.1 was built on the maintainer's machine and has checksums only. Code signing through the SignPath Foundation open source program is planned. diff --git a/README.pt-BR.md b/README.pt-BR.md index 4f3f7cf..798beae 100644 --- a/README.pt-BR.md +++ b/README.pt-BR.md @@ -6,7 +6,7 @@ **A experiência do SQL Server Management Studio, para PostgreSQL.** Cliente nativo Windows com Object Explorer, F5 para executar, planos de execução, monitor de sessões e backup/restore, feito para quem já pensa em SSMS. -**[Baixar v0.1.0-alpha.2 para Windows x64](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2)** · Instalador gráfico (EN/pt-BR) ou ZIP portátil, runtime .NET incluído · Funciona com PostgreSQL 17 e 18 +**[Baixar v0.1.0-alpha.3 para Windows x64](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3)** · Instalador gráfico (EN/pt-BR) ou ZIP portátil, runtime .NET incluído · Funciona com PostgreSQL 17 e 18 ![Editor, Object Explorer e resultados do PGMS](docs/assets/pgms-results-m959.jpg) @@ -46,7 +46,7 @@ Get-FileHash .\PGMS-* -Algorithm SHA256 Compare os hashes com o `SHA256SUMS.txt` da release. A partir da v0.1.0-alpha.2 os assets são compilados pelo [workflow de release](.github/workflows/release.yml) no GitHub Actions e trazem atestado de proveniência de build, então você também pode confirmar que o ZIP ou o instalador saiu desse workflow e deste repositório (exige o [GitHub CLI](https://cli.github.com/)): ```powershell -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` A v0.1.0-alpha.1 foi compilada na máquina do mantenedor e tem apenas checksums. A assinatura de código pelo programa open source da SignPath Foundation está planejada. diff --git a/SECURITY.md b/SECURITY.md index 4c08cae..4a0d36b 100644 --- a/SECURITY.md +++ b/SECURITY.md @@ -2,7 +2,7 @@ English | [Português (Brasil)](SECURITY.pt-BR.md) -PGMS is in development. There is no published supported release series or guaranteed response time. Current development and the v0.1.0-alpha.2 pre-release are the starting points for investigation; historical packages do not automatically receive fixes. +PGMS is in development. There is no published supported release series or guaranteed response time. Current development and the v0.1.0-alpha.3 pre-release are the starting points for investigation; historical packages do not automatically receive fixes. Do not disclose an unpatched vulnerability or real credentials in a public issue. Use GitHub's **Report a vulnerability** on this repository if private reporting is enabled. If it is unavailable, open an issue asking the maintainer for a private contact channel without including vulnerability details. Never post database dumps, saved profiles, DPAPI payloads, access tokens or private keys. diff --git a/SECURITY.pt-BR.md b/SECURITY.pt-BR.md index 2017813..35a101e 100644 --- a/SECURITY.pt-BR.md +++ b/SECURITY.pt-BR.md @@ -2,7 +2,7 @@ [English](SECURITY.md) | Português (Brasil) -O PGMS está em desenvolvimento. Não há série de releases publicada com suporte nem prazo de resposta garantido. O desenvolvimento atual e a pré-release v0.1.0-alpha.2 são o ponto de partida para investigação; pacotes históricos não recebem correções automaticamente. +O PGMS está em desenvolvimento. Não há série de releases publicada com suporte nem prazo de resposta garantido. O desenvolvimento atual e a pré-release v0.1.0-alpha.3 são o ponto de partida para investigação; pacotes históricos não recebem correções automaticamente. Não divulgue vulnerabilidade sem correção ou credenciais reais em uma issue pública. Use **Report a vulnerability** no GitHub deste repositório se o relato privado estiver habilitado. Se estiver indisponível, abra uma issue pedindo ao mantenedor um canal privado, sem detalhes da vulnerabilidade. Nunca publique dumps, perfis salvos, payloads DPAPI, tokens ou chaves privadas. diff --git a/docs/en/distribution.md b/docs/en/distribution.md index c303cac..115a66f 100644 --- a/docs/en/distribution.md +++ b/docs/en/distribution.md @@ -1,4 +1,4 @@ -# PGMS v0.1.0-alpha.2 — portable distribution (M1008) +# PGMS v0.1.0-alpha.3 — portable distribution (M1022) English | Português (Brasil): LEIA-ME.md in the package, or docs/pt-BR/distribution.md in the source repository. diff --git a/docs/en/getting-started.md b/docs/en/getting-started.md index f845d09..af8c2cb 100644 --- a/docs/en/getting-started.md +++ b/docs/en/getting-started.md @@ -2,7 +2,7 @@ English | [Português (Brasil)](../pt-BR/getting-started.md) -[Download v0.1.0-alpha.2](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2): [graphical installer](graphical-installer.md), portable ZIP or PowerShell 7 installer. The graphical installer offers current-user and all-users modes and does not require PowerShell. See [release notes](release-notes.md). +[Download v0.1.0-alpha.3](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3): [graphical installer](graphical-installer.md), portable ZIP or PowerShell 7 installer. The graphical installer offers current-user and all-users modes and does not require PowerShell. See [release notes](release-notes.md). ### Windows SmartScreen warning @@ -15,14 +15,14 @@ Get-FileHash .\PGMS-* -Algorithm SHA256 Compare the hashes with `SHA256SUMS.txt` in the release. Starting with v0.1.0-alpha.2 the assets are built by the [release workflow](../../.github/workflows/release.yml) on GitHub Actions and carry a build provenance attestation, so you can also confirm that the ZIP or installer came from that workflow and this repository (requires the [GitHub CLI](https://cli.github.com/); see [development](development.md)): ```powershell -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` v0.1.0-alpha.1 was built on the maintainer's machine and has checksums only. Code signing through the SignPath Foundation open source program is planned. ## Requirements -PGMS targets Windows x64. Building requires PowerShell 7 and a .NET 10 SDK compatible with [global.json](../../global.json): 10.0.400 with latest-patch roll-forward. Dependencies are pinned in NuGet lockfiles. The M1008 package was built with SDK 10.0.403 and bundles .NET/WPF 10.0.14; a rebuild may use different installed runtime packs. +PGMS targets Windows x64. Building requires PowerShell 7 and a .NET 10 SDK compatible with [global.json](../../global.json): 10.0.400 with latest-patch roll-forward. Dependencies are pinned in NuGet lockfiles. The M1022 package was built with SDK 10.0.403 and bundles .NET/WPF 10.0.14; a rebuild may use different installed runtime packs. PostgreSQL 17/18 with same-major client tools is the supported database scope. The historical matrix tested 17.11/18.6. A server is not needed just to open the shell. Backup/restore requires external pg_dump, pg_restore, psql and pg_dumpall as applicable; PGMS installs none of them. @@ -35,11 +35,11 @@ dotnet run --project src/PGMS.Desktop ```powershell ./scripts/Publish.ps1 -SelfContained -./scripts/Verify-Package.ps1 -PackagePath artifacts/M1008-win-x64 -./scripts/New-PackageArchive.ps1 -PackagePath artifacts/M1008-win-x64 +./scripts/Verify-Package.ps1 -PackagePath artifacts/M1022-win-x64 +./scripts/New-PackageArchive.ps1 -PackagePath artifacts/M1022-win-x64 ``` -Paths follow `BuildInfo.Milestone`; replace M1008 if the build label changes. Existing package folders and ZIPs are refused rather than overwritten. A fresh clone contains neither local ZIPs nor acceptance artifacts. Extract the entire package and run PGMS.exe, retaining adjacent libraries and licenses. Without `-SelfContained`, the package needs an installed .NET10 Desktop Runtime. No SSMS is required. +Paths follow `BuildInfo.Milestone`; replace M1022 if the build label changes. Existing package folders and ZIPs are refused rather than overwritten. A fresh clone contains neither local ZIPs nor acceptance artifacts. Extract the entire package and run PGMS.exe, retaining adjacent libraries and licenses. Without `-SelfContained`, the package needs an installed .NET10 Desktop Runtime. No SSMS is required. Optional managed installation/update/rollback uses the packaged PowerShell 7 scripts. Read `LEIA-ME.md` shipped with the exact package before using them. Portable execution does not require PowerShell 7. The current ZIP has no MSI, code signature or automatic updater; SmartScreen behavior has not been tested. diff --git a/docs/en/graphical-installer.md b/docs/en/graphical-installer.md index 27c4095..dfaf900 100644 --- a/docs/en/graphical-installer.md +++ b/docs/en/graphical-installer.md @@ -2,7 +2,7 @@ English | [Português (Brasil)](../pt-BR/graphical-installer.md) -Download `PGMS-0.1.0-alpha.2-Setup-x64.exe` from the [alpha.2 release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2) and check it against `SHA256SUMS.txt` (and, optionally, `gh attestation verify`). Since v0.1.0-alpha.2 the installer is built by the release workflow from the same payload as the portable ZIP of that release; in v0.1.0-alpha.1 it was added later to wrap the existing M1008 payload. The installer does not require PowerShell or a separately installed .NET runtime. +Download `PGMS-0.1.0-alpha.3-Setup-x64.exe` from the [alpha.3 release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3) and check it against `SHA256SUMS.txt` (and, optionally, `gh attestation verify`). Since v0.1.0-alpha.3 the installer is built by the release workflow from the same payload as the portable ZIP of that release; in v0.1.0-alpha.1 it was added later to wrap the existing M1022 payload. The installer does not require PowerShell or a separately installed .NET runtime. ## Installation choices @@ -23,10 +23,10 @@ The executable is unsigned; SmartScreen reputation and a clean Windows VM have n ## Build and test -Use the official [Inno Setup 7.1.1 x64 compiler](https://jrsoftware.org/isdl.php), retaining its license. Extract the existing release ZIP into `artifacts/M1008-win-x64`. The builder checks every payload file, the frozen manifest and application version, and refuses an existing output directory. A local application rebuild may have a different manifest and is intentionally refused by this release-specific builder. Update the release configuration for a future frozen release. The [release workflow](../../.github/workflows/release.yml) passes `-SkipFrozenManifest` because it builds the payload itself; milestone and product version are still enforced, and the frozen hash remains required for local builds. +Use the official [Inno Setup 7.1.1 x64 compiler](https://jrsoftware.org/isdl.php), retaining its license. Extract the existing release ZIP into `artifacts/M1022-win-x64`. The builder checks every payload file, the frozen manifest and application version, and refuses an existing output directory. A local application rebuild may have a different manifest and is intentionally refused by this release-specific builder. Update the release configuration for a future frozen release. The [release workflow](../../.github/workflows/release.yml) passes `-SkipFrozenManifest` because it builds the payload itself; milestone and product version are still enforced, and the frozen hash remains required for local builds. ```powershell -./scripts/Build-GraphicalInstaller.ps1 -PackagePath artifacts/M1008-win-x64 -CompilerPath 'C:\Tools\Inno Setup 7\ISCC.exe' +./scripts/Build-GraphicalInstaller.ps1 -PackagePath artifacts/M1022-win-x64 -CompilerPath 'C:\Tools\Inno Setup 7\ISCC.exe' ./scripts/Test-GraphicalInstaller.ps1 -InstallerPath artifacts/graphical-installer/0.1.0-alpha.1/PGMS-0.1.0-alpha.1-Setup-x64.exe ``` diff --git a/docs/en/release-notes.md b/docs/en/release-notes.md index 2fdad76..db2758b 100644 --- a/docs/en/release-notes.md +++ b/docs/en/release-notes.md @@ -1,28 +1,23 @@ -# v0.1.0-alpha.2 — Windows x64 +# v0.1.0-alpha.3 — Windows x64 English | [Português (Brasil)](../pt-BR/release-notes.md) -Second public pre-release of PGMS and the first one built by continuous integration. It is an alpha for evaluation with synthetic/disposable data. Build label: M1008, the same application source as v0.1.0-alpha.1; this release changes how the binaries are produced, verified and installed, not the application code. Original work is MIT; dependency notices and licenses accompany the package. +Third public pre-release of PGMS. It is an alpha for evaluation with synthetic/disposable data. Build label: M1022. Unlike v0.1.0-alpha.2, this release changes the application: it adds Query Statistics over `pg_stat_statements`, stops `$n` placeholders from closing the query session and gives grid rows short screen-reader names. The binaries are built and attested by the same [release workflow](../../.github/workflows/release.yml) as alpha.2. Original work is MIT; dependency notices and licenses accompany the package. -## What changed since v0.1.0-alpha.1 +## What changed since v0.1.0-alpha.2 -- **Built by GitHub Actions.** The ZIP and the graphical installer come from the [release workflow](../../.github/workflows/release.yml) on a GitHub-hosted Windows runner, from the tagged commit, with deterministic build settings (`ContinuousIntegrationBuild`, `Deterministic`) and a locked NuGet restore. v0.1.0-alpha.1 was built on the maintainer's machine. -- **Build provenance attestation.** The ZIP and the installer carry a GitHub artifact attestation that binds each file to this repository, the workflow and the commit. Verify it with the GitHub CLI (see below). -- **Graphical installer in the same release and from the same payload.** `PGMS-0.1.0-alpha.2-Setup-x64.exe` (Inno Setup 7.1.1, English/pt-BR, current user or all users, native uninstall) is built in the same run from the exact payload packed in the ZIP. In v0.1.0-alpha.1 the installer was added to the release later. -- **One checksum file.** `SHA256SUMS.txt` covers every asset; there are no per-asset `.sha256` files. -- **No PowerShell download installer.** `Install-PGMS-.ps1` is not published for this release; the managed PowerShell 7 scripts inside the ZIP (install, launch, rollback, uninstall) remain available. -- **Documentation.** New README landing (value proposition, Install / Build from source), Windows SmartScreen guidance with checksum and attestation verification, release process documented in [development](development.md). - -The application itself is unchanged: the `src/` tree is identical to v0.1.0-alpha.1 (milestone M1008). Public-source changes since alpha.1 are limited to the graphical installer sources, build/test scripts, CI workflows, community files and documentation. +- **Query Statistics (View → Query Statistics…).** Read-only analysis of `pg_stat_statements` for the connected database, with a purpose similar to SQL Server Query Store: calls, execution time (total, mean, minimum, maximum, standard deviation), rows, cache hit %, shared/temporary blocks, I/O time and WAL bytes per normalized statement. Server-side filters and ordering with a 1,000-row limit, sortable headers, a top-N chart beside the grid, cumulative/since-baseline/last 5, 15 or 60 minute windows, **Show Plan** with `EXPLAIN (GENERIC_PLAN)` in a new query tab, confirmed per-statement and full resets, optional auto-refresh and filters saved per connection target. PGMS never installs or configures the extension; the window explains what the server is missing. See the [user guide](user-guide.md#query-statistics). +- **`$n` placeholders no longer close the session.** Executing, explaining or analyzing SQL that contains `$1`-style placeholders used to fail with protocol error 08P01, after which the driver closed the tab's connection. PGMS now detects placeholders before sending (ignoring literals, quoted identifiers, comments and dollar quotes; `PREPARE` and function/procedure bodies are exempt), refuses the statement with **Go to Error** on the placeholder and keeps the session open. **Estimated Plan** switches to a generic plan. +- **Shorter screen-reader names for grid rows.** Every WPF grid, including query results, names each row from its first visible columns (for example `Query ID 42, Database app, …`) instead of exposing the whole underlying record. ## Downloads -From [this release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2): +From [this release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3): | File | Purpose | | --- | --- | -| `PGMS-0.1.0-alpha.2-Setup-x64.exe` | Graphical installer (English/pt-BR). Current user without administrator rights, or all users with elevation. No PowerShell or separate .NET runtime required. | -| `PGMS-0.1.0-alpha.2-win-x64.zip` | Portable application with .NET/WPF runtime. Extract the entire folder and run PGMS.exe. Includes the managed PowerShell 7 scripts. | +| `PGMS-0.1.0-alpha.3-Setup-x64.exe` | Graphical installer (English/pt-BR). Current user without administrator rights, or all users with elevation. No PowerShell or separate .NET runtime required. | +| `PGMS-0.1.0-alpha.3-win-x64.zip` | Portable application with .NET/WPF runtime. Extract the entire folder and run PGMS.exe. Includes the managed PowerShell 7 scripts. | | `SHA256SUMS.txt` | SHA256 of every asset in this release. Hashes check correspondence, not authorship. | | `package-manifest.json` | SHA256 manifest of every file inside the ZIP, as checked by `Verify-Package.ps1`. | | `RELEASE-NOTES.md`, `RELEASE-NOTES.pt-BR.md` | These notes. | @@ -33,27 +28,27 @@ The binaries are not code-signed, so Windows SmartScreen may warn on first launc ```powershell Get-FileHash .\PGMS-* -Algorithm SHA256 -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` Compare the hashes with `SHA256SUMS.txt`. The second command needs the [GitHub CLI](https://cli.github.com/) and confirms that the file was produced by this repository's release workflow at the tagged commit; run it for the ZIP as well. Code signing through the SignPath Foundation open source program is planned; no date is promised. ## Scope -SQL editor and independent sessions, Object Explorer, bounded Results/Messages and CSV/JSON export, reviewed PostgreSQL administration, identity/privileges, session monitoring and logical backup/restore. PostgreSQL 17/18 and same-major client tools are required for database operations and backup/restore; server/tools are not bundled. SSMS is neither required nor distributed. +SQL editor and independent sessions, Object Explorer, bounded Results/Messages and CSV/JSON export, reviewed PostgreSQL administration, identity/privileges, session monitoring, query statistics and logical backup/restore. PostgreSQL 17/18 and same-major client tools are required for database operations and backup/restore; server/tools are not bundled. Query Statistics also requires the `pg_stat_statements` extension on the server. SSMS is neither required nor distributed. ## Validation -Application behavior: the M1008 source previously passed the complete PostgreSQL 17.11 regression (**2,115 integration + 3,072 WPF = 5,187 checks**) on an isolated loopback cluster, as recorded in the v0.1.0-alpha.1 notes and in [validation](validation.md). That suite was not rerun for this release because the application source did not change; it does not run in CI. +Application behavior: the M1022 source passed the complete PostgreSQL 17.11 regression of this repository (**2,236 integration + 3,315 WPF = 5,551 checks**) on an isolated loopback cluster started with `pg_stat_statements` preloaded; the host PostgreSQL service is not used. The focused Query Statistics suite (`Test-Integration.ps1 -QueryStatisticsOnly`) passed 90 integration + 224 WPF checks. The regression does not run in CI. The Query Statistics window was also compared with the SQL Server Query Store of SSMS 22.11 on an identical synthetic workload; differences are documented in [validation](validation.md). -Release pipeline: the workflow validates that the tag matches `installer/release.json`, `Directory.Build.props` and `BuildInfo.cs`; publishes with `Publish.ps1 -SelfContained` (SDK selected by `global.json`, bundled .NET/WPF 10.0.14, ReadyToRun); runs `Verify-Package.ps1`, `Test-Package.ps1` and `Test-PackageGuides.ps1`; creates the ZIP with `New-PackageArchive.ps1`; installs the pinned, hash-verified Inno Setup 7.1.1 and builds the installer; runs an informational launch smoke on the runner; attests the ZIP and the installer; and opens a draft pre-release that the maintainer reviews before publishing. A dry run of the same workflow on the preceding commit (test tag `v0.1.0-alpha.1+ci.1`, later deleted) completed, and its assets passed checksum comparison, `gh attestation verify`, `Verify-Package.ps1`, `Test-PackageArchive.ps1`, `Test-PackageGuides.ps1`, `Test-PackageLaunch.ps1` and the 17 current-user checks of `Test-GraphicalInstaller.ps1` on the maintainer's machine. The same local verification is repeated on this release's draft assets before publication and reported in the release pull request. +Release pipeline: unchanged from v0.1.0-alpha.2. The workflow validates that the tag matches `installer/release.json`, `Directory.Build.props` and `BuildInfo.cs`; publishes with `Publish.ps1 -SelfContained`; runs `Verify-Package.ps1`, `Test-Package.ps1` and `Test-PackageGuides.ps1`; creates the ZIP; builds the installer with the pinned, hash-verified Inno Setup 7.1.1; runs an informational launch smoke on the runner; attests the ZIP and the installer; and opens a draft pre-release that the maintainer reviews before publishing. The draft assets are verified locally before publication, as for alpha.2, and the result is reported in the release pull request. -All-users (elevated) installation, a clean-Windows VM installation and physical DPI/keyboard/screen-reader observations are not newly certified by this release. +All-users (elevated) installation, a clean-Windows VM installation and physical DPI/keyboard/screen-reader observations of the new window are not newly certified by this release. ## Known limits -Windows x64 only. Unsigned executable and installer; SmartScreen warns. No MSI, automatic update or production-support guarantee. Full SSMS parity is not claimed. Results/recovery are bounded; large SQL lines may pause rendering. Cancellation is not proof of rollback. Restore SQL must be trusted and can control transactions, reconnect or execute local psql commands. DPAPI state is tied to the Windows user. The frozen manifest hash in `installer/release.json` describes a locally built payload, not the CI payload; the CI build compares milestone and product version instead. See [validation](validation.md) and [security](../../SECURITY.md). +Windows x64 only. Unsigned executable and installer; SmartScreen warns. No MSI, automatic update or production-support guarantee. Full SSMS parity is not claimed. Query Statistics is a snapshot of cumulative server counters, not continuous monitoring: sliding windows sample only while the window is open, minimum/maximum are not available for a window and PostgreSQL has no per-statement CPU time. The placeholder check assumes `standard_conforming_strings = on` and offers no parameter-value dialog. Results/recovery are bounded; large SQL lines may pause rendering. Cancellation is not proof of rollback. Restore SQL must be trusted and can control transactions, reconnect or execute local psql commands. DPAPI state is tied to the Windows user. The frozen manifest hash in `installer/release.json` describes a locally built payload, not the CI payload; the CI build compares milestone and product version instead. See [validation](validation.md) and [security](../../SECURITY.md). -## Previous release +## Previous releases -v0.1.0-alpha.1 (2026-10-31) remains available with its original assets and notes; it was built on the maintainer's machine and has checksums but no attestation. +v0.1.0-alpha.2 (2026-11-01, first CI-built release with attestation) and v0.1.0-alpha.1 (2026-10-31) remain available with their original assets and notes. diff --git a/docs/en/user-guide.md b/docs/en/user-guide.md index 9a96f68..644d09b 100644 --- a/docs/en/user-guide.md +++ b/docs/en/user-guide.md @@ -6,7 +6,7 @@ English | [Português (Brasil)](../pt-BR/user-guide.md) Open **New Query** (`Ctrl+N`), then **Connect**. Enter host, port, database, role and TLS settings. The default VerifyFull requires a trusted certificate and matching hostname. **Test Connection** checks the connection without saving a profile. Save a profile explicitly; password storage is optional and protected by Windows DPAPI. Each query tab owns its own PostgreSQL session. Switching database needs a connection, not a SQL Server `USE` command. T-SQL is not translated. -Use `F5` to execute the selection or document and **Cancel** to request cancellation. Cancellation does not prove that a server-side command or COMMIT was rolled back. Inspect the result before repeating a write. Results/Messages show results and diagnostics. Read timeout, server session settings and explain plans have dedicated controls. **Analyze Plan** executes SQL and requires review; use it only when that execution is intended. +Use `F5` to execute the selection or document and **Cancel** to request cancellation. Cancellation does not prove that a server-side command or COMMIT was rolled back. Inspect the result before repeating a write. Results/Messages show results and diagnostics. Read timeout, server session settings and explain plans have dedicated controls. **Analyze Plan** executes SQL and requires review; use it only when that execution is intended. SQL with `$1`-style placeholders cannot run without parameter values: PGMS refuses it before sending, keeps the session open and points to the placeholder. `PREPARE` and function/procedure bodies are exempt, and **Estimated Plan** switches to a generic plan. Results are bounded: 10,000 rows, 100 result sets, 256 columns per result, 4,096 columns total and 250,000 cells, with additional text limits. Warnings explain omitted data; later SQL can still execute. CSV/JSON export covers retained displayed/selected data, not a full database export. `Ctrl+C` copies with headers; `Ctrl+Shift+C` omits headers. Copy is limited to 250,000 positions/4Mi UTF-16 units and distinguishes NULL from empty text. @@ -16,6 +16,14 @@ Object Explorer loads folders on demand, filters and inspects objects. Supported Identity and sequence operations distinguish configured START from RESTART. A restart can repeat existing values. Privilege changes, delegation, CASCADE and COMMIT reconciliation have specific review and concurrency rules. Activity Monitor distinguishes **Cancel Refresh**, **Cancel Query** and **Terminate Session**. Refreshing a snapshot is not authorization to terminate a session. See the [documentation index](../README.md) for supported behavior. +## Query statistics + +**View → Query Statistics…** reads `pg_stat_statements` for the connected database: normalized statements with calls, execution time (total, mean, minimum, maximum, standard deviation), rows, cache hit %, shared and temporary blocks, I/O time and WAL bytes. The purpose is similar to SQL Server Query Store; it is not a copy of its screens or reports. + +PGMS never loads, creates or configures the extension. The server needs `shared_preload_libraries = 'pg_stat_statements'` (a restart) and `CREATE EXTENSION pg_stat_statements` in a database; when something is missing, a yellow band says what. Roles outside `pg_read_all_stats` see other users' statements without SQL text, as PostgreSQL decides. I/O time is only recorded with `track_io_timing` on. PostgreSQL has no per-statement CPU time. + +Filters (database, user, SQL text, minimum calls) and ordering run on the server before a 1,000-row limit. Clicking the Total, Mean, Max, Calls, Rows or metric headers reloads in that order; other headers sort only the loaded rows. **Window** shows cumulative values since the last reset, values since a saved baseline, or the last 5/15/60 minutes, computed by subtracting an earlier reading; sliding windows sample only while the window is open, and minimum/maximum are not available for a window. A top-N chart beside the grid follows the applied order. **Show Plan** opens the selected statement in a new query tab with `EXPLAIN (GENERIC_PLAN)`, without executing it or binding `$n` values. **Reset Selected** and **Reset All** call `pg_stat_statements_reset` after a confirmation whose default is No; the server decides whether the role may reset. Auto-refresh is optional and starts off. Filters, chart choices and baselines are stored per connection target in the PGMS state folder, without passwords or SQL results. + ## Backup and restore Choose compatible PostgreSQL tools and a new output file/directory. Custom, tar, plain SQL and directory formats support the documented content choices. Restore uses an existing target database; compatible objects/roles and permissions must already exist where required. Ownership and privileges are explicit choices. Directory backup supports parallel dump; restore remains serial. Global operations cover roles/memberships/tablespaces, not a physical cluster backup. diff --git a/docs/en/validation.md b/docs/en/validation.md index 14b0714..c3fa5c9 100644 --- a/docs/en/validation.md +++ b/docs/en/validation.md @@ -2,7 +2,7 @@ English | [Português (Brasil)](../pt-BR/validation.md) -Current pre-release: v0.1.0-alpha.2, build label M1008 (same application source as v0.1.0-alpha.1, rebuilt by the release workflow on GitHub Actions with a build provenance attestation). Milestone labels are internal identifiers, not guarantees that a local rebuild has the same binary identity. The initial public source import used M1002. The private operational history and raw acceptance evidence are intentionally not included. +Current pre-release: v0.1.0-alpha.3, build label M1022 (adds Query Statistics, placeholder protection and grid row names to the M1008 source of alpha.1/alpha.2; built by the release workflow on GitHub Actions with a build provenance attestation). Milestone labels are internal identifiers, not guarantees that a local rebuild has the same binary identity. The initial public source import used M1002. The private operational history and raw acceptance evidence are intentionally not included. The imported implementation previously passed 5,187 automated checks (2,115 PostgreSQL integration and 3,072 WPF), plus package opening, installed profile preservation and three-draft recovery through rollback/restart. Those are historical observations, not newly executed tests for every source revision. Reproduce current behavior with the public build and test scripts; report your actual environment and results. The clean-import checks for the initial public revision are recorded below after execution. @@ -31,3 +31,9 @@ A fresh complete run passed 2,115 integration +3,072 WPF =5,187 checks on Postgr The first full attempt hit a race in a test-only readiness file: the parent observed the file before its writer closed. Test children now publish readiness by renaming a closed temporary file. Focused process checks passed 26+20, followed by the successful full rerun above; the earlier failure was not counted as a pass. These harness changes do not change the distributed application's database behavior. Version metadata/build label and release packaging changed for this pre-release. Package and release-installer results are recorded in the [release notes](release-notes.md). Historical PostgreSQL 18/physical/VM observations are not reclassified as new tests of this binary. No new clean-Windows or SmartScreen certification is claimed. + +## v0.1.0-alpha.3 / M1022 — 2026-11-02 + +A complete run passed 2,236 integration + 3,315 WPF = 5,551 checks on PostgreSQL 17.11. The disposable loopback cluster now starts with `shared_preload_libraries=pg_stat_statements`; the host service is not touched, and the cluster stopped afterward. The focused suite `Test-Integration.ps1 -QueryStatisticsOnly` passed 90 integration + 224 WPF checks. Integration checks cover detection without the extension (nothing is installed), ordinary roles versus `pg_read_all_stats`, server-side filters/order and the 1,000-row sentinel, per-statement and full resets refused or authorized by PostgreSQL, baselines and windows, generic plans, and placeholder detection across literals, comments and dollar quotes with the session kept open. WPF checks cover loading, cancellation under a real lock, preserved selection, header ordering, chart, window selector, saved preferences (including a corrupt file left untouched), row accessibility names and minimum-size layout. + +The window was compared, during development, with the Query Store of SSMS 22.11 on an identical synthetic workload against SQL Server LocalDB and the disposable PostgreSQL cluster. Both listed the same statements with matching counts. Differences found then: one window instead of seven Query Store reports; server-wide cumulative counters instead of per-database time intervals; no chart, plan, logical reads or header sorting; full records exposed as row names to screen readers. Header sorting, I/O and block metrics, generic plans, the top-N chart, time windows and short row names were added afterward. Remaining differences: one window instead of separate reports, windows computed by subtracting samples rather than stored intervals, and no per-statement CPU time, which PostgreSQL does not record. Physical DPI and screen-reader observations of this window are not newly certified. diff --git a/docs/pt-BR/distribution.md b/docs/pt-BR/distribution.md index 3d9653c..a5efede 100644 --- a/docs/pt-BR/distribution.md +++ b/docs/pt-BR/distribution.md @@ -1,4 +1,4 @@ -# PGMS v0.1.0-alpha.2 — distribuição portátil (M1008) +# PGMS v0.1.0-alpha.3 — distribuição portátil (M1022) [English]: READ-ME.md no pacote, ou docs/en/distribution.md no repositório. Português (Brasil). diff --git a/docs/pt-BR/getting-started.md b/docs/pt-BR/getting-started.md index 159c9b1..d6880c2 100644 --- a/docs/pt-BR/getting-started.md +++ b/docs/pt-BR/getting-started.md @@ -2,7 +2,7 @@ [English](../en/getting-started.md) | Português (Brasil) -[Baixar v0.1.0-alpha.2](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2): [instalador gráfico](graphical-installer.md), ZIP portátil ou instalador PowerShell 7. O instalador gráfico oferece modos por usuário e para todos, dispensando PowerShell. Veja [notas da versão](release-notes.md). +[Baixar v0.1.0-alpha.3](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3): [instalador gráfico](graphical-installer.md), ZIP portátil ou instalador PowerShell 7. O instalador gráfico oferece modos por usuário e para todos, dispensando PowerShell. Veja [notas da versão](release-notes.md). ### Aviso do SmartScreen do Windows @@ -15,14 +15,14 @@ Get-FileHash .\PGMS-* -Algorithm SHA256 Compare os hashes com o `SHA256SUMS.txt` da release. A partir da v0.1.0-alpha.2 os assets são compilados pelo [workflow de release](../../.github/workflows/release.yml) no GitHub Actions e trazem atestado de proveniência de build, então você também pode confirmar que o ZIP ou o instalador saiu desse workflow e deste repositório (exige o [GitHub CLI](https://cli.github.com/); veja [desenvolvimento](development.md)): ```powershell -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` A v0.1.0-alpha.1 foi compilada na máquina do mantenedor e tem apenas checksums. A assinatura de código pelo programa open source da SignPath Foundation está planejada. ## Pré-requisitos -O PGMS é destinado a Windows x64. Compilar exige PowerShell 7 e SDK.NET10 compatível com [global.json](../../global.json): 10.0.400 com roll-forward para o patch mais recente. Dependências são fixadas nos lockfiles NuGet. O pacote M1008 foi compilado com SDK 10.0.403 e inclui .NET/WPF 10.0.14; recompilar pode usar outros runtime packs instalados. +O PGMS é destinado a Windows x64. Compilar exige PowerShell 7 e SDK.NET10 compatível com [global.json](../../global.json): 10.0.400 com roll-forward para o patch mais recente. Dependências são fixadas nos lockfiles NuGet. O pacote M1022 foi compilado com SDK 10.0.403 e inclui .NET/WPF 10.0.14; recompilar pode usar outros runtime packs instalados. PostgreSQL 17/18 com ferramentas da mesma versão principal é o escopo suportado. A matriz histórica testou 17.11/18.6. Não é necessário servidor para abrir o shell. Backup/restore requer pg_dump, pg_restore, psql e pg_dumpall externos conforme a operação; o PGMS não os instala. @@ -35,11 +35,11 @@ dotnet run --project src/PGMS.Desktop ```powershell ./scripts/Publish.ps1 -SelfContained -./scripts/Verify-Package.ps1 -PackagePath artifacts/M1008-win-x64 -./scripts/New-PackageArchive.ps1 -PackagePath artifacts/M1008-win-x64 +./scripts/Verify-Package.ps1 -PackagePath artifacts/M1022-win-x64 +./scripts/New-PackageArchive.ps1 -PackagePath artifacts/M1022-win-x64 ``` -Caminhos seguem `BuildInfo.Milestone`; substitua M1008 se o rótulo mudar. Pastas e ZIPs existentes são recusados, sem sobrescrita. Um clone novo não contém ZIPs ou artefatos locais de aceitação. Extraia todo o pacote e execute PGMS.exe, mantendo bibliotecas e licenças adjacentes. Sem `-SelfContained`, o pacote exige .NET10 Desktop Runtime instalado. SSMS não é necessário. +Caminhos seguem `BuildInfo.Milestone`; substitua M1022 se o rótulo mudar. Pastas e ZIPs existentes são recusados, sem sobrescrita. Um clone novo não contém ZIPs ou artefatos locais de aceitação. Extraia todo o pacote e execute PGMS.exe, mantendo bibliotecas e licenças adjacentes. Sem `-SelfContained`, o pacote exige .NET10 Desktop Runtime instalado. SSMS não é necessário. Instalação gerenciada opcional/update/rollback usa os scripts PowerShell 7 do pacote. Leia o `LEIA-ME.md` daquela versão antes de usá-los. A execução portátil não exige PowerShell 7. O ZIP atual não tem MSI, assinatura ou atualização automática; SmartScreen não foi testado. diff --git a/docs/pt-BR/graphical-installer.md b/docs/pt-BR/graphical-installer.md index a7fdff5..d7af4cc 100644 --- a/docs/pt-BR/graphical-installer.md +++ b/docs/pt-BR/graphical-installer.md @@ -2,7 +2,7 @@ [English](../en/graphical-installer.md) | Português (Brasil) -Baixe `PGMS-0.1.0-alpha.2-Setup-x64.exe` na [release alpha.2](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2) e confira contra o `SHA256SUMS.txt` (e, opcionalmente, com `gh attestation verify`). Desde a v0.1.0-alpha.2 o instalador é compilado pelo workflow de release a partir do mesmo payload do ZIP portátil daquela release; na v0.1.0-alpha.1 ele foi adicionado depois, embrulhando o payload M1008 existente. O instalador dispensa PowerShell e runtime .NET instalado separadamente. +Baixe `PGMS-0.1.0-alpha.3-Setup-x64.exe` na [release alpha.3](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3) e confira contra o `SHA256SUMS.txt` (e, opcionalmente, com `gh attestation verify`). Desde a v0.1.0-alpha.3 o instalador é compilado pelo workflow de release a partir do mesmo payload do ZIP portátil daquela release; na v0.1.0-alpha.1 ele foi adicionado depois, embrulhando o payload M1022 existente. O instalador dispensa PowerShell e runtime .NET instalado separadamente. ## Opções de instalação @@ -23,10 +23,10 @@ O executável não tem assinatura digital; reputação SmartScreen e VM Windows ## Compilar e testar -Use o [compilador oficial Inno Setup 7.1.1 x64](https://jrsoftware.org/isdl.php), preservando sua licença. Extraia o ZIP existente da release em `artifacts/M1008-win-x64`. O builder confere cada arquivo, o manifesto congelado e a versão do aplicativo, recusando diretório de saída existente. Uma recompilação local pode produzir outro manifesto e é intencionalmente recusada por este builder específico da release. Atualize a configuração para uma futura release congelada. O [workflow de release](../../.github/workflows/release.yml) passa `-SkipFrozenManifest` porque compila o próprio payload; marco e versão do produto continuam exigidos, e o hash congelado segue obrigatório em builds locais. +Use o [compilador oficial Inno Setup 7.1.1 x64](https://jrsoftware.org/isdl.php), preservando sua licença. Extraia o ZIP existente da release em `artifacts/M1022-win-x64`. O builder confere cada arquivo, o manifesto congelado e a versão do aplicativo, recusando diretório de saída existente. Uma recompilação local pode produzir outro manifesto e é intencionalmente recusada por este builder específico da release. Atualize a configuração para uma futura release congelada. O [workflow de release](../../.github/workflows/release.yml) passa `-SkipFrozenManifest` porque compila o próprio payload; marco e versão do produto continuam exigidos, e o hash congelado segue obrigatório em builds locais. ```powershell -./scripts/Build-GraphicalInstaller.ps1 -PackagePath artifacts/M1008-win-x64 -CompilerPath 'C:\Tools\Inno Setup 7\ISCC.exe' +./scripts/Build-GraphicalInstaller.ps1 -PackagePath artifacts/M1022-win-x64 -CompilerPath 'C:\Tools\Inno Setup 7\ISCC.exe' ./scripts/Test-GraphicalInstaller.ps1 -InstallerPath artifacts/graphical-installer/0.1.0-alpha.1/PGMS-0.1.0-alpha.1-Setup-x64.exe ``` diff --git a/docs/pt-BR/release-notes.md b/docs/pt-BR/release-notes.md index f242d4d..836cb3f 100644 --- a/docs/pt-BR/release-notes.md +++ b/docs/pt-BR/release-notes.md @@ -1,28 +1,23 @@ -# v0.1.0-alpha.2 — Windows x64 +# v0.1.0-alpha.3 — Windows x64 [English](../en/release-notes.md) | Português (Brasil) -Segunda pré-release pública do PGMS e a primeira compilada por integração contínua. É uma versão alpha para avaliação com dados sintéticos/descartáveis. Rótulo de build: M1008, a mesma fonte do aplicativo da v0.1.0-alpha.1; esta release muda como os binários são produzidos, verificados e instalados, não o código do aplicativo. Trabalho próprio MIT; avisos e licenças das dependências acompanham o pacote. +Terceira pré-release pública do PGMS. É uma versão alpha para avaliação com dados sintéticos/descartáveis. Rótulo de build: M1022. Ao contrário da v0.1.0-alpha.2, esta release muda o aplicativo: acrescenta Query Statistics sobre o `pg_stat_statements`, impede que placeholders `$n` fechem a sessão da consulta e dá às linhas das grades nomes curtos para leitores de tela. Os binários são compilados e atestados pelo mesmo [workflow de release](../../.github/workflows/release.yml) da alpha.2. Trabalho próprio MIT; avisos e licenças das dependências acompanham o pacote. -## O que mudou desde a v0.1.0-alpha.1 +## O que mudou desde a v0.1.0-alpha.2 -- **Compilada pelo GitHub Actions.** O ZIP e o instalador gráfico saem do [workflow de release](../../.github/workflows/release.yml) em um runner Windows hospedado pelo GitHub, a partir do commit da tag, com build determinístico (`ContinuousIntegrationBuild`, `Deterministic`) e restore NuGet travado. A v0.1.0-alpha.1 foi compilada na máquina do mantenedor. -- **Atestado de proveniência de build.** O ZIP e o instalador trazem um atestado de artefato do GitHub que vincula cada arquivo a este repositório, ao workflow e ao commit. Verifique com o GitHub CLI (veja abaixo). -- **Instalador gráfico na mesma release e do mesmo payload.** `PGMS-0.1.0-alpha.2-Setup-x64.exe` (Inno Setup 7.1.1, inglês/pt-BR, por usuário ou para todos, desinstalação nativa) é compilado na mesma execução a partir do payload exato empacotado no ZIP. Na v0.1.0-alpha.1 o instalador foi adicionado à release depois. -- **Um único arquivo de checksums.** `SHA256SUMS.txt` cobre todos os assets; não há arquivos `.sha256` por asset. -- **Sem instalador PowerShell de download.** `Install-PGMS-.ps1` não é publicado nesta release; os scripts gerenciados PowerShell 7 dentro do ZIP (instalar, abrir, rollback, remover) continuam disponíveis. -- **Documentação.** Novo topo do README (proposta de valor, Instalar / Compilar a partir do código), orientação sobre o SmartScreen do Windows com verificação de checksum e atestado, processo de release documentado em [desenvolvimento](development.md). - -O aplicativo em si não mudou: a árvore `src/` é idêntica à da v0.1.0-alpha.1 (marco M1008). As mudanças na fonte pública desde a alpha.1 se limitam às fontes do instalador gráfico, scripts de build/teste, workflows de CI, arquivos de comunidade e documentação. +- **Query Statistics (View → Query Statistics…).** Análise somente leitura do `pg_stat_statements` do banco conectado, com propósito parecido com o Query Store do SQL Server: chamadas, tempo de execução (total, médio, mínimo, máximo, desvio padrão), linhas, % de acerto em cache, blocos compartilhados/temporários, tempo de I/O e bytes de WAL por statement normalizado. Filtros e ordenação no servidor com limite de 1.000 linhas, cabeçalhos ordenáveis, gráfico top-N ao lado da grade, janelas acumulada/desde a linha de base/últimos 5, 15 ou 60 minutos, **Show Plan** com `EXPLAIN (GENERIC_PLAN)` numa nova aba de consulta, reset por statement e total com confirmação, auto-refresh opcional e filtros gravados por alvo de conexão. O PGMS nunca instala nem configura a extensão; a janela explica o que falta no servidor. Veja o [guia de uso](user-guide.md#estatísticas-de-consultas). +- **Placeholders `$n` não fecham mais a sessão.** Executar, explicar ou analisar SQL com placeholders do tipo `$1` falhava com o erro de protocolo 08P01, e o driver então fechava a conexão da aba. Agora o PGMS detecta os placeholders antes de enviar (ignorando literais, identificadores entre aspas, comentários e dollar quotes; `PREPARE` e corpos de funções/procedures ficam de fora), recusa o statement com **Go to Error** no placeholder e mantém a sessão aberta. **Estimated Plan** passa a usar um plano genérico. +- **Nomes mais curtos para linhas das grades em leitores de tela.** Todas as grades WPF, inclusive os resultados de consultas, nomeiam cada linha pelas primeiras colunas visíveis (por exemplo `Query ID 42, Database app, …`) em vez de expor o registro inteiro. ## Downloads -Nesta [release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.2): +Nesta [release](https://github.com/leoars/PostgresManagementStudio/releases/tag/v0.1.0-alpha.3): | Arquivo | Finalidade | | --- | --- | -| `PGMS-0.1.0-alpha.2-Setup-x64.exe` | Instalador gráfico (inglês/pt-BR). Por usuário sem direitos de administrador, ou para todos com elevação. Não exige PowerShell nem runtime .NET separado. | -| `PGMS-0.1.0-alpha.2-win-x64.zip` | Aplicativo portátil com runtime .NET/WPF. Extraia toda a pasta e execute PGMS.exe. Inclui os scripts gerenciados PowerShell 7. | +| `PGMS-0.1.0-alpha.3-Setup-x64.exe` | Instalador gráfico (inglês/pt-BR). Por usuário sem direitos de administrador, ou para todos com elevação. Não exige PowerShell nem runtime .NET separado. | +| `PGMS-0.1.0-alpha.3-win-x64.zip` | Aplicativo portátil com runtime .NET/WPF. Extraia toda a pasta e execute PGMS.exe. Inclui os scripts gerenciados PowerShell 7. | | `SHA256SUMS.txt` | SHA256 de todos os assets desta release. Hash confere correspondência, não autoria. | | `package-manifest.json` | Manifesto SHA256 de cada arquivo dentro do ZIP, conferido por `Verify-Package.ps1`. | | `RELEASE-NOTES.md`, `RELEASE-NOTES.pt-BR.md` | Estas notas. | @@ -33,27 +28,27 @@ Os binários não são assinados digitalmente, então o SmartScreen do Windows p ```powershell Get-FileHash .\PGMS-* -Algorithm SHA256 -gh attestation verify .\PGMS-0.1.0-alpha.2-Setup-x64.exe --repo leoars/PostgresManagementStudio +gh attestation verify .\PGMS-0.1.0-alpha.3-Setup-x64.exe --repo leoars/PostgresManagementStudio ``` Compare os hashes com o `SHA256SUMS.txt`. O segundo comando exige o [GitHub CLI](https://cli.github.com/) e confirma que o arquivo foi produzido pelo workflow de release deste repositório no commit da tag; execute-o também para o ZIP. A assinatura de código pelo programa open source da SignPath Foundation está planejada; nenhuma data é prometida. ## Escopo -Editor SQL e sessões independentes, Object Explorer, Results/Messages com limites e exportação CSV/JSON, administração PostgreSQL revisada, identity/privilégios, monitor e backup/restore lógico. PostgreSQL 17/18 e ferramentas da mesma versão principal são necessários para operações com banco e backup/restore; não são incluídos. SSMS não é exigido nem distribuído. +Editor SQL e sessões independentes, Object Explorer, Results/Messages com limites e exportação CSV/JSON, administração PostgreSQL revisada, identity/privilégios, monitor de sessões, estatísticas de consultas e backup/restore lógico. PostgreSQL 17/18 e ferramentas da mesma versão principal são necessários para operações com banco e backup/restore; não são incluídos. Query Statistics também exige a extensão `pg_stat_statements` no servidor. SSMS não é exigido nem distribuído. ## Validação -Comportamento do aplicativo: a fonte M1008 já passou na regressão completa PostgreSQL 17.11 (**2.115 integração + 3.072 WPF = 5.187 checks**) em cluster isolado em loopback, conforme registrado nas notas da v0.1.0-alpha.1 e em [validação](validation.md). Essa suíte não foi repetida para esta release porque a fonte do aplicativo não mudou; ela não roda no CI. +Comportamento do aplicativo: a fonte M1022 passou na regressão completa PostgreSQL 17.11 deste repositório (**2.236 integração + 3.315 WPF = 5.551 checks**) em cluster isolado em loopback iniciado com `pg_stat_statements` pré-carregado; o serviço PostgreSQL do host não é usado. A suíte focada de Query Statistics (`Test-Integration.ps1 -QueryStatisticsOnly`) passou em 90 checks de integração + 224 WPF. A regressão não roda no CI. A janela Query Statistics também foi comparada com o Query Store do SSMS 22.11 sob carga sintética idêntica; as diferenças estão em [validação](validation.md). -Pipeline de release: o workflow valida que a tag corresponde a `installer/release.json`, `Directory.Build.props` e `BuildInfo.cs`; publica com `Publish.ps1 -SelfContained` (SDK escolhido por `global.json`, .NET/WPF 10.0.14 incluído, ReadyToRun); roda `Verify-Package.ps1`, `Test-Package.ps1` e `Test-PackageGuides.ps1`; cria o ZIP com `New-PackageArchive.ps1`; instala o Inno Setup 7.1.1 fixado e conferido por hash e compila o instalador; executa um smoke informacional de abertura no runner; atesta o ZIP e o instalador; e abre uma pré-release em rascunho que o mantenedor revisa antes de publicar. Um ensaio do mesmo workflow no commit anterior (tag de teste `v0.1.0-alpha.1+ci.1`, depois apagada) concluiu, e seus assets passaram na comparação de checksums, `gh attestation verify`, `Verify-Package.ps1`, `Test-PackageArchive.ps1`, `Test-PackageGuides.ps1`, `Test-PackageLaunch.ps1` e nos 17 checks por usuário do `Test-GraphicalInstaller.ps1` na máquina do mantenedor. A mesma verificação local é repetida nos assets do rascunho desta release antes da publicação e relatada no pull request da release. +Pipeline de release: igual ao da v0.1.0-alpha.2. O workflow valida que a tag corresponde a `installer/release.json`, `Directory.Build.props` e `BuildInfo.cs`; publica com `Publish.ps1 -SelfContained`; roda `Verify-Package.ps1`, `Test-Package.ps1` e `Test-PackageGuides.ps1`; cria o ZIP; compila o instalador com o Inno Setup 7.1.1 fixado e conferido por hash; executa um smoke informacional de abertura no runner; atesta o ZIP e o instalador; e abre uma pré-release em rascunho que o mantenedor revisa antes de publicar. Os assets do rascunho são verificados localmente antes da publicação, como na alpha.2, e o resultado é relatado no pull request da release. -Instalação para todos os usuários (elevada), instalação em VM Windows limpa e observações físicas de DPI/teclado/leitor de tela não recebem nova certificação nesta release. +Instalação para todos os usuários (elevada), instalação em VM Windows limpa e observações físicas de DPI/teclado/leitor de tela da nova janela não recebem nova certificação nesta release. ## Limites conhecidos -Somente Windows x64. Executável e instalador sem assinatura; o SmartScreen avisa. Sem MSI, atualização automática ou garantia de suporte em produção. Não se declara paridade integral SSMS. Resultados/recuperação têm limites; linhas SQL grandes podem pausar renderização. Cancelar não comprova rollback. SQL de restore exige confiança e pode controlar transações, reconectar ou executar comandos locais psql. Estado DPAPI depende do usuário Windows. O hash de manifesto congelado em `installer/release.json` descreve um payload compilado localmente, não o do CI; o build no CI compara marco e versão do produto. Veja [validação](validation.md) e [segurança](../../SECURITY.pt-BR.md). +Somente Windows x64. Executável e instalador sem assinatura; o SmartScreen avisa. Sem MSI, atualização automática ou garantia de suporte em produção. Não se declara paridade integral SSMS. Query Statistics é um snapshot de contadores acumulados do servidor, não monitoramento contínuo: janelas deslizantes só amostram com a janela aberta, mínimo/máximo não existem para uma janela e o PostgreSQL não tem tempo de CPU por statement. A detecção de placeholders supõe `standard_conforming_strings = on` e não oferece diálogo de valores de parâmetros. Resultados/recuperação têm limites; linhas SQL grandes podem pausar renderização. Cancelar não comprova rollback. SQL de restore exige confiança e pode controlar transações, reconectar ou executar comandos locais psql. Estado DPAPI depende do usuário Windows. O hash de manifesto congelado em `installer/release.json` descreve um payload compilado localmente, não o do CI; o build no CI compara marco e versão do produto. Veja [validação](validation.md) e [segurança](../../SECURITY.pt-BR.md). -## Release anterior +## Releases anteriores -A v0.1.0-alpha.1 (31/10/2026) continua disponível com seus assets e notas originais; foi compilada na máquina do mantenedor e tem checksums, mas não atestado. +A v0.1.0-alpha.2 (01/11/2026, primeira compilada pelo CI com atestado) e a v0.1.0-alpha.1 (31/10/2026) continuam disponíveis com seus assets e notas originais. diff --git a/docs/pt-BR/user-guide.md b/docs/pt-BR/user-guide.md index e733a0e..62b20c0 100644 --- a/docs/pt-BR/user-guide.md +++ b/docs/pt-BR/user-guide.md @@ -6,7 +6,7 @@ Abra **New Query** (`Ctrl+N`) e **Connect**. Informe host, porta, banco, role e TLS. O padrão VerifyFull exige certificado confiável e hostname correspondente. **Test Connection** verifica a conexão sem salvar perfil. Salve o perfil explicitamente; armazenar senha é opcional e protegido por DPAPI Windows. Cada aba tem sua sessão PostgreSQL. Trocar de banco exige conexão, não o comando SQL Server `USE`. Não há tradução de T-SQL. -Use `F5` para executar seleção ou documento e **Cancel** para solicitar cancelamento. Cancelar não comprova rollback de comando ou COMMIT no servidor. Confira o resultado antes de repetir uma escrita. Results/Messages apresentam resultados e diagnóstico. Read timeout, configurações da sessão e planos têm controles próprios. **Analyze Plan** executa SQL e exige revisão; use somente quando quiser essa execução. +Use `F5` para executar seleção ou documento e **Cancel** para solicitar cancelamento. Cancelar não comprova rollback de comando ou COMMIT no servidor. Confira o resultado antes de repetir uma escrita. Results/Messages apresentam resultados e diagnóstico. Read timeout, configurações da sessão e planos têm controles próprios. **Analyze Plan** executa SQL e exige revisão; use somente quando quiser essa execução. SQL com placeholders do tipo `$1` não executa sem valores de parâmetro: o PGMS recusa antes de enviar, mantém a sessão aberta e aponta o placeholder. `PREPARE` e corpos de funções/procedures ficam de fora da recusa, e **Estimated Plan** passa a usar um plano genérico. Resultados têm limites: 10.000 linhas, 100 conjuntos, 256 colunas por resultado, 4.096 colunas somadas e 250.000 células, além dos limites de texto. Avisos explicam dados omitidos; comandos SQL posteriores podem continuar. CSV/JSON exporta dados retidos exibidos/selecionados, não o banco completo. `Ctrl+C` copia com cabeçalhos; `Ctrl+Shift+C` omite cabeçalhos. A cópia limita 250.000 posições/4Mi unidades UTF-16 e distingue NULL de texto vazio. @@ -16,6 +16,14 @@ Object Explorer carrega pastas sob demanda, filtra e inspeciona objetos. Operaç Identity e sequences distinguem START configurado de RESTART. Reiniciar pode repetir valores existentes. Privilégios, delegação, CASCADE e reconciliação de COMMIT têm regras próprias de revisão e concorrência. Activity Monitor distingue **Cancel Refresh**, **Cancel Query** e **Terminate Session**. Atualizar um snapshot não autoriza encerrar uma sessão. Veja o [índice da documentação](../README.md) para os comportamentos suportados. +## Estatísticas de consultas + +**View → Query Statistics…** lê o `pg_stat_statements` do banco conectado: statements normalizados com chamadas, tempo de execução (total, médio, mínimo, máximo, desvio padrão), linhas, % de acerto em cache, blocos compartilhados e temporários, tempo de I/O e bytes de WAL. O propósito é parecido com o Query Store do SQL Server; não é cópia das telas ou relatórios dele. + +O PGMS nunca carrega, cria ou configura a extensão. O servidor precisa de `shared_preload_libraries = 'pg_stat_statements'` (com reinício) e de `CREATE EXTENSION pg_stat_statements` em um banco; quando algo falta, uma faixa amarela diz o quê. Roles fora de `pg_read_all_stats` veem os statements de outros usuários sem o texto SQL, por decisão do PostgreSQL. O tempo de I/O só é registrado com `track_io_timing` ligado. O PostgreSQL não tem tempo de CPU por statement. + +Filtros (banco, usuário, texto SQL, mínimo de chamadas) e ordenação rodam no servidor antes do limite de 1.000 linhas. Clicar nos cabeçalhos Total, Mean, Max, Calls, Rows ou de métricas recarrega nessa ordem; os demais cabeçalhos ordenam só as linhas carregadas. **Window** mostra valores acumulados desde o último reset, desde uma linha de base gravada, ou dos últimos 5/15/60 minutos, calculados subtraindo uma leitura anterior; as janelas deslizantes só amostram enquanto a janela está aberta, e mínimo/máximo não existem para uma janela. Um gráfico top-N ao lado da grade segue a ordem aplicada. **Show Plan** abre o statement selecionado numa nova aba de consulta com `EXPLAIN (GENERIC_PLAN)`, sem executá-lo nem vincular valores aos `$n`. **Reset Selected** e **Reset All** chamam `pg_stat_statements_reset` depois de uma confirmação com Não como padrão; o servidor decide se a role pode zerar. O auto-refresh é opcional e começa desligado. Filtros, opções do gráfico e linhas de base ficam gravados por alvo de conexão na pasta de estado do PGMS, sem senhas nem resultados SQL. + ## Backup e restauração Escolha ferramentas PostgreSQL compatíveis e arquivo/diretório de saída novo. Custom, tar, SQL e diretório oferecem as opções de conteúdo documentadas. Restore usa banco de destino existente; objetos/roles compatíveis e permissões precisam existir quando exigidos. Ownership e privilégios são escolhas explícitas. Backup em diretório oferece dump paralelo; restore continua serial. Operações globais cobrem roles/memberships/tablespaces, não backup físico do cluster. diff --git a/docs/pt-BR/validation.md b/docs/pt-BR/validation.md index e3cf25b..6a237ab 100644 --- a/docs/pt-BR/validation.md +++ b/docs/pt-BR/validation.md @@ -2,7 +2,7 @@ [English](../en/validation.md) | Português (Brasil) -Pré-release atual: v0.1.0-alpha.2, rótulo M1008 (mesma fonte do aplicativo da v0.1.0-alpha.1, recompilada pelo workflow de release no GitHub Actions com atestado de proveniência de build). Marcos são identificadores internos, não garantia de identidade binária de uma recompilação local. A importação pública inicial usou M1002. Histórico operacional e provas brutas privados não são incluídos intencionalmente. +Pré-release atual: v0.1.0-alpha.3, rótulo M1022 (acrescenta Query Statistics, proteção contra placeholders e nomes de linhas das grades à fonte M1008 da alpha.1/alpha.2; compilada pelo workflow de release no GitHub Actions com atestado de proveniência de build). Marcos são identificadores internos, não garantia de identidade binária de uma recompilação local. A importação pública inicial usou M1002. Histórico operacional e provas brutas privados não são incluídos intencionalmente. A implementação importada passou anteriormente em 5.187 checks automatizados (2.115 integração PostgreSQL e 3.072 WPF), além de abertura de pacote, preservação de perfil instalado e recuperação de três rascunhos entre rollback/reinício. São observações históricas, não testes novos a cada revisão. Reproduza o comportamento atual pelos scripts públicos e informe ambiente/resultados reais. As verificações da revisão pública inicial são registradas abaixo após execução. @@ -31,3 +31,9 @@ Execução completa nova passou 2.115 integração +3.072 WPF =5.187 checks no P A primeira tentativa integral encontrou corrida no arquivo de prontidão de um teste: o pai observou o arquivo antes de o escritor fechá-lo. Filhos de teste agora publicam o sinal renomeando temporário já fechado. Recortes de processos passaram 26+20, seguidos da regressão integral aprovada acima; a falha anterior não foi contada como aprovação. Essas mudanças de harness não alteram o comportamento de banco do aplicativo distribuído. Metadados/rótulo e empacotamento mudaram para esta pré-release. Resultados do pacote e instalador estão nas [notas da versão](release-notes.md). Provas históricas PostgreSQL 18/físicas/VM não foram reclassificadas como novas desta versão. Sem nova certificação Windows limpo ou SmartScreen. + +## v0.1.0-alpha.3 / M1022 — 02/11/2026 + +Uma execução completa passou em 2.236 checks de integração + 3.315 WPF = 5.551 no PostgreSQL 17.11. O cluster descartável em loopback agora inicia com `shared_preload_libraries=pg_stat_statements`; o serviço do host não é tocado, e o cluster foi encerrado ao final. A suíte focada `Test-Integration.ps1 -QueryStatisticsOnly` passou em 90 checks de integração + 224 WPF. A integração cobre detecção sem a extensão (nada é instalado), roles comuns contra `pg_read_all_stats`, filtros/ordem no servidor e a sentinela de 1.000 linhas, resets por statement e total recusados ou autorizados pelo PostgreSQL, linhas de base e janelas, planos genéricos e detecção de placeholders entre literais, comentários e dollar quotes com a sessão mantida aberta. O WPF cobre carga, cancelamento sob lock real, seleção preservada, ordenação pelo cabeçalho, gráfico, seletor de janela, preferências gravadas (inclusive arquivo corrompido preservado), nomes acessíveis das linhas e layout no tamanho mínimo. + +Durante o desenvolvimento, a janela foi comparada com o Query Store do SSMS 22.11 sob carga sintética idêntica, contra SQL Server LocalDB e o cluster PostgreSQL descartável. Os dois listaram os mesmos statements com contagens iguais. Diferenças encontradas na época: uma janela em vez de sete relatórios do Query Store; contadores acumulados do servidor em vez de intervalos de tempo por banco; sem gráfico, plano, leituras lógicas ou ordenação pelo cabeçalho; registros inteiros expostos como nome das linhas a leitores de tela. Ordenação pelo cabeçalho, métricas de I/O e blocos, planos genéricos, gráfico top-N, janelas de tempo e nomes curtos de linha foram acrescentados depois. Diferenças que permanecem: uma janela em vez de relatórios separados, janelas calculadas subtraindo amostras em vez de intervalos armazenados, e sem tempo de CPU por statement, que o PostgreSQL não registra. Observações físicas de DPI e leitor de tela desta janela não recebem nova certificação. diff --git a/installer/release.json b/installer/release.json index 7d8d372..aecdf73 100644 --- a/installer/release.json +++ b/installer/release.json @@ -1,6 +1,6 @@ { - "Version": "0.1.0-alpha.2", - "NumericVersion": "0.1.0.2", - "Milestone": "M1008", - "ManifestSha256": "0280EC5BE8EBB4ABC432E891DA05716C6ADC2DFF4D1652819F4689DAB68A30B6" + "Version": "0.1.0-alpha.3", + "NumericVersion": "0.1.0.3", + "Milestone": "M1022", + "ManifestSha256": "30E86634B287167AA91A910FD4B0DADFAE46EFB4738E42900CCC76D4C7B28E0D" } diff --git a/scripts/Test-Integration.ps1 b/scripts/Test-Integration.ps1 index dfdb29a..ef3aed5 100644 --- a/scripts/Test-Integration.ps1 +++ b/scripts/Test-Integration.ps1 @@ -1,6 +1,6 @@ -param([switch]$SessionsOnly, [switch]$PlansOnly, [switch]$ExportOnly, [switch]$ActivityOnly, [switch]$GlobalBackupOnly, [switch]$ColumnTypesOnly, [switch]$IndexMaintenanceOnly, [switch]$IndexExpressionsOnly, [switch]$PartitionTablesOnly, [switch]$DesktopOnly, [switch]$CascadeJournalOnly, [switch]$CascadeRoutinesOnly, [switch]$CascadeRollbackOnly, [switch]$RevokePreviewOnly, [switch]$GrantorConcurrencyOnly, [switch]$ExplicitGrantorOnly, [switch]$GrantorCatalogOnly, [switch]$DefaultProcessOnly, [switch]$DefaultDelegationOnly, [switch]$DefaultSchemasOnly, [switch]$DefaultTypesOnly, [switch]$DefaultRoutinesOnly, [switch]$DefaultSequencesOnly, [switch]$DefaultTablesOnly, [switch]$DefaultCancellationOnly, [switch]$DefaultUiOnly, [switch]$DefaultJournalOnly, [switch]$DefaultPrivilegesOnly, [switch]$RoutineBoundariesOnly, [switch]$RoutineProcessOnly, [switch]$RoutineConcurrencyOnly, [switch]$RoutinePrivilegesOnly, [string]$PostgresBin = 'C:\Program Files\PostgreSQL\17\bin', [switch]$BackupFormatsOnly, [switch]$IdentityColumnsOnly, [switch]$RestoreOwnershipOnly, [switch]$UnicodeBackupOnly, [switch]$PrivilegeJournalOnly, [switch]$MaintainPrivilegeOnly, [switch]$PrivilegeCommitOnly, [switch]$UnicodePasswordOnly, [switch]$MembershipOptionsOnly, [switch]$PrivilegeIdentityOnly, [switch]$ColumnPrivilegesOnly, [switch]$PrivilegeCancellationOnly, [switch]$EffectivePrivilegesOnly, [switch]$PrivilegeCommandsOnly, [switch]$SequencePrivilegesOnly, [switch]$CopyOnly, [switch]$AdvancedIndexesOnly, [switch]$SequencesOnly, [switch]$SequenceStateOnly, [switch]$SequenceOwnerOnly, [switch]$AccessibilityOnly, [switch]$ConnectionOnly, [switch]$StreamingOnly, [switch]$ExplorerOnly, [switch]$PropertiesOnly, [switch]$AcceptanceOnly, [ValidateRange(1024,65535)][int]$TestPort = 55439) +param([switch]$SessionsOnly, [switch]$PlansOnly, [switch]$ExportOnly, [switch]$ActivityOnly, [switch]$QueryStatisticsOnly, [switch]$GlobalBackupOnly, [switch]$ColumnTypesOnly, [switch]$IndexMaintenanceOnly, [switch]$IndexExpressionsOnly, [switch]$PartitionTablesOnly, [switch]$DesktopOnly, [switch]$CascadeJournalOnly, [switch]$CascadeRoutinesOnly, [switch]$CascadeRollbackOnly, [switch]$RevokePreviewOnly, [switch]$GrantorConcurrencyOnly, [switch]$ExplicitGrantorOnly, [switch]$GrantorCatalogOnly, [switch]$DefaultProcessOnly, [switch]$DefaultDelegationOnly, [switch]$DefaultSchemasOnly, [switch]$DefaultTypesOnly, [switch]$DefaultRoutinesOnly, [switch]$DefaultSequencesOnly, [switch]$DefaultTablesOnly, [switch]$DefaultCancellationOnly, [switch]$DefaultUiOnly, [switch]$DefaultJournalOnly, [switch]$DefaultPrivilegesOnly, [switch]$RoutineBoundariesOnly, [switch]$RoutineProcessOnly, [switch]$RoutineConcurrencyOnly, [switch]$RoutinePrivilegesOnly, [string]$PostgresBin = 'C:\Program Files\PostgreSQL\17\bin', [switch]$BackupFormatsOnly, [switch]$IdentityColumnsOnly, [switch]$RestoreOwnershipOnly, [switch]$UnicodeBackupOnly, [switch]$PrivilegeJournalOnly, [switch]$MaintainPrivilegeOnly, [switch]$PrivilegeCommitOnly, [switch]$UnicodePasswordOnly, [switch]$MembershipOptionsOnly, [switch]$PrivilegeIdentityOnly, [switch]$ColumnPrivilegesOnly, [switch]$PrivilegeCancellationOnly, [switch]$EffectivePrivilegesOnly, [switch]$PrivilegeCommandsOnly, [switch]$SequencePrivilegesOnly, [switch]$CopyOnly, [switch]$AdvancedIndexesOnly, [switch]$SequencesOnly, [switch]$SequenceStateOnly, [switch]$SequenceOwnerOnly, [switch]$AccessibilityOnly, [switch]$ConnectionOnly, [switch]$StreamingOnly, [switch]$ExplorerOnly, [switch]$PropertiesOnly, [switch]$AcceptanceOnly, [ValidateRange(1024,65535)][int]$TestPort = 55439) $ErrorActionPreference = 'Stop' -if ((@($SessionsOnly, $PlansOnly, $ExportOnly, $ActivityOnly, $GlobalBackupOnly, $ColumnTypesOnly, $IndexMaintenanceOnly, $IndexExpressionsOnly, $PartitionTablesOnly, $CascadeJournalOnly, $CascadeRoutinesOnly, $CascadeRollbackOnly, $RevokePreviewOnly, $GrantorConcurrencyOnly, $ExplicitGrantorOnly, $GrantorCatalogOnly, $DefaultProcessOnly, $DefaultDelegationOnly, $DefaultSchemasOnly, $DefaultTypesOnly, $DefaultRoutinesOnly, $DefaultSequencesOnly, $DefaultTablesOnly, $DefaultCancellationOnly, $DefaultUiOnly, $DefaultJournalOnly, $DefaultPrivilegesOnly, $RoutineBoundariesOnly, $RoutineProcessOnly, $RoutineConcurrencyOnly, $RoutinePrivilegesOnly, $BackupFormatsOnly, $IdentityColumnsOnly, $RestoreOwnershipOnly, $UnicodeBackupOnly, $PrivilegeJournalOnly, $MaintainPrivilegeOnly, $PrivilegeCommitOnly, $UnicodePasswordOnly, $MembershipOptionsOnly, $PrivilegeIdentityOnly, $ColumnPrivilegesOnly, $PrivilegeCancellationOnly, $EffectivePrivilegesOnly, $PrivilegeCommandsOnly, $SequencePrivilegesOnly, $CopyOnly, $AdvancedIndexesOnly, $SequencesOnly, $SequenceStateOnly, $SequenceOwnerOnly, $AccessibilityOnly, $ConnectionOnly, $StreamingOnly, $ExplorerOnly, $PropertiesOnly, $AcceptanceOnly) | Where-Object { $_ }).Count -gt 1) { throw 'Choose only one focused suite.' } +if ((@($SessionsOnly, $PlansOnly, $ExportOnly, $ActivityOnly, $QueryStatisticsOnly, $GlobalBackupOnly, $ColumnTypesOnly, $IndexMaintenanceOnly, $IndexExpressionsOnly, $PartitionTablesOnly, $CascadeJournalOnly, $CascadeRoutinesOnly, $CascadeRollbackOnly, $RevokePreviewOnly, $GrantorConcurrencyOnly, $ExplicitGrantorOnly, $GrantorCatalogOnly, $DefaultProcessOnly, $DefaultDelegationOnly, $DefaultSchemasOnly, $DefaultTypesOnly, $DefaultRoutinesOnly, $DefaultSequencesOnly, $DefaultTablesOnly, $DefaultCancellationOnly, $DefaultUiOnly, $DefaultJournalOnly, $DefaultPrivilegesOnly, $RoutineBoundariesOnly, $RoutineProcessOnly, $RoutineConcurrencyOnly, $RoutinePrivilegesOnly, $BackupFormatsOnly, $IdentityColumnsOnly, $RestoreOwnershipOnly, $UnicodeBackupOnly, $PrivilegeJournalOnly, $MaintainPrivilegeOnly, $PrivilegeCommitOnly, $UnicodePasswordOnly, $MembershipOptionsOnly, $PrivilegeIdentityOnly, $ColumnPrivilegesOnly, $PrivilegeCancellationOnly, $EffectivePrivilegesOnly, $PrivilegeCommandsOnly, $SequencePrivilegesOnly, $CopyOnly, $AdvancedIndexesOnly, $SequencesOnly, $SequenceStateOnly, $SequenceOwnerOnly, $AccessibilityOnly, $ConnectionOnly, $StreamingOnly, $ExplorerOnly, $PropertiesOnly, $AcceptanceOnly) | Where-Object { $_ }).Count -gt 1) { throw 'Choose only one focused suite.' } if ($DesktopOnly -and ($CascadeRoutinesOnly -or $CascadeRollbackOnly -or $RevokePreviewOnly -or $GrantorConcurrencyOnly -or $ExplicitGrantorOnly -or $GrantorCatalogOnly -or $DefaultDelegationOnly -or $DefaultSchemasOnly -or $DefaultTypesOnly -or $DefaultRoutinesOnly -or $DefaultSequencesOnly -or $DefaultTablesOnly -or $DefaultPrivilegesOnly -or $RoutineConcurrencyOnly -or $PrivilegeIdentityOnly -or $AcceptanceOnly -or $UnicodeBackupOnly)) { throw 'The selected focused suite has no desktop checks.' } $projectRoot = Split-Path $PSScriptRoot -Parent $testRoot = Join-Path $projectRoot 'artifacts\postgres-test' @@ -35,7 +35,8 @@ $listener = [System.Net.Sockets.TcpListener]::new([System.Net.IPAddress]::Loopba try { $listener.Start() } finally { $listener.Stop() } $previousTestPort = $env:PGMS_TEST_PORT try { - $pgOptions = "-h 127.0.0.1 -p $TestPort -c ssl=on" + # pg_stat_statements is preloaded only in this disposable cluster; the host service is never touched. + $pgOptions = "-h 127.0.0.1 -p $TestPort -c ssl=on -c shared_preload_libraries=pg_stat_statements" # The server inherits pg_ctl's handles: keep them on files so a redirected caller never blocks. $start = Start-Process -FilePath $pgCtl -ArgumentList @('-D', "`"$dataPath`"", '-l', "`"$serverLog`"", '-o', "`"$pgOptions`"", '-w', 'start') -NoNewWindow -PassThru -RedirectStandardOutput (Join-Path $testRoot 'pg_ctl-start.log') -RedirectStandardError (Join-Path $testRoot 'pg_ctl-start.err') $null = $start.Handle @@ -51,6 +52,7 @@ try { if ($PlansOnly) { $testArgs = @("--", "--plans") } if ($ExportOnly) { $testArgs = @("--", "--export-roundtrip") } if ($ActivityOnly) { $testArgs = @("--", "--activity") } + if ($QueryStatisticsOnly) { $testArgs = @("--", "--query-statistics") } if ($GlobalBackupOnly) { $testArgs = @("--", "--global-backup") } if ($ColumnTypesOnly) { $testArgs = @("--", "--column-types") } if ($IndexMaintenanceOnly) { $testArgs = @("--", "--index-maintenance") } diff --git a/src/PGMS.Desktop/ActivityWindow.xaml b/src/PGMS.Desktop/ActivityWindow.xaml index 00dcc54..f111767 100644 --- a/src/PGMS.Desktop/ActivityWindow.xaml +++ b/src/PGMS.Desktop/ActivityWindow.xaml @@ -1,4 +1,4 @@ - + @@ -25,7 +25,7 @@ - + diff --git a/src/PGMS.Desktop/BuildInfo.cs b/src/PGMS.Desktop/BuildInfo.cs index 2d08263..06de9b6 100644 --- a/src/PGMS.Desktop/BuildInfo.cs +++ b/src/PGMS.Desktop/BuildInfo.cs @@ -2,5 +2,5 @@ namespace PGMS.Desktop; public static class BuildInfo { - public const string Milestone = "M1008"; + public const string Milestone = "M1022"; } diff --git a/src/PGMS.Desktop/CreateTableDialog.xaml b/src/PGMS.Desktop/CreateTableDialog.xaml index 263e227..319f7e6 100644 --- a/src/PGMS.Desktop/CreateTableDialog.xaml +++ b/src/PGMS.Desktop/CreateTableDialog.xaml @@ -3,7 +3,7 @@ - +