floatfile

floatfile

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
Relationships
See Also
pg_ivm
pg_bulkload
gzip
bzip
zstd
http
pg_net
pg_curl

Packages

Type Repo Version PG Major Compatibility Package Pattern Dependencies
EXT
PIGSTY
1.3.1
18
17
16
15
14
floatfile -
RPM
PIGSTY
1.3.1
18
17
16
15
14
floatfile_$v -
DEB
PIGSTY
1.3.1
18
17
16
15
14
postgresql-$v-floatfile -
Linux / PG PG18 PG17 PG16 PG15 PG14
el8.x86_64
PIGSTY 1.3.1
PIGSTY 1.3.1
PIGSTY 1.3.1
PIGSTY 1.3.1
PIGSTY 1.3.1
el8.aarch64
PIGSTY 1.3.1
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
Package Version OS ORG SIZE File URL
floatfile_18 1.3.1 el8.x86_64 pigsty 27.4 KiB floatfile_18-1.3.1-1PIGSTY.el8.x86_64.rpm
floatfile_18 1.3.1 el8.aarch64 pigsty 27.0 KiB floatfile_18-1.3.1-1PIGSTY.el8.aarch64.rpm
floatfile_18 1.3.1 el9.x86_64 pigsty 27.9 KiB floatfile_18-1.3.1-1PIGSTY.el9.x86_64.rpm
floatfile_18 1.3.1 el9.aarch64 pigsty 26.8 KiB floatfile_18-1.3.1-1PIGSTY.el9.aarch64.rpm
floatfile_18 1.3.1 el10.x86_64 pigsty 28.6 KiB floatfile_18-1.3.1-1PIGSTY.el10.x86_64.rpm
floatfile_18 1.3.1 el10.aarch64 pigsty 27.0 KiB floatfile_18-1.3.1-1PIGSTY.el10.aarch64.rpm
postgresql-18-floatfile 1.3.1 d12.x86_64 pigsty 44.4 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~bookworm_amd64.deb
postgresql-18-floatfile 1.3.1 d12.aarch64 pigsty 43.0 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~bookworm_arm64.deb
postgresql-18-floatfile 1.3.1 d13.x86_64 pigsty 44.8 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~trixie_amd64.deb
postgresql-18-floatfile 1.3.1 d13.aarch64 pigsty 43.5 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~trixie_arm64.deb
postgresql-18-floatfile 1.3.1 u22.x86_64 pigsty 46.7 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~jammy_amd64.deb
postgresql-18-floatfile 1.3.1 u22.aarch64 pigsty 45.9 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~jammy_arm64.deb
postgresql-18-floatfile 1.3.1 u24.x86_64 pigsty 46.9 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~noble_amd64.deb
postgresql-18-floatfile 1.3.1 u24.aarch64 pigsty 45.6 KiB postgresql-18-floatfile_1.3.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_17 1.3.1 el8.x86_64 pigsty 27.4 KiB floatfile_17-1.3.1-1PIGSTY.el8.x86_64.rpm
floatfile_17 1.3.1 el8.aarch64 pigsty 27.0 KiB floatfile_17-1.3.1-1PIGSTY.el8.aarch64.rpm
floatfile_17 1.3.1 el9.x86_64 pigsty 27.9 KiB floatfile_17-1.3.1-1PIGSTY.el9.x86_64.rpm
floatfile_17 1.3.1 el9.aarch64 pigsty 26.8 KiB floatfile_17-1.3.1-1PIGSTY.el9.aarch64.rpm
floatfile_17 1.3.1 el10.x86_64 pigsty 28.6 KiB floatfile_17-1.3.1-1PIGSTY.el10.x86_64.rpm
floatfile_17 1.3.1 el10.aarch64 pigsty 27.0 KiB floatfile_17-1.3.1-1PIGSTY.el10.aarch64.rpm
postgresql-17-floatfile 1.3.1 d12.x86_64 pigsty 44.5 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~bookworm_amd64.deb
postgresql-17-floatfile 1.3.1 d12.aarch64 pigsty 43.0 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~bookworm_arm64.deb
postgresql-17-floatfile 1.3.1 d13.x86_64 pigsty 44.9 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~trixie_amd64.deb
postgresql-17-floatfile 1.3.1 d13.aarch64 pigsty 43.5 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~trixie_arm64.deb
postgresql-17-floatfile 1.3.1 u22.x86_64 pigsty 47.9 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~jammy_amd64.deb
postgresql-17-floatfile 1.3.1 u22.aarch64 pigsty 47.2 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~jammy_arm64.deb
postgresql-17-floatfile 1.3.1 u24.x86_64 pigsty 46.8 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~noble_amd64.deb
postgresql-17-floatfile 1.3.1 u24.aarch64 pigsty 45.6 KiB postgresql-17-floatfile_1.3.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_16 1.3.1 el8.x86_64 pigsty 27.4 KiB floatfile_16-1.3.1-1PIGSTY.el8.x86_64.rpm
floatfile_16 1.3.1 el8.aarch64 pigsty 27.0 KiB floatfile_16-1.3.1-1PIGSTY.el8.aarch64.rpm
floatfile_16 1.3.1 el9.x86_64 pigsty 27.9 KiB floatfile_16-1.3.1-1PIGSTY.el9.x86_64.rpm
floatfile_16 1.3.1 el9.aarch64 pigsty 26.8 KiB floatfile_16-1.3.1-1PIGSTY.el9.aarch64.rpm
floatfile_16 1.3.1 el10.x86_64 pigsty 28.6 KiB floatfile_16-1.3.1-1PIGSTY.el10.x86_64.rpm
floatfile_16 1.3.1 el10.aarch64 pigsty 27.0 KiB floatfile_16-1.3.1-1PIGSTY.el10.aarch64.rpm
postgresql-16-floatfile 1.3.1 d12.x86_64 pigsty 44.5 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~bookworm_amd64.deb
postgresql-16-floatfile 1.3.1 d12.aarch64 pigsty 42.9 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~bookworm_arm64.deb
postgresql-16-floatfile 1.3.1 d13.x86_64 pigsty 44.9 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~trixie_amd64.deb
postgresql-16-floatfile 1.3.1 d13.aarch64 pigsty 43.5 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~trixie_arm64.deb
postgresql-16-floatfile 1.3.1 u22.x86_64 pigsty 47.9 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~jammy_amd64.deb
postgresql-16-floatfile 1.3.1 u22.aarch64 pigsty 47.2 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~jammy_arm64.deb
postgresql-16-floatfile 1.3.1 u24.x86_64 pigsty 46.8 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~noble_amd64.deb
postgresql-16-floatfile 1.3.1 u24.aarch64 pigsty 45.6 KiB postgresql-16-floatfile_1.3.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_15 1.3.1 el8.x86_64 pigsty 27.5 KiB floatfile_15-1.3.1-1PIGSTY.el8.x86_64.rpm
floatfile_15 1.3.1 el8.aarch64 pigsty 27.0 KiB floatfile_15-1.3.1-1PIGSTY.el8.aarch64.rpm
floatfile_15 1.3.1 el9.x86_64 pigsty 28.1 KiB floatfile_15-1.3.1-1PIGSTY.el9.x86_64.rpm
floatfile_15 1.3.1 el9.aarch64 pigsty 27.0 KiB floatfile_15-1.3.1-1PIGSTY.el9.aarch64.rpm
floatfile_15 1.3.1 el10.x86_64 pigsty 28.4 KiB floatfile_15-1.3.1-1PIGSTY.el10.x86_64.rpm
floatfile_15 1.3.1 el10.aarch64 pigsty 26.9 KiB floatfile_15-1.3.1-1PIGSTY.el10.aarch64.rpm
postgresql-15-floatfile 1.3.1 d12.x86_64 pigsty 44.6 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~bookworm_amd64.deb
postgresql-15-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~bookworm_arm64.deb
postgresql-15-floatfile 1.3.1 d13.x86_64 pigsty 45.0 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~trixie_amd64.deb
postgresql-15-floatfile 1.3.1 d13.aarch64 pigsty 43.7 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~trixie_arm64.deb
postgresql-15-floatfile 1.3.1 u22.x86_64 pigsty 48.1 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~jammy_amd64.deb
postgresql-15-floatfile 1.3.1 u22.aarch64 pigsty 47.4 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~jammy_arm64.deb
postgresql-15-floatfile 1.3.1 u24.x86_64 pigsty 46.6 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~noble_amd64.deb
postgresql-15-floatfile 1.3.1 u24.aarch64 pigsty 45.6 KiB postgresql-15-floatfile_1.3.1-1PIGSTY~noble_arm64.deb
Package Version OS ORG SIZE File URL
floatfile_14 1.3.1 el8.x86_64 pigsty 27.5 KiB floatfile_14-1.3.1-1PIGSTY.el8.x86_64.rpm
floatfile_14 1.3.1 el8.aarch64 pigsty 27.1 KiB floatfile_14-1.3.1-1PIGSTY.el8.aarch64.rpm
floatfile_14 1.3.1 el9.x86_64 pigsty 28.0 KiB floatfile_14-1.3.1-1PIGSTY.el9.x86_64.rpm
floatfile_14 1.3.1 el9.aarch64 pigsty 26.9 KiB floatfile_14-1.3.1-1PIGSTY.el9.aarch64.rpm
floatfile_14 1.3.1 el10.x86_64 pigsty 28.4 KiB floatfile_14-1.3.1-1PIGSTY.el10.x86_64.rpm
floatfile_14 1.3.1 el10.aarch64 pigsty 26.9 KiB floatfile_14-1.3.1-1PIGSTY.el10.aarch64.rpm
postgresql-14-floatfile 1.3.1 d12.x86_64 pigsty 44.5 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~bookworm_amd64.deb
postgresql-14-floatfile 1.3.1 d12.aarch64 pigsty 43.1 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~bookworm_arm64.deb
postgresql-14-floatfile 1.3.1 d13.x86_64 pigsty 44.9 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~trixie_amd64.deb
postgresql-14-floatfile 1.3.1 d13.aarch64 pigsty 43.6 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~trixie_arm64.deb
postgresql-14-floatfile 1.3.1 u22.x86_64 pigsty 48.1 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~jammy_amd64.deb
postgresql-14-floatfile 1.3.1 u22.aarch64 pigsty 47.4 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~jammy_arm64.deb
postgresql-14-floatfile 1.3.1 u24.x86_64 pigsty 46.6 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~noble_amd64.deb
postgresql-14-floatfile 1.3.1 u24.aarch64 pigsty 45.5 KiB postgresql-14-floatfile_1.3.1-1PIGSTY~noble_arm64.deb

Source

pig build pkg floatfile;		# build 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 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
pig install floatfile -v 14;   # install for PG 14

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.

Last updated on