Skip to content

feat(query): SHOW/TERMINATE SESSIONS - #1814

Merged
vpavicic merged 6 commits into
release/3.14from
docs/session-user-read-uaf
Oct 20, 2026
Merged

vpavicic merged 6 commits into
release/3.14from
docs/session-user-read-uaf

Conversation

@katarinasupe

@katarinasupe katarinasupe commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

Documents SHOW SESSIONS and TERMINATE SESSIONS on the Transactions page and in the query privileges table. Also fixes two older statements on the same page: TERMINATE TRANSACTIONS $id (parameters were never accepted) and the new database column of SHOW TRANSACTIONS (memgraph/memgraph#4571).

Not done:

  • SHOW ACTIVE USERS also gained columns in #4571 (server-stats page).
  • #4577's release note says SESSIONS is now a reserved keyword; on the daily build sessions still works as a variable name, so the docs don't mention it.
  • The snapshot phase values come back lowercase ("vertices"), while the table on the page lists them in uppercase (older text, not changed here).

Checked on the 20261011 daily build (c829e614, includes #4577, #4571 and #4843): SHOW SESSIONS columns, TERMINATE SESSIONS results and errors, parameters, explicit transactions, terminating idle and running sessions, and both SHOW TRANSACTIONS outputs (snapshot rows show the database too). Enterprise privilege rules not run.

Related: #1831 documents memgraph/memgraph#4843.

Product PR

memgraph/memgraph#4577

Checklist

  • For a product change: milestone set to the release and feature or bugfix label added
  • For a product change: this PR is linked from the product PR's documentation checklist

@katarinasupe katarinasupe added this to the 3.14 milestone Oct 7, 2026
@katarinasupe katarinasupe added the feature Documentation related to a new product feature of feature update label Oct 7, 2026
@vercel

vercel Bot commented Oct 7, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
documentation Ready Ready Preview Oct 20, 2026 11:55am UTC

Request Review

@andrejtonev andrejtonev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for writing this up! I checked every statement against current master (6e9c79da3), on a live instance as well as in the code. Most of it is accurate. The inline comments cover two statements that are wrong for 3.14 (SESSIONS isn't reserved, and the forced-DROP DATABASE example no longer applies after #4843), a few that overstate what happens (killed: true, "running query is aborted"), and some behaviour that's missing: open-transaction rollback, what the client sees and driver retries, auth disabled, Community vs Enterprise, impersonation, coordinators, LOGOFF and $id parameters. Every suggestion was re-run against master.

Three things outside this diff:

  1. TERMINATE TRANSACTIONS $id (around line 340): "A parameterized id is treated exactly like a literal one, so running TERMINATE TRANSACTIONS $id with $id = "*" also terminates everything." This has never worked. The grammar only accepts a literal there (transactionId : literal, unchanged since the query was added), so TERMINATE TRANSACTIONS $id is a syntax error (extraneous input '$' expecting ...) whatever $id is. The sentence came in with v3.13 (#1689). Suggested replacement: "Transaction ids, including "*", must be string literals. Query parameters such as $id aren't supported and cause a syntax error."
  2. SHOW TRANSACTIONS columns (line 95): since memgraph#4571 (3.14, listed under breaking changes in #1764), SHOW TRANSACTIONS returns an 8th column, database, after elapsed_ms. The page still says "contains seven columns", and the column table and example outputs don't include it. Suggested row: | database | String | The database the transaction is running on. |
  3. PR description: it says the SHOW TRANSACTIONS fix is internal and "the release note already covers it". It doesn't: on release/3.14 the only #4577 entry is the feature line. I've suggested a bug-fix line on #1764.

Comment thread pages/fundamentals/transactions.mdx
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/database-management/authentication-and-authorization/query-privileges.mdx Outdated
@andrejtonev andrejtonev mentioned this pull request Oct 7, 2026
katarinasupe and others added 2 commits October 7, 2026 13:48
Documents the session management queries from memgraph/memgraph#4577:
listing open Bolt sessions and terminating them from another connection,
who can see and terminate which sessions, the result columns, and the
SESSIONS reserved keyword. Adds both queries to the query privileges table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Also fix the TERMINATE TRANSACTIONS parameter claim and add the database
column of SHOW TRANSACTIONS.
Comment thread pages/database-management/authentication-and-authorization/query-privileges.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
@katarinasupe
katarinasupe marked this pull request as ready for review October 12, 2026 11:35
@katarinasupe

Copy link
Copy Markdown
Contributor Author

@andrejtonev this PR is updated based on #1831. Can you take a look at this PR again and approve if it's fine. Also, feel free to review the other PR as well. Thank you!

@andrejtonev andrejtonev left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks, the 10-12 commits cover almost all of the first round: the reserved-keyword sentence, FORCE, $id, coordinators, LOGOFF, impersonation, Community and the termination outcomes are all in, and they hold on 3.14.0-rc3. A few things are left inline: the idle-client sentence (a plain query fails once before the driver reconnects), the database column of SHOW SESSIONS, and three small ones.

Outside this diff:

  • #1843 and #1844 also edit transactions.mdx. Git merges all three cleanly in either order. #1843 rewrites the walkthrough just above ## Manage sessions (base lines 434-440), so this PR's hunk context there (the old infinite query message) is stale on GitHub, but that's only cosmetic. Two dependencies to keep in mind when merging:
    • #1843's snapshot and GC db_name rows say "The database column shows the same value", but the database row of the column table is added here. #1843 alone points at a column the table doesn't list.
    • This PR leaves two 7-column outputs (the GC example and the walkthrough); #1843 replaces both. The PR body's "phase values … uppercase (older text, not changed here)" is also fixed by #1843. Merging the two together, or this one first, avoids an in-between state.
  • Wording shared with #1843 (SHOW ACTIVE USERS INFO). The login timestamp and impersonation wording match. The database column doesn't (inline N2): #1843 gives the main-database fallback but not "", this PR gives "" but not the fallback. Both columns return the same value, so both pages should say both.
  • #1844 (LOGOFF clears session state). No contradiction. On re-login as another user the session keeps its session_id, and username and database change to the new login's. See inline N6.
  • Release notes. #1845 removes "SESSIONS is a reserved keyword" from the 3.14 notes. There's still no bug-fix line for the SHOW TRANSACTIONS / SHOW ACTIVE USERS INFO foreign-read race (memgraph/memgraph#4571, memgraph/memgraph#4577).

Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Comment thread pages/fundamentals/transactions.mdx Outdated
Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>
@vpavicic
vpavicic merged commit 0815f69 into release/3.14 Oct 20, 2026
3 checks passed
vpavicic added a commit that referenced this pull request Oct 21, 2026
* Add Memgraph v3.14.0 and Lab v3.14.0 release note titles

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: the bare pattern shorthand takes what a MATCH pattern takes (#1756)

* docs: the bare pattern shorthand takes what a MATCH pattern takes

The page stated two rules that no longer hold: that the shorthand's pattern cannot introduce names
of its own, and that it holds a pattern and nothing else so a filter needs the `MATCH` form. It now
takes a variable it declares itself, a trailing `WHERE`, a comma-separated list, a named path and a
lone node.

The worked example is the filter the old text used to send to the `MATCH` form, written as the
shorthand, with output from the page's own dataset. `COLLECT` still has no shorthand.

* docs: a pattern holding only a bound variable matches on its value

A pattern that names a variable the query has already bound used to be ignored, so the row passed
through whatever the variable held. It is now matched: a node is kept, a null matches nothing and
drops the row, and a value that is neither raises. This applies to a top-level MATCH and a CALL {}
subquery as well as to a subquery expression body, which the pages did not say.

Also documents the rule that came with it: a pattern name inside a subquery expression body may not
repeat a name from outside the body.

Every output block was produced by running the query against its own page's dataset block.

* docs: document the nullIf built-in (#1763)

* docs(querying): document the nullIf built-in

nullIf(value1, value2) answers null where the two arguments are equal
and the first argument otherwise, so it takes a value away where
coalesce supplies one.

* docs(querying): drop nullIf from the unsupported function list

It was the only entry under the scalar functions heading, so the
heading goes with it.

* Add Memgraph v3.14.0 release notes and drop per-release sitemap steps.

Co-authored-by: Cursor <cursoragent@cursor.com>

* docs: unlisted auth schemes pass through on coordinators without SSO (#1792)

Document memgraph/memgraph#4962: on a coordinator, any Bolt scheme not
listed in --auth-module-mappings now takes the same passthrough path as
basic/none instead of being rejected outright. Describe the two-path
rule, the per-scheme denial messages once SSO is configured, and the
3.13 -> 3.14 behavior change.

* docs: document disk_available row in SHOW STORAGE INFO (#1791)

Documents the new instance-level disk_available row added in
memgraph/memgraph#4952. Adds it to the SHOW STORAGE INFO reference
table and the example output.

Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com>

* docs: allow UNWIND in an EXISTS, COUNT or COLLECT body (#1783)

* docs: add collections.index_of (#1782)

* feat: label expressions in node patterns and expressions (#1797)

* docs: label expressions in node patterns and expressions

* Update pages/querying/differences-in-cypher-implementations.mdx

---------

Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com>

* Document OPTIONAL CALL subqueries (#1776)

`OPTIONAL CALL ( scope ) { body }` keeps an input row whose subquery returns no
rows, with the subquery's columns set to null - the OPTIONAL MATCH contract.

Section 2.4 said the scoped `CALL (...)` form could not be combined with
`OPTIONAL` and showed the exact query that now works. It is replaced by 1.7
under the supported uses, and 2.4 now covers the case that is still rejected:
`OPTIONAL` on a procedure call rather than on a subquery, with the subquery
wrapping that does work.

* Complete the Memgraph v3.14.0 changelog.

Fill in the remaining breaking, feature, fix, and improvement notes
for merged memgraph PRs on this release.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add v3.14.0 release notes for nine more PRs and tighten bug-fix skill wording.

Co-authored-by: Cursor <cursoragent@cursor.com>

* Add v3.14.0 release notes for 18 more milestone PRs.

Co-authored-by: Cursor <cursoragent@cursor.com>

* feat(dbms): close idle sessions that keep a FORCE-dropped database pinned (#1831)

* docs: forced DROP DATABASE closes idle sessions on the dropped database

* Apply batched suggestions from code review

Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>

* Apply batched suggestions from code review

Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com>

---------

Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com>
Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>

* How Memgraph compares and orders values (3.14 comparison series) (#1833)

* Document comparisons with null in lists and maps (memgraph#4794)

* Document ordering comparisons for values without an order

* Fix the ORDER BY sentence: two maps raise an error

* Document which values a uniqueness constraint never treats as duplicates

* Document ORDER BY and min/max over columns of different types (3.14 comparison series)

* Keep only what readers hit; don't restate openCypher's comparison rules

* docs: explain and raise the per-process open files limit (#1834)

* docs: explain and raise the open files limit (LimitNOFILE, Docker ulimit)

* docs: soften open files sizing numbers and document the fs.nr_open ceiling

Review follow-up: sizing figures are now approximate, and the section notes
that LimitNOFILE cannot exceed fs.nr_open and how to check it. The heading
anchor #handle-numerous-open-files-simultaneously is referenced from the
Memgraph startup warning.

* docs: pin open files limit change to v3.15 and trim unverified sizing numbers

* docs: restore upstream heading ids after rebase, add ids to new steps, target v3.14

* docs: open files limit — only the hard limit matters on 3.14; symptoms, warning and INFO line

* Document auth queries in explicit transactions (#1836)

Auth queries can now run in an explicit transaction and apply together or
not at all. Add a section on this to the authentication overview, and update
the pages that said auth queries can't run in a transaction. Document that
user and tenant profile changes are now refused in explicit transactions.

* docs(multi-tenancy): what happens after DROP DATABASE ... FORCE (#1842)

* feat(query): tenant DB in SHOW TRANSACTIONS / SHOW ACTIVE USERS + foreign-read UAF fix + precise stuck-drain diagnostics (#1843)

* docs: database columns in SHOW ACTIVE USERS INFO and SHOW TRANSACTIONS outputs

* docs(server-stats): login timestamp, username and database cells match the 3.14 behaviour

* docs: per-session state lasts for the connection; a user switch clears it (#1844)

* release notes 3.14: correct #4571 #4573 #4577 #4843 #4932; add #5029 #5129 #5132 #5135 (#1845)

* feat(query): SHOW/TERMINATE SESSIONS (#1814)

* docs: SHOW SESSIONS and TERMINATE SESSIONS

Documents the session management queries from memgraph/memgraph#4577:
listing open Bolt sessions and terminating them from another connection,
who can see and terminate which sessions, the result columns, and the
SESSIONS reserved keyword. Adds both queries to the query privileges table.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

* docs: apply review on SHOW/TERMINATE SESSIONS

Also fix the TERMINATE TRANSACTIONS parameter claim and add the database
column of SHOW TRANSACTIONS.

* docs: apply review on session wording and termination behavior

* docs: real SHOW TRANSACTIONS output, FORCE note, pooled clients

* Apply batched suggestions from code review

Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>

---------

Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Vlasta <95473291+vpavicic@users.noreply.github.com>
Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>

* Conditional subqueries with WHEN in CALL, EXISTS, COUNT and COLLECT (#1813)

* docs: add conditional CALL subqueries with WHEN

* docs: allow WHEN branches in EXISTS, COUNT and COLLECT bodies

* docs: drop the predicate evaluation details

* docs: use Croatian names in the conditional CALL example

* release notes 3.14: add #4524 #4953 #5026 #5032 #5107 #5111 #5126 #5139 #5156

Co-authored-by: Cursor <cursoragent@cursor.com>

* update docs for FIPS builds of Memgraph (#1848)

* update docs for FIPS builds of Memgraph

* update docker page

* docs: move WHEN in EXISTS, COUNT and COLLECT bodies to 3.15

memgraph#4985 moved to the 3.15 milestone.

* docs: tag non-runnable examples and drop duplicate Previous releases heading

* release notes 3.14: #4969 closes only connections whose driver session targeted the database

---------

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Ivan Milinović <44698587+imilinovic@users.noreply.github.com>
Co-authored-by: Andi Skrgat <andi8647@gmail.com>
Co-authored-by: Katarina Supe <61758502+katarinasupe@users.noreply.github.com>
Co-authored-by: andrejtonev <29177572+andrejtonev@users.noreply.github.com>
Co-authored-by: colinbarry <colin.barry@memgraph.io>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: Dr Matt James <mattkjames7@gmail.com>
Co-authored-by: katarinasupe <supe.katarina@gmail.com>

This branch was successfully deployed

1 active deployment
Preview — 6b56f897 Deployed Oct 20, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

feature Documentation related to a new product feature of feature update

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants