- Notifications
You must be signed in to change notification settings - Fork5k
Commit923ae50
committed
Add sanity check for dshash entries when reading pgstats file
Not having this check would produce a core dump at startup when runningpgstat_read_statsfile(), in the case where the information of a statskind for an entry in the dshash could not be found. The same checkalready happens for fixed-numbered stats and entries that are storedwith their names. This issue can be seen with custom stats kinds.Note that this problem can be reproduced what what is in the core code:- Tweak the test module injection_points to not load the fixed-numberedstats part, leaving only the variable-numbered stats.- Create an instance with injection_points defined inshared_preload_libraries.- Create a pgstats entry by attaching and running a point.- Restart the server without shared_preload_libraries. The startupprocess detects that something is wrong and reports a WARNING.Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>Discussion:https://postgr.es/m/aAieZAvM+K1d89R2@ip-10-97-1-34.eu-west-3.compute.internal1 parentbc19f63 commit923ae50
1 file changed
+8
-0
lines changedLines changed: 8 additions & 0 deletions
Original file line number | Diff line number | Diff line change | |
---|---|---|---|
| |||
1905 | 1905 |
| |
1906 | 1906 |
| |
1907 | 1907 |
| |
| 1908 | + | |
| 1909 | + | |
| 1910 | + | |
| 1911 | + | |
| 1912 | + | |
| 1913 | + | |
| 1914 | + | |
| 1915 | + | |
1908 | 1916 |
| |
1909 | 1917 |
| |
1910 | 1918 |
| |
|
0 commit comments
Comments
(0)