Skip to content

floatfile

Simple file storage for arrays of floats

floatfile · Simple file storage for arrays of floats

Overview

IDExtensionPackageVersionCategoryLicenseLanguage
4280floatfilefloatfile1.3.1UTILMITC
AttributeHas BinaryHas LibraryNeed LoadHas DDLRelocatableTrusted
--s-d-rNoYesNoYesyesno

Packages

TypeRepoVersionPG Major CompatibilityPackage PatternDependencies
EXTPIGSTY1.3.119 18 17 16 15floatfile-
RPMPIGSTY1.3.119 18 17 16 15floatfile_$v-
DEBPIGSTY1.3.119 18 17 16 15postgresql-$v-floatfile-
Linux / PGPG19PG18PG17PG16PG15
el8.x86_64N/APIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
el8.aarch64N/APIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
el9.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
el9.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
el10.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
el10.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
d12.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
d12.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
d13.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
d13.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u22.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u22.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u24.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u24.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u26.x86_64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
u26.aarch64PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1PIGSTY 1.3.1
PackageVersionOSORGSIZEFile URL
floatfile_191.3.1el9.x86_64pigsty54.5 KiBfloatfile_19-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_191.3.1el9.aarch64pigsty53.4 KiBfloatfile_19-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_191.3.1el10.x86_64pigsty55.5 KiBfloatfile_19-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_191.3.1el10.aarch64pigsty54.3 KiBfloatfile_19-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-19-floatfile1.3.1d12.x86_64pigsty44.5 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-19-floatfile1.3.1d12.aarch64pigsty43.1 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-19-floatfile1.3.1d13.x86_64pigsty45.0 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-19-floatfile1.3.1d13.aarch64pigsty43.6 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-19-floatfile1.3.1u22.x86_64pigsty46.8 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-19-floatfile1.3.1u22.aarch64pigsty46.0 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-19-floatfile1.3.1u24.x86_64pigsty46.9 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-19-floatfile1.3.1u24.aarch64pigsty45.7 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-19-floatfile1.3.1u26.x86_64pigsty46.9 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-19-floatfile1.3.1u26.aarch64pigsty46.4 KiBpostgresql-19-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
floatfile_181.3.1el8.x86_64pigsty53.0 KiBfloatfile_18-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_181.3.1el8.aarch64pigsty52.0 KiBfloatfile_18-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_181.3.1el9.x86_64pigsty54.5 KiBfloatfile_18-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_181.3.1el9.aarch64pigsty53.4 KiBfloatfile_18-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_181.3.1el10.x86_64pigsty55.5 KiBfloatfile_18-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_181.3.1el10.aarch64pigsty54.3 KiBfloatfile_18-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-18-floatfile1.3.1d12.x86_64pigsty44.5 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-18-floatfile1.3.1d12.aarch64pigsty43.1 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-18-floatfile1.3.1d13.x86_64pigsty45.0 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-18-floatfile1.3.1d13.aarch64pigsty43.6 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-18-floatfile1.3.1u22.x86_64pigsty46.8 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-18-floatfile1.3.1u22.aarch64pigsty46.0 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-18-floatfile1.3.1u24.x86_64pigsty46.9 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-18-floatfile1.3.1u24.aarch64pigsty45.7 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-18-floatfile1.3.1u26.x86_64pigsty46.9 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-18-floatfile1.3.1u26.aarch64pigsty46.4 KiBpostgresql-18-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
floatfile_171.3.1el8.x86_64pigsty52.9 KiBfloatfile_17-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_171.3.1el8.aarch64pigsty52.0 KiBfloatfile_17-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_171.3.1el9.x86_64pigsty54.5 KiBfloatfile_17-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_171.3.1el9.aarch64pigsty53.4 KiBfloatfile_17-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_171.3.1el10.x86_64pigsty55.4 KiBfloatfile_17-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_171.3.1el10.aarch64pigsty54.2 KiBfloatfile_17-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-17-floatfile1.3.1d12.x86_64pigsty44.6 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-17-floatfile1.3.1d12.aarch64pigsty43.1 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-17-floatfile1.3.1d13.x86_64pigsty45.0 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-17-floatfile1.3.1d13.aarch64pigsty43.6 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-17-floatfile1.3.1u22.x86_64pigsty48.0 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-17-floatfile1.3.1u22.aarch64pigsty47.3 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-17-floatfile1.3.1u24.x86_64pigsty47.0 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-17-floatfile1.3.1u24.aarch64pigsty45.7 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-17-floatfile1.3.1u26.x86_64pigsty46.9 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-17-floatfile1.3.1u26.aarch64pigsty46.4 KiBpostgresql-17-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
floatfile_161.3.1el8.x86_64pigsty52.9 KiBfloatfile_16-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_161.3.1el8.aarch64pigsty52.0 KiBfloatfile_16-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_161.3.1el9.x86_64pigsty54.4 KiBfloatfile_16-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_161.3.1el9.aarch64pigsty53.4 KiBfloatfile_16-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_161.3.1el10.x86_64pigsty55.4 KiBfloatfile_16-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_161.3.1el10.aarch64pigsty54.2 KiBfloatfile_16-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-16-floatfile1.3.1d12.x86_64pigsty44.6 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-16-floatfile1.3.1d12.aarch64pigsty43.1 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-16-floatfile1.3.1d13.x86_64pigsty45.0 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-16-floatfile1.3.1d13.aarch64pigsty43.5 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-16-floatfile1.3.1u22.x86_64pigsty48.1 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-16-floatfile1.3.1u22.aarch64pigsty47.3 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-16-floatfile1.3.1u24.x86_64pigsty46.9 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-16-floatfile1.3.1u24.aarch64pigsty45.7 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-16-floatfile1.3.1u26.x86_64pigsty46.9 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-16-floatfile1.3.1u26.aarch64pigsty46.4 KiBpostgresql-16-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
PackageVersionOSORGSIZEFile URL
floatfile_151.3.1el8.x86_64pigsty53.0 KiBfloatfile_15-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_151.3.1el8.aarch64pigsty52.0 KiBfloatfile_15-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_151.3.1el9.x86_64pigsty54.6 KiBfloatfile_15-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_151.3.1el9.aarch64pigsty53.5 KiBfloatfile_15-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_151.3.1el10.x86_64pigsty55.2 KiBfloatfile_15-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_151.3.1el10.aarch64pigsty54.1 KiBfloatfile_15-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-15-floatfile1.3.1d12.x86_64pigsty44.7 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-15-floatfile1.3.1d12.aarch64pigsty43.2 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-15-floatfile1.3.1d13.x86_64pigsty45.1 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-15-floatfile1.3.1d13.aarch64pigsty43.8 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-15-floatfile1.3.1u22.x86_64pigsty48.2 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-15-floatfile1.3.1u22.aarch64pigsty47.5 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-15-floatfile1.3.1u24.x86_64pigsty46.7 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-15-floatfile1.3.1u24.aarch64pigsty45.7 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-15-floatfile1.3.1u26.x86_64pigsty46.6 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-15-floatfile1.3.1u26.aarch64pigsty46.3 KiBpostgresql-15-floatfile_1.3.1-1PGSTY~resolute_arm64.deb

