1

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.

asked Oct 6, 2017 at 4:40
1
  • Note that Postgres 9.2 is out of support (no longer maintained). You should plan an upgrade to 9.6 or 10.0 as soon as possible. Commented Oct 6, 2017 at 5:49

1 Answer 1

1

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.

answered Oct 6, 2017 at 5:43
11
  • Thanks Craig Ringer,, i can apply patch on my test server but due to some security issue , i can not do git clone on my prod DB ,could you please let me know how to patch existing server Commented Oct 6, 2017 at 8:57
  • You must compile from source code. You cannot apply a patch to a binary install. Get a tarball instead if you can't clone from git. See the PostgreSQL download page. But... really. Just don't do this. Simply apply the PostgreSQL 9.2.23 update. Commented Oct 6, 2017 at 9:07
  • thanks Craig, Actully i am doing this because my db has more than 1000K relation , and when i am upgrading it to 9.6 its stuck at pg_dump location even i am using --link option . thought that might make the pg_dump faster do you have any solution, to upgrade faster with db 1000K relation Commented Oct 6, 2017 at 10:00
  • Yes, I do. Upgrade to 9.2.23 first. It's a simple in-place upgrade, install new binaries and restat. Then upgrading to 9.6 will be faster. I've said this enough times now, so I won't be repeating myself further. Commented Oct 6, 2017 at 10:02
  • my current version ispostgres=# select version(); version -------------------------------------------------------------------------------------------------------------- PostgreSQL 9.2.9 on x86_64-unknown-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-4), 64-bit (1 row) postgres=# Commented Oct 6, 2017 at 10:09

Your Answer

Draft saved
Draft discarded

Sign up or log in

Sign up using Google
Sign up using Email and Password

Post as a guest

Required, but never shown

Post as a guest

Required, but never shown

By clicking "Post Your Answer", you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.