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.
-
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.user1822– user18222017年10月06日 05:49:14 +00:00Commented Oct 6, 2017 at 5:49
1 Answer 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.
-
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 serverPrabhat– Prabhat2017年10月06日 08:57:46 +00:00Commented 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.Craig Ringer– Craig Ringer2017年10月06日 09:07:39 +00:00Commented 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 relationPrabhat– Prabhat2017年10月06日 10:00:28 +00:00Commented 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.Craig Ringer– Craig Ringer2017年10月06日 10:02:43 +00:00Commented 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=#Prabhat– Prabhat2017年10月06日 10:09:03 +00:00Commented Oct 6, 2017 at 10:09