Le blog de Jean David TECHER, un Réunionnais à Saint-Priest/Lyon

Aller au contenu | Aller au menu | Aller à la recherche

mercredi 18 mars 2020

Git repository for branch 9.6 and a particular commit I wanted to investigate

I am currently working on this branch. To do so
cgit clone git://git.postgresql.org/git/postgresql.git
cd postgresql
git branch -r
git checkout -b origin/REL9_6_STABLE
9.6.17 was released in February 2020. I was a bit curious about this commit before pushing it
commit 93745f1e019543fe7b742d0c5e971aad8d08fd56
Author: Thomas Munro 
Date:   Sat Feb 1 14:29:13 2020 +1300

    Fix memory leak on DSM slot exhaustion.
    If we attempt to create a DSM segment when no slots are available,
    we should return the memory to the operating system.  Previously
    we did that if the DSM_CREATE_NULL_IF_MAXSEGMENTS flag was
    passed in, but we didn't do it if an error was raised.  Repair.
    Back-patch to 9.4, where DSM segments arrived.
    Author: Thomas Munro
    Reviewed-by: Robert Haas
    Reported-by: Julian Backes
    Discussion: https://postgr.es/m/CA%2BhUKGKAAoEw-R4om0d2YM4eqT1eGEi6%3DQot-3ceDR-SLiWVDw%40mail.gmail.com
Using the link above then I got all details I want.

Conclusion: Back-ported to 9.4, 9.5, 9.6.

dimanche 15 mars 2020

pg_repack 1.4.5

There is another tool called pg_squeeze but not tested for the moment


Refer to https://reorg.github.io/pg_repack/

Build from sources

OpenSSL 1.1.x and Libmemcached are required only to build the package/extension from pg_repack not for execution usage.
# OpenSSL
wget https://github.com/openssl/openssl/archive/OpenSSL_1_1_1d.tar.gz -O - |tar xvzf  -  && cd openssl-OpenSSL_1_1_1d/
./config --prefix=/opt/pg_repack --openssldir=/opt/pg_repack  shared zlib
make -j$(nproc) && sudo make install

# Libmemcached
cd ..
wget --no-check-certificate "https://launchpad.net/libmemcached/1.0/1.0.18/+download/libmemcached-1.0.18.tar.gz"
tar xvzf libmemcached-1.0.18.tar.gz
cd libmemcached-1.0.18/
./configure --prefix=/opt/pg_repack
make -j$(nproc) && sudo make install

# Pg_repack
cd ..
wget https://github.com/reorg/pg_repack/archive/ver_1.4.5.tar.gz -O - | tar xvzf - && cd pg_repack-ver_1.4.5/
make LDFLAGS='-L/opt/pg_repack/lib/'
sudo chmod 777 -R /opt/PostgresPlus/9.6AS/as9.6/
make install

mardi 25 février 2014

PostgreSQL, pgsql_fdw and sequences

This link gave me an great idea