2016-09-21 18:39:57 +01:00
|
|
|
{ stdenv, fetchFromGitHub, postgresql, openssl, zlib, readline }:
|
|
|
|
|
|
|
|
stdenv.mkDerivation rec {
|
2018-04-11 10:07:46 +01:00
|
|
|
name = "pg_repack-${version}";
|
2018-05-23 05:06:52 +01:00
|
|
|
version = "1.4.3";
|
2016-09-21 18:39:57 +01:00
|
|
|
|
|
|
|
buildInputs = [ postgresql openssl zlib readline ];
|
|
|
|
|
|
|
|
src = fetchFromGitHub {
|
2018-04-11 10:07:46 +01:00
|
|
|
owner = "reorg";
|
|
|
|
repo = "pg_repack";
|
|
|
|
rev = "refs/tags/ver_${version}";
|
2018-05-23 05:06:52 +01:00
|
|
|
sha256 = "1mmd22nfaxjwnbl3i95f3ivmjvfqwdflgaczlg3129dbpwg265xr";
|
2016-09-21 18:39:57 +01:00
|
|
|
};
|
|
|
|
|
|
|
|
installPhase = ''
|
|
|
|
install -D bin/pg_repack -t $out/bin/
|
|
|
|
install -D lib/pg_repack.so -t $out/lib/
|
|
|
|
install -D lib/{pg_repack--${version}.sql,pg_repack.control} -t $out/share/extension
|
|
|
|
'';
|
|
|
|
|
|
|
|
meta = with stdenv.lib; {
|
|
|
|
description = "Reorganize tables in PostgreSQL databases with minimal locks";
|
|
|
|
longDescription = ''
|
|
|
|
pg_repack is a PostgreSQL extension which lets you remove bloat from tables and indexes, and optionally restore
|
|
|
|
the physical order of clustered indexes. Unlike CLUSTER and VACUUM FULL it works online, without holding an
|
|
|
|
exclusive lock on the processed tables during processing. pg_repack is efficient to boot,
|
|
|
|
with performance comparable to using CLUSTER directly.
|
|
|
|
'';
|
|
|
|
license = licenses.bsd3;
|
|
|
|
maintainers = with maintainers; [ danbst ];
|
|
|
|
inherit (postgresql.meta) platforms;
|
|
|
|
inherit (src.meta) homepage;
|
|
|
|
};
|
|
|
|
}
|