> For the complete documentation index, see [llms.txt](https://docs.catalyx.solutions/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.catalyx.solutions/catalyx-blockchain-manager/canton-network/version-2.0/validator-management/participant-query-store.md).

# Participant Query Store

<table><thead><tr><th width="270">Use PQS when</th><th>Skip it when</th></tr></thead><tbody><tr><td>Applications need to query current contract state by attribute, not just by contract ID.</td><td>Applications only stream transactions and maintain their own state.</td></tr><tr><td>You want reporting or analytics over ledger data.</td><td>You have no read-heavy consumers.</td></tr><tr><td>Read load would otherwise fall on the participant.</td><td>The extra database and workload are not worth the benefit.</td></tr></tbody></table>

{% hint style="info" %}
PQS is a **projection**, not a source of truth. The participant's own database remains authoritative — PQS can be rebuilt from the ledger at any time.
{% endhint %}

## Enabling it

Two things are needed on the `Validator`: the component, and a database for it.

```yaml
spec:
  pqs:
    enabled: true
    version: "3.4.1"
    ledgerStart: Latest

  database:
    host: postgres.default.svc.cluster.local
    participantDb: participant_my_validator
    validatorDb: validator_my_validator
    pqsDatabase: pqs_my_validator
    pqsSchema: pqs
    credentialsSecretRef:
      name: my-validator-db-credentials
```

<table><thead><tr><th width="230">Field</th><th>Notes</th></tr></thead><tbody><tr><td><code>pqs.enabled</code></td><td>Defaults to <code>false</code>.</td></tr><tr><td><code>pqs.version</code></td><td><strong>Required when enabled.</strong> It does not fall back to <code>spliceVersion</code> — PQS is versioned independently of the Splice components.</td></tr><tr><td><code>pqs.ledgerStart</code></td><td>Where the pipeline begins reading. Defaults to <code>Latest</code>.</td></tr><tr><td><code>database.pqsDatabase</code></td><td><strong>Required when enabled.</strong> The operator creates the database for you.</td></tr><tr><td><code>database.pqsSchema</code></td><td>Defaults to <code>pqs</code>.</td></tr><tr><td><code>pqs.resources</code>, <code>pqs.jvm</code></td><td>Optional overrides. Defaults are requests <code>500m</code> / <code>1Gi</code>, limits <code>3</code> / <code>2Gi</code>, heap <code>512m</code>–<code>1536m</code>.</td></tr></tbody></table>

{% hint style="warning" %}
`ledgerStart: Latest` means PQS begins from the current ledger end and does **not** backfill history. If you need historical contracts in the store, set the start point when you first enable PQS — changing it later requires rebuilding the store.
{% endhint %}

## What gets created

Enabling PQS adds a sixth component to the validator: a `pqs` application with its own deployment and service, plus the PQS database and schema.

It appears as a `PQS` row on the validator's [Summary](/catalyx-blockchain-manager/canton-network/version-2.0/console-guide-canton/validators/summary.md) tab and as an entry on the [Applications](/catalyx-blockchain-manager/canton-network/version-2.0/console-guide-canton/applications.md) list, with the same health, resource, and log surface as every other component. The validator's overall readiness includes it.

{% hint style="info" %}
There is no PQS-specific screen in the console — no query browser and no pipeline status view. PQS is monitored like any other component. Query the store directly with your own SQL tooling.
{% endhint %}

## Connecting to it

The store is an ordinary PostgreSQL database. Connect with the credentials from the validator's database credentials secret, at the host, database, and schema you configured.

For the schema itself and the query patterns it supports, see Canton's [Participant Query Store documentation](https://docs.canton.network/sdks-tools/development-tools/pqs#pqs-participant-query-store).

## Operating it

**Sizing.** PQS holds a projection of contract state, so its size tracks your active contract set and retention rather than the full transaction history. Start from the defaults and measure.

**Backups.** PQS can be rebuilt from the ledger, so it does not strictly need backing up — but rebuilding a large store takes time. Back it up if your recovery time matters more than the storage cost.

**Restarts.** PQS resumes from where it left off. A restart causes a lag in the projection, not data loss.

{% hint style="warning" %}
If PQS is not ready, the whole validator reports `Degraded` — its readiness is included in the validator's. A PQS pipeline problem will therefore show up as a validator-level alert. Check the `PQS` row on the Summary tab to distinguish it from a participant problem.
{% endhint %}

**Extra environment variables.** Unlike the participant, validator app, and UIs, PQS does not support `spec.overrides` environment variables. Configuration is limited to the fields above.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.catalyx.solutions/catalyx-blockchain-manager/canton-network/version-2.0/validator-management/participant-query-store.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
