Skip to content
biscuit

biscuit

pg_biscuit : IAM-LIKE pattern matching with bitmap indexing

Overview

ID Extension Package Version Category License Language
2170
biscuit
pg_biscuit
2.4.3
FTS
MIT
C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d--
No
Yes
No
Yes
no
no
Relationships
Schemas public
Requires
plpgsql
See Also
hll
rum
pg_textsearch

Latest stable PGXN distribution and package release is 2.4.3; 2.5.0 is testing; packaged control and SQL default version remain 2.4.1; package name is biscuit.

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
2.4.3
18
17
16
15
14
pg_biscuit plpgsql
RPM
PIGSTY
2.4.3
18
17
16
15
14
biscuit_$v -
DEB
PIGSTY
2.4.3
18
17
16
15
14
postgresql-$v-biscuit -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
el8.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
el9.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
el9.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
el10.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
el10.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
d12.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
d12.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
d13.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
d13.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u22.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u22.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u24.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u24.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u26.x86_64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
u26.aarch64
PIGSTY 2.4.3
PIGSTY 2.4.3
PIGSTY 2.4.3
N/A
N/A
Package Version OS ORG SIZE File URL
biscuit_18 2.4.3 el8.x86_64 pigsty 64.8 KiB biscuit_18-2.4.3-1PIGSTY.el8.x86_64.rpm
biscuit_18 2.4.0 el8.x86_64 pgdg 62.4 KiB biscuit_18-2.4.0-1PGDG.rhel8.10.x86_64.rpm
biscuit_18 2.2.2 el8.x86_64 pgdg 63.6 KiB biscuit_18-2.2.2-1PGDG.rhel8.10.x86_64.rpm
biscuit_18 2.4.3 el8.aarch64 pigsty 62.1 KiB biscuit_18-2.4.3-1PIGSTY.el8.aarch64.rpm
biscuit_18 2.4.0 el8.aarch64 pgdg 59.2 KiB biscuit_18-2.4.0-1PGDG.rhel8.10.aarch64.rpm
biscuit_18 2.2.2 el8.aarch64 pgdg 59.1 KiB biscuit_18-2.2.2-1PGDG.rhel8.10.aarch64.rpm
biscuit_18 2.4.3 el9.x86_64 pigsty 63.6 KiB biscuit_18-2.4.3-1PIGSTY.el9.x86_64.rpm
biscuit_18 2.4.0 el9.x86_64 pgdg 62.8 KiB biscuit_18-2.4.0-1PGDG.rhel9.8.x86_64.rpm
biscuit_18 2.2.2 el9.x86_64 pgdg 65.2 KiB biscuit_18-2.2.2-1PGDG.rhel9.8.x86_64.rpm
biscuit_18 2.2.2 el9.x86_64 pgdg 65.3 KiB biscuit_18-2.2.2-1PGDG.rhel9.7.x86_64.rpm
biscuit_18 2.2.2 el9.x86_64 pgdg 65.4 KiB biscuit_18-2.2.2-1PGDG.rhel9.6.x86_64.rpm
biscuit_18 2.4.3 el9.aarch64 pigsty 62.6 KiB biscuit_18-2.4.3-1PIGSTY.el9.aarch64.rpm
biscuit_18 2.4.0 el9.aarch64 pgdg 61.9 KiB biscuit_18-2.4.0-1PGDG.rhel9.8.aarch64.rpm
biscuit_18 2.2.2 el9.aarch64 pgdg 62.6 KiB biscuit_18-2.2.2-1PGDG.rhel9.8.aarch64.rpm
biscuit_18 2.2.2 el9.aarch64 pgdg 62.6 KiB biscuit_18-2.2.2-1PGDG.rhel9.7.aarch64.rpm
biscuit_18 2.2.2 el9.aarch64 pgdg 62.8 KiB biscuit_18-2.2.2-1PGDG.rhel9.6.aarch64.rpm
biscuit_18 2.4.3 el10.x86_64 pigsty 65.2 KiB biscuit_18-2.4.3-1PIGSTY.el10.x86_64.rpm
biscuit_18 2.4.0 el10.x86_64 pgdg 64.7 KiB biscuit_18-2.4.0-1PGDG.rhel10.2.x86_64.rpm
biscuit_18 2.2.2 el10.x86_64 pgdg 67.9 KiB biscuit_18-2.2.2-1PGDG.rhel10.2.x86_64.rpm
biscuit_18 2.2.2 el10.x86_64 pgdg 67.9 KiB biscuit_18-2.2.2-1PGDG.rhel10.1.x86_64.rpm
biscuit_18 2.2.2 el10.x86_64 pgdg 68.6 KiB biscuit_18-2.2.2-1PGDG.rhel10.0.x86_64.rpm
biscuit_18 2.4.3 el10.aarch64 pigsty 64.2 KiB biscuit_18-2.4.3-1PIGSTY.el10.aarch64.rpm
biscuit_18 2.4.0 el10.aarch64 pgdg 63.4 KiB biscuit_18-2.4.0-1PGDG.rhel10.2.aarch64.rpm
biscuit_18 2.2.2 el10.aarch64 pgdg 64.8 KiB biscuit_18-2.2.2-1PGDG.rhel10.2.aarch64.rpm
biscuit_18 2.2.2 el10.aarch64 pgdg 64.8 KiB biscuit_18-2.2.2-1PGDG.rhel10.1.aarch64.rpm
biscuit_18 2.2.2 el10.aarch64 pgdg 64.8 KiB biscuit_18-2.2.2-1PGDG.rhel10.0.aarch64.rpm
postgresql-18-biscuit 2.4.3 d12.x86_64 pigsty 143.0 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~bookworm_amd64.deb
postgresql-18-biscuit 2.4.3 d12.aarch64 pigsty 138.0 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~bookworm_arm64.deb
postgresql-18-biscuit 2.4.3 d13.x86_64 pigsty 143.2 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~trixie_amd64.deb
postgresql-18-biscuit 2.4.3 d13.aarch64 pigsty 138.8 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~trixie_arm64.deb
postgresql-18-biscuit 2.4.3 u22.x86_64 pigsty 145.2 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~jammy_amd64.deb
postgresql-18-biscuit 2.4.3 u22.aarch64 pigsty 142.4 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~jammy_arm64.deb
postgresql-18-biscuit 2.4.3 u24.x86_64 pigsty 140.9 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~noble_amd64.deb
postgresql-18-biscuit 2.4.3 u24.aarch64 pigsty 139.2 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~noble_arm64.deb
postgresql-18-biscuit 2.4.3 u26.x86_64 pigsty 140.7 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~resolute_amd64.deb
postgresql-18-biscuit 2.4.3 u26.aarch64 pigsty 138.0 KiB postgresql-18-biscuit_2.4.3-1PIGSTY~resolute_arm64.deb

