Skip to content

SELECT access no longer required on database tables. - #537

Merged
jeremydmiller merged 1 commit into
JasperFx:masterfrom
kiriwalawren:table-info-source
Sep 30, 2016
Merged

SELECT access no longer required on database tables.#537
jeremydmiller merged 1 commit into
JasperFx:masterfrom
kiriwalawren:table-info-source

Conversation

@kiriwalawren

@kiriwalawren kiriwalawren commented Sep 29, 2016

Copy link
Copy Markdown

information_schema.tables requires that any accessor has SELECT permissions to view its contents. pg_stat_user_tables does not. This problem surfaced when attempting to remove SELECT permissions from the mt_hilo table.

@kiriwalawren kiriwalawren changed the title Select no longer required on database tables. SELECT access no longer required on database tables. Sep 29, 2016
@jeremydmiller
jeremydmiller merged commit 69b5260 into JasperFx:master Sep 30, 2016
@jeremydmiller jeremydmiller modified the milestone: 1.1 Oct 5, 2016
@kiriwalawren
kiriwalawren deleted the table-info-source branch November 10, 2020 23:28
jeremydmiller added a commit that referenced this pull request Aug 4, 2026
… status (#5180)

Both overloads hardcoded `LastHeartbeat` and `AgentStatus` to null and never selected the
columns, on the rationale that Marten modelled them but no daemon path wrote them
(#519). That stopped being true at #537 — `ExtendedProgressionWriter`
populates both on every flush, and `AllProjectionProgress` reads them back correctly.

So the targeted per-cell read that #435 added *specifically* as the monitoring
alternative to scanning every row returned NULL for exactly the two fields a monitor calls
it for, with nothing to distinguish a placeholder from a fact — while the expensive path it
was meant to replace returned the truth.

Both queries now select `agent_status` and `heartbeat` when
`EnableExtendedProgressionTracking` is on and hydrate them into the record. With extended
tracking off the columns are not on the table, so the narrow column list is kept and both
fields stay null. In the version-collapsing overload the telemetry follows the winning row
rather than whichever candidate was read first.


Claude-Session: https://claude.ai/code/session_017CTtw2kVRSZKp1p5RTxgAy

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants