File postgresql-pgfincore.spec of Package postgresql-pgfincore
#
# Copyright (c) 2021 SUSE LLC
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
%define pg_name @BUILD_FLAVOR@%{nil}
%define ext_name pgfincore
%{pg_version_from_name}
Name: %{pg_name}-%{ext_name}
Version: 1.3.1
Release: 0
License: BSD-3-Clause
Summary: A set of functions to manage blocks in memory
Url: http://git.postgresql.org/gitweb/?p=pgfincore.git
Group: Productivity/Databases/Tools
Source: %{ext_name}-%{version}.tar.xz
BuildRequires: %{pg_name}-llvmjit-devel
%pg_server_requires
%if "%{pg_name}" == ""
ExclusiveArch: do_not_build
%endif
%description
With PostgreSQL, each Table or Index is splitted in segments of (usually) 1GB,
and each segment is splitted in pages in memory then in blocks for the
filesystem.
Those functions let you know which and how many disk block from a relation are
in the page cache of the operating system. It can provide the result as a VarBit
and can be stored in a table. Then using this table, it is possible to restore
the page cache state for each block of the relation, even in another server,
thanks to Streaming Replication.
Other functions are used to set a *POSIX_FADVISE* flag on the entire relation
(each segment). The more useful are probably *WILLNEED* and *DONTNEED* which
push and pop blocks of each segments of a relation from page cache,
respectively.
Each functions are call with at least a table name or an index name (or oid)
as a parameter and walk each segment of the relation.
%prep
%autosetup -p1 -n %{ext_name}-%{version}
%build
%make_pgxs
%install
%make_install
rm -rv %{buildroot}%{pg_config_docdir}/%{ext_name}/
%files
%doc AUTHORS ChangeLog COPYRIGHT README.md TODO
%{pg_config_sharedir}/extension/%{ext_name}*
%{pg_config_sharedir}/%{ext_name}/
%{pg_config_pkglibdir}/%{ext_name}.so
%if %{postgresql_has_llvm}
%{pg_config_pkglibdir}/bitcode/*
%endif
%changelog