github pganalyze/collector v0.67.0

3 days ago
  • Add support for capturing plan statistics with pg_stat_plans
  • Avoid skipping query stats in case of slow query text/schema collection
    • This reworks how pg_stat_statements data is retrieved, to ensure query
      statistics are continuously collected at 1 minute intervals, even if the
      full snapshot collection is slow (e.g. due to query text file size or many
      tables/indexes)
  • Improve the correctness of replication/server/backend count metrics
    • Previously these metrics were collected after potentially slow operations in
      the full snapshot, causing different collection times instead of staying
      close to the intended 10 minute interval
  • GCP Pub/Sub: Allow multiple collectors subscribing to the same topic
    • This adds the new gcp_pubsub_max_age / GCP_PUBSUB_MAX_AGE setting,
      default 0, maximum 24 hours. Keeping the age limit low is recommended,
      10 minutes (gcp_pubsub_max_age = 10m) is a good value to use
    • If set to a non-zero value, the collector returns a GCP PubSub message
      that's not for a configured server to the topic (by sending a "Nack"
      message), allowing a different collector to pick it up. This enables an
      architecture where one topic can be shared across multiple collectors
    • However, if the message is older than the max age limit, it is always
      acknowledged (discarded)
  • Improve buffer cache connection handling to avoid connection leak
    • Previously this may have blocked on an unconsumed channel, which could have
      caused the database connection to stay open longer than planned
  • Disable buffer cache collection for Aurora Serverless
    • We've had a report of a Postgres segfault caused by scanning the buffer
      cache during an Aurora Serverless scaling event, which was confirmed by AWS
      to be a current Aurora bug. For now collection of pg_buffercache is turned
      off until a bugfix is available
  • Helper: Don't require "locate" to determine the pg_controldata path
    • This fixes cluster ID detection (via the Postgres system identifier)
      for a typical PGDG-based Debian/Ubuntu install
  • Prune stray temporary files on collector start
    • Previously an out of memory crash, typically due to systemd limits, could
      cause temporary files to stay around and never be deleted
    • Now the collector will remove such files when it starts back up, avoiding
      potential disk space issues with the temporary file directory
    • Collector temporary files are now prefixed with "pganalyze_collector_" to
      support this functionality, and make identification easier
  • Introduce new "api_require_websocket" / "API_REQUIRE_WEBSOCKET" setting
    • This setting (currently defaulting to off) can be used to require that
      the more efficient WebSocket connection method is used for submitting
      snapshots to the pganalyze server
    • We intend to migrate fully to WebSockets in the future, and a future
      collector release will change the defaulf of this setting to true, i.e.
      require their use by default (with this setting remaining for a while
      after that as a fallback, until it is fully required)
  • OTel Log Server: Support receiving JSON log format in addition to Protobuf
    • This supports using Vector instead of Fluentbit for forwarding log events
      from a CloudNativePG (CNPG) installation on Kubernetes
    • With thanks to Rauan Mayemir for the initial contribution of this fix
  • Log event redaction: Fix off-by-one error when redacting full lines
    • This caused log lines where the full line should be redacted (as is
      typically the case with STATEMENT lines when using log filtering) to not
      be redacted correctly.
  • Fix nap logic of "--text-explain" to actually wait the configured time
  • Include database name in warning when pg_stat_statements is out of date
  • Handle test cancellation correctly during log tests (avoid hangs)

Don't miss a new collector release

NewReleases is sending notifications on new releases.