Re: [PATCHES] Double Backslash example patch
David Fetter wrote: > Please find enclosed a patch exemplifying typical use of the ARE > Class-Shorthand EscapesĀ®. I believe it will help intrepid regex > users. :) If you want to explain something, it's normally better to create an example just for that point, instead of piggybacking it onto another example. Else you just make it harder for people to recognize the relevant information. For instance, in the case you want to patch the example aims to show how patterns are not anchored, as opposed to the pattern for the LIKE operator. What does the escape syntax of the pattern have to do with that? ---(end of broadcast)--- TIP 1: subscribe and unsubscribe commands go to [EMAIL PROTECTED]
[PATCHES] Another pg_autovacuum patch
Ok, one more pg_autovacuum patch (Thanks to Tom for fixing the long long
overflow problem).
This patch addresses two minor issues (the last two pg_autovacuum bugs I
know of):
First the CountAtLastAnalyze varable was initially being set incorrectly
causing pg_autovacuum to perform unneeded analyzes on during startup.
Second, there was a debug print statement left in that was printing
relisshared.
The attached patch fixes both issues, and should be applied to both 7.4
and HEAD.
Thanks,
Matthew O'Connor
*** pg_autovacuum.c.orig 2003-12-07 15:25:08.0 -0500
--- pg_autovacuum.c 2003-12-07 15:46:07.0 -0500
***
*** 108,114
new_tbl->CountAtLastAnalyze =
(atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_ins"))) +
! atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_upd";
new_tbl->curr_analyze_count = new_tbl->CountAtLastAnalyze;
new_tbl->CountAtLastVacuum =
--- 108,115
new_tbl->CountAtLastAnalyze =
(atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_ins"))) +
! atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_upd"))) +
! atol(PQgetvalue(res, row, PQfnumber(res, "n_tup_del";
new_tbl->curr_analyze_count = new_tbl->CountAtLastAnalyze;
new_tbl->CountAtLastVacuum =
***
*** 120,126
new_tbl->reltuples = atoi(PQgetvalue(res, row, PQfnumber(res, "reltuples")));
new_tbl->relpages = atoi(PQgetvalue(res, row, PQfnumber(res, "relpages")));
- log_entry(PQgetvalue(res, row, PQfnumber(res, "relisshared")));
if (strcmp("t", PQgetvalue(res, row, PQfnumber(res, "relisshared"
new_tbl->relisshared = 0;
else
--- 121,126
---(end of broadcast)---
TIP 4: Don't 'kill -9' the postmaster
[PATCHES] pg_autovacuum another one line patch
On the performance list, Gaetano Mendola noticed that pg_autovacuum doesn't perform an fflush after the last log_entry call before sleeping. This makes tail -f very annoying to watch. Attached is a patch to add that one line. Matthew *** pg_autovacuum.c.orig 2003-12-08 00:30:08.0 -0500 --- pg_autovacuum.c 2003-12-08 00:31:00.0 -0500 *** *** 1161,1166 --- 1161,1167 "%i All DBs checked in: %.0f usec, will sleep for %i secs.", loops, diff, sleep_secs); log_entry(logbuffer); + fflush(LOGOUTPUT); } sleep(sleep_secs); /* Larger Pause between outer loops */ ---(end of broadcast)--- TIP 2: you can get off all lists at once with the unregister command (send "unregister YourEmailAddressHere" to [EMAIL PROTECTED])
