---
title: "PostgreSQL PGVector cluster logs"
sidebar_label: "Cluster logs"
sidebar_position: 11
description: "How to enable PostgreSQL PGVector cluster logging, how to get logs, and how to disable cluster logging"
---

import Formbricks from '@theme/MDXComponents/Formbricks';
import EnableLogs from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/enable-logs.mdx';
import DisableLogs from '@site/i18n/en/docusaurus-plugin-content-docs/current/_partials/managed-databases/common/disable-logs.mdx';
import { CustomTable } from '@selectel/docux/components';

# PostgreSQL PGVector cluster logs

Logging uses the [Logs](/logs/) service. For more information about how the service works and its cost, see the [Logs service overview](/logs/about/about-logs.mdx). You can check the availability of the Logs service by location in the [Logs availability by location](/logs/about/logs-availability-by-location.mdx).

For a PostgreSQL PGVector Managed Database cluster, events in PostgreSQL databases and the PgBouncer connection pooler are logged.

To collect cluster logs in the Logs service, you need to [enable logging](#enable-logs). You can [get logs](#get-logs) in the control panel, using API requests, or via the [AWS CLI](/logs/tools/aws-cli.mdx). If you no longer need to collect logs, you can [disable logging](#disable-logs).

Logs are stored for 30 days.

Learn more about logging in PostgreSQL databases in the [Error Reporting and Logging](https://www.postgresql.org/docs/current/runtime-config-logging.html) section of the PostgreSQL documentation.

## Enable logging \{#enable-logs}

<EnableLogs DatabaseName="PostgreSQL PGVector" slug="pgvector" ArticleName="Monitoring of the cluster, nodes and databases PostgreSQL PGVector" />

## Get logs \{#get-logs}

Use the [Get logs](/logs/manage/get-logs.mdx) guide in the Logs section.

For a PostgreSQL PGVector Managed Database cluster, event streams `postgresql.log-<instance_id>` and `pgbouncer.log-<instance_id>` will be created, where `<instance_id>` is the ID of the PostgreSQL PGVector cluster node.

View the description of [log fields](#fields) for the PostgreSQL cluster.

## Log fields \{#fields}

<CustomTable>
  <table>
    <tbody>
      <tr>
        <th>\_HOSTNAME</th><td>Cluster node name in the format `dbaas-<instance_id>`, where `<instance_id>` is the ID of the PostgreSQL PGVector cluster node</td>
      </tr>

      <tr>
        <th>SYSLOG_IDENTIFIER</th><td>Log source name</td>
      </tr>

      <tr>
        <th>SYSLOG_TIMESTAMP</th><td>Event time in the log</td>
      </tr>

      <tr>
        <th>MESSAGE</th><td>Description of the event transmitted by the log source</td>
      </tr>
    </tbody>
  </table>
</CustomTable>

## Disable logging \{#disable-logs}

<DisableLogs />

<Formbricks />
