-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathINSTALL
48 lines (34 loc) · 1.63 KB
/
INSTALL
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
log_functions Install
=====================
To install log_functions, you should untar the log_functions tarball
anywhere you want.
You'll need to compile it. There are two ways to do that, depending on your
PostgreSQL release:
* PostgreSQL older than 9.2
* go into your PostgreSQL source code directory
* go into the contrib sub-directory
* put the log_functions source directory inside the contrib sub-directory of PostgreSQL
* do "make", then "make install"
* PostgreSQL 9.2 and newer
* you need pg_config in your PATH
* do "make", then "make install"
You can also compile log_functions on Windows. You'll need to use the
build.bat script, that you will find in the src/tools/msvc directory of the
PostgreSQL source code directory.
Once it's installed, you'll need to configure PostgreSQL to make use of it:
* shared_preload_libraries = 'log_functions'
* custom_variable_classes = 'log_functions' (for PostgreSQL 9.1 and older)
There are five optional parameters that allow you to select which logs you want:
* log_functions.log_declare
* log_functions.log_function_begin
* log_functions.log_function_end
* log_functions.log_statement_begin
* log_functions.log_statement_end
By default, only log_functions.log_statement_begin, and
log_functions.log_statement_end are off. The other parameters are on.
Once the configuration is done, restart PostgreSQL.
You can also decide to use it only from time to time. If you want to do that,
you don't need to configure PostgreSQL. When you want to use it, simply execute
the following SQL statement:
LOAD 'log_functions';
Then, you will be able to set the five optional parameters.