Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-24 Thread Michael Paquier
On Sun, Sep 24, 2017 at 2:28 AM, Tom Lane wrote: > Michael Paquier writes: >> I have spent some time looking at your patch and testing it. This >> looks sane. A small comment that I have would be to add an assertion >> at the top of

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Bossart, Nathan
On 9/23/17, 12:36 PM, "Tom Lane" wrote: >"Bossart, Nathan" writes: >> This looks reasonable to me as well. I haven't noticed any issues after >> a couple hours of pgbench with aggressive autovacuum settings, either. > > Thanks for looking. As I'm sure

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Tom Lane
"Bossart, Nathan" writes: > This looks reasonable to me as well. I haven't noticed any issues after > a couple hours of pgbench with aggressive autovacuum settings, either. Thanks for looking. As I'm sure you realize, what motivated that was not liking the switch into

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Tom Lane
Michael Paquier writes: > I have spent some time looking at your patch and testing it. This > looks sane. A small comment that I have would be to add an assertion > at the top of perform_work_item to be sure that it is called in the > memory context of AutovacMemCxt.

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Bossart, Nathan
On 9/23/17, 5:27 AM, "Michael Paquier" wrote: >On Sat, Sep 23, 2017 at 6:09 AM, Tom Lane wrote: >> I notice that autovacuum.c calls autovacuum_do_vac_analyze, and >> thereby vacuum(), in TopTransactionContext. This doesn't seem >> like a terribly

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Alvaro Herrera
Alvaro Herrera wrote: > One idea I just had is to somehow add it to src/test/modules/brin, and > set up the postmaster in that test with autovacuum_naptime=1s. I'll go > check how feasible that is. (By placing it there we could also verify > that the index does indeed contain the index entries

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Alvaro Herrera
Tom Lane wrote: > I notice that autovacuum.c calls autovacuum_do_vac_analyze, and > thereby vacuum(), in TopTransactionContext. This doesn't seem > like a terribly great idea, because it doesn't correspond to what > happens during a manually-invoked vacuum. TopTransactionContext > will go away

Re: [HACKERS] Rethinking autovacuum.c memory handling

2017-09-23 Thread Michael Paquier
On Sat, Sep 23, 2017 at 6:09 AM, Tom Lane wrote: > I notice that autovacuum.c calls autovacuum_do_vac_analyze, and > thereby vacuum(), in TopTransactionContext. This doesn't seem > like a terribly great idea, because it doesn't correspond to what > happens during a

[HACKERS] Rethinking autovacuum.c memory handling

2017-09-22 Thread Tom Lane
I notice that autovacuum.c calls autovacuum_do_vac_analyze, and thereby vacuum(), in TopTransactionContext. This doesn't seem like a terribly great idea, because it doesn't correspond to what happens during a manually-invoked vacuum. TopTransactionContext will go away when vacuum() commits the