Page MenuHomePhabricator

Profiling under Postgres is broken
Closed, ResolvedPublic

Description

proposed patch

In maintenance/postgres/tables.sql, the profiling table should be defined like this:

CREATE TABLE profiling (

pf_count   INTEGER         NOT NULL DEFAULT 0,
pf_time    FLOAT           NOT NULL DEFAULT 0,
pf_memory  FLOAT           NOT NULL DEFAULT 0,
pf_name    TEXT            NOT NULL,
pf_server  TEXT            NULL

);

The current use of NUMERIC(18,10) very rapidly overflows the pf_memory column, generating errors. Also, the NUMERIC is very much slower than float, and in this case it has no advantages.

Proposed patch attached.


Version: 1.22.0
Severity: minor

Attached:

Details

Reference
bz55722

Related Objects

View Standalone Graph
This task is connected to more than 200 other tasks. Only direct parents and subtasks are shown here. Use View Standalone Graph to show more of the graph.
StatusSubtypeAssignedTask
InvalidNone
ResolvedNone

Event Timeline

bzimport raised the priority of this task from to Medium.Nov 22 2014, 2:35 AM
bzimport set Reference to bz55722.
bzimport added a subscriber: Unknown Object (MLST).

Change 89995 had a related patch set uploaded by Gerrit Patch Uploader:
In maintenance/postgres/tables.sql, the profiling table should be defined like this:

https://gerrit.wikimedia.org/r/89995

Change 89995 merged by jenkins-bot:
In maintenance/postgres/tables.sql, the profiling table should be defined like this:

https://gerrit.wikimedia.org/r/89995

Jdforrester-WMF subscribed.

Migrating from the old tracking task to a tag for PostgreSQL-related tasks.