---
id: w1/m25/t005
title: "`parameter-overrides`: read (and where CNPG allows, write) non-default `postgresql.conf` params"
worker: worker1
status: todo
estimate: 45m
depends_on: []
---

## Objective

Expose Render's `GET/PATCH /postgres/{id}/parameter-overrides` equivalent across REST/GraphQL/MCP.

## Context

- CNPG clusters accept `postgresql.conf` overrides via `Cluster.spec.postgresql.parameters`.
- The `Database` CR (`lego/types/`) may need a field to carry user-set overrides if none exists yet — check before adding.

## Steps

1. Add a read path: list non-default `postgresql.conf` parameters currently applied (diff against Postgres defaults or CNPG's own defaults).
2. Add a write path if the `Database` CR already models a parameters field; otherwise scope this task to read-only and file the write path as a follow-up (do not silently expand scope).
3. Wire into REST (`GET/PATCH /v1/postgres/{id}/parameter-overrides`), GraphQL, MCP.

## Files

- `lego/types/` (`Database` CR, only if a parameters field is missing)
- `lego/backend/internal/postgres/` observability verb + REST/GraphQL/MCP adapters

## Acceptance criteria

- [ ] Endpoint returns real non-default parameter overrides from a live CNPG cluster on all three surfaces.
- [ ] If write support isn't feasible within scope, the read-only decision and follow-up are documented in the PR/commit, not silently dropped.

## Out of scope

- Full `postgresql.conf` parameter catalog UI — Render itself only exposes overrides, not the full catalog.
