Skip to content

Conversation

@kwannoel
Copy link
Contributor

@kwannoel kwannoel commented Dec 10, 2025

I hereby agree to the terms of the RisingWave Labs, Inc. Contributor License Agreement.

What's changed and what's your intention?

If PGWIRE_QUERY_LOG is enabled, we will also log at the start of query execution, not just when the query finishes execution. This allows us to review queries which encounter OOM or abort which can't be caught by the runtime. The result is that we will lose these queries that were executed.

A note on overhead: Currently, if PGWIRE_QUERY_LOG=info is set, we will already emit at least one log for the query on its completion. We add one more log line for start of execution. If the overhead is too high for the user, they can always switch off query logging.

If the overhead is unacceptable, we could downgrade the log level to debug. But I prefer to keep it enabled, or else we have to wait for the event to occur.

Checklist

  • I have written necessary rustdoc comments.
  • I have added necessary unit tests and integration tests.
  • I have added test labels as necessary.
  • I have added fuzzing tests or opened an issue to track them.
  • My PR contains breaking changes.
  • My PR changes performance-critical code, so I will run (micro) benchmarks and present the results.
  • I have checked the Release Timeline and Currently Supported Versions to determine which release branches I need to cherry-pick this PR into.

Documentation

  • My PR needs documentation updates.
Release note

@kwannoel
Copy link
Contributor Author

Currently only extended query mode will log their parsing step. We miss some local query executions, which might still be heavy.

@BugenZhao BugenZhao changed the title chore(runtime): add start of execution logs for all queries chore(pgwire): add start of execution logs for all queries Dec 11, 2025
@kwannoel kwannoel added this pull request to the merge queue Dec 11, 2025
Merged via the queue into main with commit 58a8f43 Dec 11, 2025
42 of 45 checks passed
@kwannoel kwannoel deleted the kwannoel/log-query-at-start branch December 11, 2025 09:12
@github-actions
Copy link
Contributor

✅ Cherry-pick PRs (or issues if encountered conflicts) have been created successfully to all target branches.

@github-actions
Copy link
Contributor

✅ Cherry-pick PRs (or issues if encountered conflicts) have been created successfully to all target branches.

github-merge-queue bot pushed a commit that referenced this pull request Dec 12, 2025
…24090)

Co-authored-by: Noel Kwan <47273164+kwannoel@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants