Skip to main content

Limits

Beta

Databases are in beta: everything described here works, but the interface and some features are still changing. More on the Databases page.

All the numbers on one page. Data API limits are on a separate one: What's Missing.

How many databases​

DatabaseHow many you can have
Sharedone per organization, Pro only
Dedicatedunlimited. One is provisioned at a time: you can place the next order once the previous database is up

Storage​

Shared databaseDedicated database
How much0.5 GBthe configuration's disk: 8 to 2,000 GB
Can it be increasedno — only by moving to a dedicated databaseyes, the disk grows without interruption
Can it be reduced—no

The exact quota is shown on the database card and in the output of layero db list: shared databases created earlier may have more than 0.5 GB.

When a shared database runs out of space, writes stop, but reads keep working. The quota is hard: nothing can be written beyond it, neither data nor temporary query files. For a dedicated database, the limit is its disk — watch the storage chart and increase the disk in advance.

Warnings appear in the dashboard only; there are no emails:

UsedWhat you see
from 75%the storage figure on the overview turns yellow, and the monitoring page shows a warning
from 90%the figure turns red
100%writes to the database are rejected

What to do when space is running out:

  • look at the five largest tables: Monitoring → Database storage;
  • delete what you don't need and run VACUUM — deleted rows don't free up space right away;
  • move a shared database to a dedicated one or increase a dedicated database's disk — see Changing the configuration.

Compute​

A shared database shares the server's CPU and memory with other shared databases. There's no guaranteed share, so a shared database is good for prototypes and small sites, but not for heavy analytics. The platform terminates a process that needs more than 128 MB of memory, so that a single query doesn't bring down its neighbors.

A dedicated database gets all the cores and memory of its configuration.

Connections​

All connections from outside and from applications go through the shared entry point db.layero.ru:5432.

WhatLimit
Concurrent connections per role20. The owner of a dedicated database gets more — it depends on the configuration
Concurrent connections from one address50
New connections from one address2 per second on average (120 per minute), up to 60 at once
Waiting for a free connection15 seconds, then a refusal
Encryptionmandatory; connections without TLS are rejected

The database's connection limit is shown as a dashed line on the Monitoring → Connections chart. From 80%, the chart turns yellow.

Each connected project has its own role, and therefore its own 20 connections. Applications on Layero aren't subject to the per-address limits.

Connection pool​

The db.layero.ru entry point is a pool in transaction mode: each transaction may go to a different server connection. For ordinary queries and ORMs this is invisible, but a few session-level things don't carry over to the next transaction:

Doesn't work across transactionsWhat to do
SET outside a transactionSET LOCAL inside a transaction, or a role setting: ALTER ROLE … SET
LISTEN / NOTIFYpoll on an interval
session-level advisory lockspg_advisory_xact_lock — a lock for the duration of the transaction
temporary tablescreate and use them within a single transaction

Query time​

Database roles have these ceilings by default:

SettingValueWhat it means
statement_timeout30 secondsa longer query is cancelled
idle_in_transaction_session_timeout60 secondsa transaction that sits idle for more than a minute is closed
lock_timeout10 secondswaiting for a lock any longer — a refusal

You can run a long migration by raising the ceiling inside its transaction:

begin;
set local statement_timeout = '10min';
-- migration
commit;

SQL editor and layero db sql​

WhatValue
Time per query30 seconds
Rows in the responsethe first 500; the rest are cut off with a note
Length of a single value4,096 characters
Statements per scriptup to 200, run as a single transaction
Query lengthup to 20,000 characters
Rows in Tablesloaded in chunks as you scroll

For data exports and anything that hits these limits, connect directly with psql or a driver using the connection string.

Backups​

Shared databaseDedicated database
By defaultoffoff
How oftenonce a day, you choose the houronce a day, at night
How long they're kept1 to 7 days1 to 14 backups
Priceincluded in Propaid option
Restoreinto the same database, to the moment of the backupinto the same database, to the moment of the backup

Details — Backups.

Access and security​

WhatValue
Who connects from outsideonly addresses from the database's list. Applications on Layero — always
AddressesIPv4 only
Wrong passwords10 in 5 minutes — the address is blocked for 30 minutes; repeat blocks last longer, up to 16 hours

Details — Who to let in.

Extensions​

The toggle in the Extensions section enables pgcrypto, uuid-ossp, citext, pg_trgm, unaccent, btree_gin, and pgvector. The other extensions in the list are locked: they can only be enabled through support. If an extension isn't in the list at all, it isn't on the server. TimescaleDB won't be available: its license prohibits offering it as part of a cloud database.

PostgreSQL versions​

Shared databaseDedicated database
Version1814, 15, 16, 17, or 18 — chosen when ordering
Upgrading the version—not possible yet