-
Notifications
You must be signed in to change notification settings - Fork 1
/
transient_gucs.c
135 lines (102 loc) · 6.33 KB
/
transient_gucs.c
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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
#include "pgsampler.h"
/* List of transient gucs */
char* transient_gucs(void) {
char* result;
StringInfoData resultbuf;
//elog(LOG, "TMPGUC");
initStringInfo(&resultbuf);
appendStringInfo(&resultbuf, "TMPGUC;");
appendStringInfoString(&resultbuf, GetConfigOption("checkpoint_segments", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("checkpoint_timeout", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("checkpoint_completion_target", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("work_mem", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("temp_buffers", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("maintenance_work_mem", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("seq_page_cost", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("random_page_cost", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("cpu_tuple_cost", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("cpu_operator_cost", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("effective_cache_size", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
//New stuff
appendStringInfoString(&resultbuf, GetConfigOption("vacuum_cost_delay", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("vacuum_cost_page_hit", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("vacuum_cost_page_miss", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("vacuum_cost_page_dirty", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("vacuum_cost_limit", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("bgwriter_delay", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("bgwriter_lru_maxpages", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("bgwriter_lru_multiplier", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("effective_io_concurrency", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("synchronous_commit", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("wal_writer_delay", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("commit_delay", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("commit_siblings", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("wal_keep_segments", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_threshold", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_effort", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_pool_size", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_generations", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_selection_bias", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("geqo_seed", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("default_statistics_target", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("constraint_exclusion", true, true)); //turn off if no partitioned tables
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("cursor_tuple_fraction", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("from_collapse_limit", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("join_collapse_limit", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum_vacuum_threshold", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum_analyze_threshold", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum_vacuum_scale_factor", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum_analyze_scale_factor", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("autovacuum_vacuum_cost_delay", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, GetConfigOption("deadlock_timeout", true, true));
appendStringInfo(&resultbuf, FIELD_DELIMIT);
appendStringInfoString(&resultbuf, CDELIMIT);
result = palloc(strlen(resultbuf.data) + 1);
strcpy(result, resultbuf.data);
return result;
}