Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-22 Thread Prakash Itnal
Hi Tom/Alvaro, Kindly let us know if the correction provided in previous mail is fine or not! Current code any way handle scenario-1 whereas it is still vulnerable to scenario-2. >From previous mail: *Scenario-1:* current_time (2015) -> changed_to_past (1995) -> stays-here-for-half-day -> correct

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-21 Thread Prakash Itnal
Hi, To my understanding it will probably not open doors for worst situations! Please correct if my below understanding is correct. The latch will wake up under below three situations: a) Socket error (=> result is set to negative number) b) timeout (=> result is set to TIMEOUT) c) some event arri

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-20 Thread Tom Lane
Prakash Itnal writes: > Sorry for the late response. The current patch only fixes the scenario-1 > listed below. It will not address the scenario-2. Also we need a fix in > unix_latch.c where the remaining sleep time is evaluated, if latch is woken > by other events (or result=0). Here to it is po

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-20 Thread Prakash Itnal
Hi, Sorry for the late response. The current patch only fixes the scenario-1 listed below. It will not address the scenario-2. Also we need a fix in unix_latch.c where the remaining sleep time is evaluated, if latch is woken by other events (or result=0). Here to it is possible the latch might go

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-19 Thread Andres Freund
On 2015-06-17 18:10:42 -0300, Alvaro Herrera wrote: > Yeah, the case is pretty weird and I'm not really sure that the server > ought to be expected to behave. But if this is actually the only part > of the server that misbehaves because of sudden gigantic time jumps, I > think it's fair to patch i

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-19 Thread Alvaro Herrera
Tom Lane wrote: > Alvaro Herrera writes: > > Yeah, the case is pretty weird and I'm not really sure that the server > > ought to be expected to behave. But if this is actually the only part > > of the server that misbehaves because of sudden gigantic time jumps, I > > think it's fair to patch it.

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-18 Thread Robert Haas
On Wed, Jun 17, 2015 at 5:10 PM, Alvaro Herrera wrote: > Yeah, the case is pretty weird and I'm not really sure that the server > ought to be expected to behave. But if this is actually the only part > of the server that misbehaves because of sudden gigantic time jumps, I > think it's fair to pat

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-18 Thread Alvaro Herrera
Cédric Villemain wrote: > > > Le 17/06/2015 23:10, Alvaro Herrera a écrit : > > Tom Lane wrote: > >> launcher_determine_sleep() does have a minimum sleep time, and it seems > >> like we could fairly cheaply guard against this kind of scenario by also > >> enforcing a maximum sleep time (of say 5

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-18 Thread Cédric Villemain
Le 17/06/2015 23:10, Alvaro Herrera a écrit : > Tom Lane wrote: >> launcher_determine_sleep() does have a minimum sleep time, and it seems >> like we could fairly cheaply guard against this kind of scenario by also >> enforcing a maximum sleep time (of say 5 or 10 minutes). Not quite >> convince

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-17 Thread Tom Lane
Alvaro Herrera writes: > Yeah, the case is pretty weird and I'm not really sure that the server > ought to be expected to behave. But if this is actually the only part > of the server that misbehaves because of sudden gigantic time jumps, I > think it's fair to patch it. Here's a proposed patch.

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-17 Thread Tom Lane
Haribabu Kommi writes: > I can think of a case where the "launcher_determine_sleep" function > returns a big sleep value because of system time change. > Because of that it is possible that the launcher is not generating > workers to do the vacuum. May be I am wrong. I talked with Alvaro about th

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-17 Thread Alvaro Herrera
Prakash Itnal wrote: > Currently the issue is easily reproducible. Steps to reproduce: > * Set some aggressive values for auto-vacuuming. > * Run a heavy database update/delete/insert queries. This leads to invoking > auto-vacuuming in quick successions. > * Change the system time to older for eg.

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-17 Thread Haribabu Kommi
On Wed, Jun 17, 2015 at 2:17 PM, Prakash Itnal wrote: > Hi, > > Currently the issue is easily reproducible. Steps to reproduce: > * Set some aggressive values for auto-vacuuming. > * Run a heavy database update/delete/insert queries. This leads to invoking > auto-vacuuming in quick successions. >

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-16 Thread Prakash Itnal
Hi, Currently the issue is easily reproducible. Steps to reproduce: * Set some aggressive values for auto-vacuuming. * Run a heavy database update/delete/insert queries. This leads to invoking auto-vacuuming in quick successions. * Change the system time to older for eg. 1995-01-01 Suddenly auto-

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-15 Thread Prakash Itnal
Hi, @Avaro Herrera, Thanks for quick reply. I was on leave and hence not able to reply soon. This issue was observed on customer site. However after long discussion and digging into what happened around the date 2nd May 2015, we got to know that NTP server suddenly went back in time to 1995. It r

Re: [HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-10 Thread Alvaro Herrera
Prakash Itnal wrote: > Hello, > > Recently we encountered a issue where the disc space is continuously > increasing towards 100%. Then a manual vacuum freed the disc space. But > again it is increasing. When digged more it is found that auto-vacuuming > was not running or it is either stucked/hang

[HACKERS] Auto-vacuum is not running in 9.1.12

2015-06-10 Thread Prakash Itnal
Hello, Recently we encountered a issue where the disc space is continuously increasing towards 100%. Then a manual vacuum freed the disc space. But again it is increasing. When digged more it is found that auto-vacuuming was not running or it is either stucked/hanged. Version: 9.1.12 Auto vacuum