Source

pig build pkg floatfile;		# 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 floatfile;		# install by package name

pig install floatfile -v 19;   # install for PG 19
pig install floatfile -v 18;   # install for PG 18
pig install floatfile -v 17;   # install for PG 17
pig install floatfile -v 16;   # install for PG 16
pig install floatfile -v 15;   # install for PG 15

Create this extension with:

CREATE EXTENSION floatfile;

Usage

floatfile: Float array file I/O for PostgreSQL

Store float arrays in individual files for very fast querying without MVCC overhead. Ideal for time series data requiring low-latency reads and low-cost appends.

Functions

Save a float array to a file

SELECT save_floatfile('my_data', ARRAY[1.0, 2.0, 3.0, 4.0]::float[]);

Load a float array from a file

SELECT load_floatfile('my_data');
-- {1,2,3,4}

Append values to an existing file

SELECT extend_floatfile('my_data', ARRAY[5.0, 6.0]::float[]);

Delete a floatfile

SELECT drop_floatfile('my_data');

Tablespace Variants

All functions accept an optional tablespace name as first argument:

SELECT save_floatfile('my_ts', 'my_data', ARRAY[1.0, 2.0]::float[]);
SELECT load_floatfile('my_ts', 'my_data');
SELECT extend_floatfile('my_ts', 'my_data', ARRAY[3.0]::float[]);
SELECT drop_floatfile('my_ts', 'my_data');

Histogram Functions

Compute histograms directly from floatfiles (useful when arrays exceed the 1GB Postgres limit):

SELECT floatfile_to_hist('my_data', 0.0, 1.0, 10);
-- Returns int[] with histogram counts

SELECT floatfile_to_hist2d('xs_file', 'ys_file', 0.0, 0.0, 1.0, 1.0, 10, 10);
-- Returns 2D int[] histogram

Concurrency

Functions use PostgreSQL advisory locks: load_floatfile takes a shared lock; save, extend, and drop take exclusive locks.

Table reader