Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -117,6 +117,8 @@ Serverless SQL Databases support the most popular PostgreSQL extensions. Refer t
```
In this example, `SHOW timezone` will always display `Europe/Paris` without any impact from any other connection despite connection pooling.

- `SET search_path TO` commands to use schemas works, but will be shared across multiple clients due to connection pooling, and will lead to unwanted effects. Refer to the [dedicated troubleshooting page](/serverless-sql-databases/troubleshooting/search-path-schema-errors/) for more information.

- Security labels cannot be defined or changed.

```sql
Expand Down
1 change: 1 addition & 0 deletions pages/serverless-sql-databases/troubleshooting/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -44,4 +44,5 @@ productIcon: ServerlessDbProductIcon
- [Solving Serverless SQL Databases connection timeouts](/serverless-sql-databases/troubleshooting/connection-timeout)
- [Solving failing manual backup and restore operations](/serverless-sql-databases/troubleshooting/failing-backup-restore)
- [Solving maximum prepared statements size errors](/serverless-sql-databases/troubleshooting/maximum-prepared-statements-reached)
- [Solving issues when setting search path to a schema](/serverless-sql-databases/troubleshooting/search-path-schema-errors/)
</LinksList>
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
---
title: Solving errors while setting search path to schemas
description: This page contains information to troubleshoot problems encountered while using SET search_path TO schema requests.
tags: set search path to schema error problem bug 500 connection lost db pgbouncer pooling
dates:
validation: 2025-10-10
posted: 2025-10-10
---

## Problem

I am experiencing issues while using `SET` commands such as the following:

```sql
SET search_path TO my_schema
```

## Cause

- `SET search_path TO` commands to use schemas works, but will be shared across multiple clients due to connection pooling, and will lead to unwanted effects.

## Possible solutions

- Use fully qualified schema names (`schema.table`) to perform stateless and self-contained transactions that do not rely on or modify session-level settings.

- Perform the `SET` command in the same transaction as the request, using the `SET LOCAL` command so it applies to the current transaction only:

```sql
BEGIN;
SET LOCAL search_path TO schema1;
SELECT ... ;
COMMIT;
```