Skip to content

floatfile

Simple file storage for arrays of floats

floatfile : Simple file storage for arrays of floats

Overview

ID Extension Package Version Category License Language
4280 floatfile floatfile 1.3.1 UTIL MIT C
Attribute Has Binary Has Library Need Load Has DDL Relocatable Trusted
--s-d-r No Yes No Yes yes no

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT PIGSTY 1.3.1 19 18 17 16 15 floatfile -
RPM PIGSTY 1.3.1 19 18 17 16 15 floatfile_$v -
DEB PIGSTY 1.3.1 19 18 17 16 15 postgresql-$v-floatfile -
Linux / PG PG19 PG18 PG17 PG16 PG15
el8.x86_64 N/A PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
el8.aarch64 N/A PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
el9.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
el9.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
el10.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
el10.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
d12.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
d12.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
d13.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
d13.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u22.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u22.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u24.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u24.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u26.x86_64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
u26.aarch64 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1 PIGSTY 1.3.1
Package Version OS ORG SIZE File URL
floatfile_19 1.3.1 el9.x86_64 pigsty 54.5 KiB floatfile_19-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_19 1.3.1 el9.aarch64 pigsty 53.4 KiB floatfile_19-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_19 1.3.1 el10.x86_64 pigsty 55.5 KiB floatfile_19-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_19 1.3.1 el10.aarch64 pigsty 54.3 KiB floatfile_19-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-19-floatfile 1.3.1 d12.x86_64 pigsty 44.5 KiB postgresql-19-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-19-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-19-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-19-floatfile 1.3.1 d13.x86_64 pigsty 45.0 KiB postgresql-19-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-19-floatfile 1.3.1 d13.aarch64 pigsty 43.6 KiB postgresql-19-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-19-floatfile 1.3.1 u22.x86_64 pigsty 46.8 KiB postgresql-19-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-19-floatfile 1.3.1 u22.aarch64 pigsty 46.0 KiB postgresql-19-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-19-floatfile 1.3.1 u24.x86_64 pigsty 46.9 KiB postgresql-19-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-19-floatfile 1.3.1 u24.aarch64 pigsty 45.7 KiB postgresql-19-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-19-floatfile 1.3.1 u26.x86_64 pigsty 46.9 KiB postgresql-19-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-19-floatfile 1.3.1 u26.aarch64 pigsty 46.4 KiB postgresql-19-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_18 1.3.1 el8.x86_64 pigsty 53.0 KiB floatfile_18-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_18 1.3.1 el8.aarch64 pigsty 52.0 KiB floatfile_18-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_18 1.3.1 el9.x86_64 pigsty 54.5 KiB floatfile_18-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_18 1.3.1 el9.aarch64 pigsty 53.4 KiB floatfile_18-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_18 1.3.1 el10.x86_64 pigsty 55.5 KiB floatfile_18-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_18 1.3.1 el10.aarch64 pigsty 54.3 KiB floatfile_18-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-18-floatfile 1.3.1 d12.x86_64 pigsty 44.5 KiB postgresql-18-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-18-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-18-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-18-floatfile 1.3.1 d13.x86_64 pigsty 45.0 KiB postgresql-18-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-18-floatfile 1.3.1 d13.aarch64 pigsty 43.6 KiB postgresql-18-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-18-floatfile 1.3.1 u22.x86_64 pigsty 46.8 KiB postgresql-18-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-18-floatfile 1.3.1 u22.aarch64 pigsty 46.0 KiB postgresql-18-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-18-floatfile 1.3.1 u24.x86_64 pigsty 46.9 KiB postgresql-18-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-18-floatfile 1.3.1 u24.aarch64 pigsty 45.7 KiB postgresql-18-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-18-floatfile 1.3.1 u26.x86_64 pigsty 46.9 KiB postgresql-18-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-18-floatfile 1.3.1 u26.aarch64 pigsty 46.4 KiB postgresql-18-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_17 1.3.1 el8.x86_64 pigsty 52.9 KiB floatfile_17-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_17 1.3.1 el8.aarch64 pigsty 52.0 KiB floatfile_17-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_17 1.3.1 el9.x86_64 pigsty 54.5 KiB floatfile_17-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_17 1.3.1 el9.aarch64 pigsty 53.4 KiB floatfile_17-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_17 1.3.1 el10.x86_64 pigsty 55.4 KiB floatfile_17-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_17 1.3.1 el10.aarch64 pigsty 54.2 KiB floatfile_17-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-17-floatfile 1.3.1 d12.x86_64 pigsty 44.6 KiB postgresql-17-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-17-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-17-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-17-floatfile 1.3.1 d13.x86_64 pigsty 45.0 KiB postgresql-17-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-17-floatfile 1.3.1 d13.aarch64 pigsty 43.6 KiB postgresql-17-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-17-floatfile 1.3.1 u22.x86_64 pigsty 48.0 KiB postgresql-17-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-17-floatfile 1.3.1 u22.aarch64 pigsty 47.3 KiB postgresql-17-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-17-floatfile 1.3.1 u24.x86_64 pigsty 47.0 KiB postgresql-17-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-17-floatfile 1.3.1 u24.aarch64 pigsty 45.7 KiB postgresql-17-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-17-floatfile 1.3.1 u26.x86_64 pigsty 46.9 KiB postgresql-17-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-17-floatfile 1.3.1 u26.aarch64 pigsty 46.4 KiB postgresql-17-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_16 1.3.1 el8.x86_64 pigsty 52.9 KiB floatfile_16-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_16 1.3.1 el8.aarch64 pigsty 52.0 KiB floatfile_16-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_16 1.3.1 el9.x86_64 pigsty 54.4 KiB floatfile_16-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_16 1.3.1 el9.aarch64 pigsty 53.4 KiB floatfile_16-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_16 1.3.1 el10.x86_64 pigsty 55.4 KiB floatfile_16-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_16 1.3.1 el10.aarch64 pigsty 54.2 KiB floatfile_16-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-16-floatfile 1.3.1 d12.x86_64 pigsty 44.6 KiB postgresql-16-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-16-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-16-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-16-floatfile 1.3.1 d13.x86_64 pigsty 45.0 KiB postgresql-16-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-16-floatfile 1.3.1 d13.aarch64 pigsty 43.5 KiB postgresql-16-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-16-floatfile 1.3.1 u22.x86_64 pigsty 48.1 KiB postgresql-16-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-16-floatfile 1.3.1 u22.aarch64 pigsty 47.3 KiB postgresql-16-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-16-floatfile 1.3.1 u24.x86_64 pigsty 46.9 KiB postgresql-16-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-16-floatfile 1.3.1 u24.aarch64 pigsty 45.7 KiB postgresql-16-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-16-floatfile 1.3.1 u26.x86_64 pigsty 46.9 KiB postgresql-16-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-16-floatfile 1.3.1 u26.aarch64 pigsty 46.4 KiB postgresql-16-floatfile_1.3.1-1PGSTY~resolute_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_15 1.3.1 el8.x86_64 pigsty 53.0 KiB floatfile_15-1.3.1-1PGSTY.el8.x86_64.rpm
floatfile_15 1.3.1 el8.aarch64 pigsty 52.0 KiB floatfile_15-1.3.1-1PGSTY.el8.aarch64.rpm
floatfile_15 1.3.1 el9.x86_64 pigsty 54.6 KiB floatfile_15-1.3.1-1PGSTY.el9.x86_64.rpm
floatfile_15 1.3.1 el9.aarch64 pigsty 53.5 KiB floatfile_15-1.3.1-1PGSTY.el9.aarch64.rpm
floatfile_15 1.3.1 el10.x86_64 pigsty 55.2 KiB floatfile_15-1.3.1-1PGSTY.el10.x86_64.rpm
floatfile_15 1.3.1 el10.aarch64 pigsty 54.1 KiB floatfile_15-1.3.1-1PGSTY.el10.aarch64.rpm
postgresql-15-floatfile 1.3.1 d12.x86_64 pigsty 44.7 KiB postgresql-15-floatfile_1.3.1-1PGSTY~bookworm_amd64.deb
postgresql-15-floatfile 1.3.1 d12.aarch64 pigsty 43.2 KiB postgresql-15-floatfile_1.3.1-1PGSTY~bookworm_arm64.deb
postgresql-15-floatfile 1.3.1 d13.x86_64 pigsty 45.1 KiB postgresql-15-floatfile_1.3.1-1PGSTY~trixie_amd64.deb
postgresql-15-floatfile 1.3.1 d13.aarch64 pigsty 43.8 KiB postgresql-15-floatfile_1.3.1-1PGSTY~trixie_arm64.deb
postgresql-15-floatfile 1.3.1 u22.x86_64 pigsty 48.2 KiB postgresql-15-floatfile_1.3.1-1PGSTY~jammy_amd64.deb
postgresql-15-floatfile 1.3.1 u22.aarch64 pigsty 47.5 KiB postgresql-15-floatfile_1.3.1-1PGSTY~jammy_arm64.deb
postgresql-15-floatfile 1.3.1 u24.x86_64 pigsty 46.7 KiB postgresql-15-floatfile_1.3.1-1PGSTY~noble_amd64.deb
postgresql-15-floatfile 1.3.1 u24.aarch64 pigsty 45.7 KiB postgresql-15-floatfile_1.3.1-1PGSTY~noble_arm64.deb
postgresql-15-floatfile 1.3.1 u26.x86_64 pigsty 46.6 KiB postgresql-15-floatfile_1.3.1-1PGSTY~resolute_amd64.deb
postgresql-15-floatfile 1.3.1 u26.aarch64 pigsty 46.3 KiB postgresql-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 via package name, for the active PG version

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