[25.3.1] - 2025-07-25

Features

- Introduce automatic system catalog schema upgrade on new releases
  (automatically executing DDL/DML and creating internal functions).

ACL
- The maximum number of users and roles that can be created has been increased from 32 to 128.

SQL
- SQL supports `ORDER BY ... NULLS FIRST/LAST` operation.
- SQL supports `INSERT INTO ... ON CONFLICT DO FAIL/REPLACE/NOTHING` operation for globally distributed tables.
- SQL supports modulo operator `%` for integers.
- SQL supports window function `last_value()`.
- SQL supports new volatile scalar functions `pico_raft_leader_id()` and `pico_raft_leader_uuid()`.
- SQL scalar function `instance_uuid` is now marked as deprecated, consider using `pico_instance_uuid`.
- SQL supports new stable scalar function `version()`, that returns version of the current instance.

Pgproto

- Support LDAP with TLS (StartTLS) for LDAP authentication menthod
  - use TT_LDAP_ENABLE_TLS=true environment variable to turn on

- More metrics:
  - pico_pgproto_connections_closed_total
  - pico_pgproto_connections_opened_total
  - pico_pgproto_portals_closed_total
  - pico_pgproto_portals_opened_total
  - pico_pgproto_statements_closed_total
  - pico_pgproto_statements_opened_total

Config

- Config supports `instance.pg.advertise` option for pgproto server advertise address,
  which defaults to `instance.pg.listen`. It also can be set in the CLI via `--pg-advertise` option.

WebUI

- Display cluster ID and instance PG address
- Cluster info and other data refreshes automatically every 10 seconds if the window is focused

Fixes

- Fixed numerous panics when setting invalid values for alter system parameters
- Fixed the modification of `_pico_service_route`; it is now retriable.

- Fixed a performance issue with global table DML which resulted in an up to 95x performance increase!

- Fixed sorting in WebUI - it's now consistent across reloads
- Fixed WebUI dependency on internet access for displaying fonts

- Fixed a bug which broke intra-replicaset replication when upgrading from 25.1.* to 25.2.*.
  Note that clusters broken by this bug require some manual actions in addition
  to this fix, but newer version should upgrade fine. Note also that this fix
  does not include the actual schema upgrade procedure, so the cluster will
  still have a schema of the older version of picodata. For details see
  https://git.picodata.io/core/picodata/-/issues/1946#note_157146

- Preserve parameter types provided by client.
  Previously, we'd completely replace parameter types array with the one
  derived by the Sbroad's type system. As a result, sometimes the type
  could implicitly change from VARCHAR to TEXT, causing various problems
  to client drivers.

- Fixed a bug when parsing RFC 3339 timestamps with a date-time delimiter other than `T`
  resulted in an error.

- Fixes unnecessary vshard router and storage config updates.

- Fixed a bug which could sometimes lead to unconstrained stream of requests
  from a failed instance (implemented expontential backoff for sentinel requests).

- Fixed a bug where cluster-wide settings for options `sql_vdbe_opcode_max` and `sql_motion_row_max`
  were not applied to queries made through pgproto.

- Fixed a panic in sentinel loop because of integer overflow when multiplying.

- Fixed a bug where picodata would sometimes indefinitely block when applying
  DDL operations which could result in full replicaset failure.

- Fixed a bug where picodata would sometimes indefinitely block after a
  restart and/or network failure when receiving a raft snapshot.

Lua API

- Remove `pico.exit` function as it is no longer used.

Plugin API

- Allowed to use different patch level versions of SDK (ex. allow to run plugin built with 25.3.1 to run on Picodata 25.3.2)
- Added `cluster_uuid()` API and corresponding `pico_ffi_cluster_uuid`
  FFI binding to retrieve the cluster UUID of the current instance.