Postgresql – How to apply patch on postgresql 9.2

postgresql-9.2

Hi all I would like to apply one patch(pg_dump_grouplock.patch) in my PostgreSQL 9.2 database
regarding lock table issue advised on below link

http://www.postgresql-archive.org/pg-dump-and-thousands-of-schemas-td5709766i40.html

I have never applied the patch, can anybody let me know the step how to apply the patch.

Best Answer

Don't. Instead update to PostgreSQL 9.2.23, which includes a better fix.


If you really must patch it: clone PostgreSQL's source code from git, check out 9.2, apply patch, compile.

git clone git://git.postgresql.org/git/postgresql.git
cd postgresql
git checkout REL9_2_STABLE
patch -p1 < ~/Downloads/pg_dump_grouplock.patch
./configure ...

See the PostgreSQL documentation for compile instructions.