Source

pig build pkg pg_biscuit;		# build rpm/deb

Install

Make sure PGDG and PIGSTY repo available:

pig repo add pgsql -u   # add both repo and update cache

Install this extension with pig:

pig install pg_biscuit;		# install via package name, for the active PG version
pig install biscuit;		# install by extension name, for the current active PG version

pig install biscuit -v 18;   # install for PG 18
pig install biscuit -v 17;   # install for PG 17
pig install biscuit -v 16;   # install for PG 16

Create this extension with:

CREATE EXTENSION biscuit CASCADE; -- requires plpgsql

Usage

Sources:

biscuit is an experimental PostgreSQL index access method optimized for pattern filters on text. It targets selective LIKE, ILIKE, NOT LIKE, and NOT ILIKE predicates, including multi-column and expression indexes, while trading additional memory and write work for faster filtering.

Core Workflow

CREATE EXTENSION biscuit;

CREATE INDEX message_body_biscuit_idx
ON message USING biscuit (body);

SELECT id, body
FROM message
WHERE body ILIKE '%timeout%';

Expression indexes work when the query uses the same expression:

CREATE INDEX customer_email_biscuit_idx
ON customer USING biscuit (lower(email));

SELECT *
FROM customer
WHERE lower(email) LIKE '%@example.com';

For predicates spanning several indexed text columns, use a multi-column index and confirm the chosen plan with EXPLAIN (ANALYZE, BUFFERS) on representative data.

Important Objects

  • biscuit is the index access method used in CREATE INDEX ... USING biscuit.
  • biscuit_operators reports the supported operators.
  • biscuit_version and biscuit_build_info expose build information; biscuit_build_info_json returns it as JSON.
  • biscuit_status reports the installed build and bitmap configuration.
  • biscuit_index_stats and biscuit_index_memory_size inspect an index and its memory footprint.
  • biscuit_memory_usage is a view of extension memory use.
  • biscuit_has_roaring and biscuit_roaring_version report optional Roaring bitmap support.

Limits and Operations

biscuit is for filtering, not ordered index scans. It does not provide regular-expression or similarity search. Indexes can be larger and more expensive to maintain than a B-tree; benchmark read selectivity, ingest cost, memory use, and vacuum behavior before production use. Keep a conventional index where ordering, equality, uniqueness, or another access method is still required.

The upstream project labels Biscuit as actively developed. PGXN publishes 2.4.3 as a stable distribution, but that archive’s changelog stops at 2.4.2, and its metadata and control file expose SQL extension version 2.4.1. Treat 2.4.3 as a distribution/package refresh: no additional SQL API delta is claimed. The material 2.4.2 change fixes a use-after-free in the index cache plus compiler warnings.

Last updated on