How to apply Postgresql Patch

Started by AI Rummanover 14 years ago2 messagesgeneral
Jump to latest
#1AI Rumman
rummandba@gmail.com

Hi,

I want to learn how to apply patch in Postgresql?
Recently, I got the docs
http://archives.postgresql.org/pgsql-hackers/2011-08/msg00581.php.
I want to apply the patch.

Any guideline please?

#2Scott Marlowe
scott.marlowe@gmail.com
In reply to: AI Rumman (#1)
Re: How to apply Postgresql Patch

On Sun, Aug 21, 2011 at 2:05 AM, AI Rumman <rummandba@gmail.com> wrote:

Hi,

I want  to learn how to apply patch in Postgresql?
Recently, I got the docs
http://archives.postgresql.org/pgsql-hackers/2011-08/msg00581.php.
I want to apply the patch.

Any guideline please?

Applying the patch requires that you have the source tree downloaded
and can build from there. If you've installed from a package, then
you'll need to run the pg_config command that comes with your package.
It's often part of the -dev or -devel package. That command will
tell you all the switches used to build your package.

It's often much better to test this patch on a non-production machine,
so go to another machine and get the latest postgresql package that
matches your major version. I.e. if you're running 8.3.5 in
production you'll want to download 8.3.15. Untar it and then cd into
the src directory and apply the patch something like:

patch -p0 < patchfile and see if it applies. If it complains about
the file not being in the right dir or something hollar back and we'll
see about getting you patched up.

After that, in the main postgresql directory run configure

./configure --switchsettingsfrompg_config_go_here
make
sudo make install

Note that if this is a bit too confusing, you might wanna find someone
more familiar with unix and patching and what not, as it's not a
simple obvious process for first time users.