On Mon, 7 Nov 2016 23:29:28 +0100 Gilles Darold <gilles.dar...@dalibo.com> wrote:
> Here is the v13 of the patch, Just to keep things up to date... Attached are 3 re-worked patches that I see submitting along with the pg_current_logfile patch. They apply on top of v13. (I still have one more I'm working on to ensure that current_logfiles always has valid content should an attempt to open it returns ENFILE or EMFILE.) patch_pg_current_logfile-v13.diff.writeonce Writes the current_logfiles file only once when rotating both syslog and csvlog logfiles. This patch pushes bool types onto the stack instead of using int. This is a practice which is not optimal given traditional instruction sets and compilers. I used bool types out of clarity. If the compiler does not optimize the problem away it won't impact performance anyway because the code is not run that often. If you find this ugly change the bools to ints. I believe this patch also fixes a bug where, when both syslog and csvlog are on and the syslog is rotated due to size but the csvlog is not rotated (for whatever reason), then the syslog filename fails to be updated in the current_logfiles file content. patch_pg_current_logfile-v13.diff.abstract_guc_part1 Creates symbols for some GUC values which appear in multiple places in the code. patch_pg_current_logfile-v13.diff.abstract_guc_part2 Uses symbols for some GUC values in the pg_current_logfile patch. Regards, Karl <k...@meme.com> Free Software: "You don't pay back, you pay forward." -- Robert A. Heinlein
patch_pg_current_logfile-v13.diff.writeonce
Description: Binary data
patch_pg_current_logfile-v13.diff.abstract_guc_part1
Description: Binary data
patch_pg_current_logfile-v13.diff.abstract_guc_part2
Description: Binary data
-- Sent via pgsql-hackers mailing list (pgsql-hackers@postgresql.org) To make changes to your subscription: http://www.postgresql.org/mailpref/pgsql-hackers