Re: snapshot too old, configured by time

Поиск
Список
Период
Сортировка
От Jeff Janes
Тема Re: snapshot too old, configured by time
Дата
Msg-id CAMkU=1xfeWJCTvrkjgsJuQXw-6wp1BPHsSLV2=mcXhrdZXXCvg@mail.gmail.com
обсуждение исходный текст
Ответ на Re: snapshot too old, configured by time  (Kevin Grittner <kgrittn@gmail.com>)
Ответы Re: snapshot too old, configured by time  (Kevin Grittner <kgrittn@gmail.com>)
Список pgsql-hackers
On Thu, Mar 17, 2016 at 2:15 PM, Kevin Grittner <kgrittn@gmail.com> wrote:
> New patch just to merge in recent commits -- it was starting to
> show some bit-rot.  Tests folded in with main patch.

I'm not sure if this is operating as expected.

I set the value to 1min.

I set up a test like this:

pgbench -i

pgbench -c4 -j4 -T 3600 &

### watch the size of branches table
while (true) ; do psql -c "\dt+" | fgrep _branches; sleep 10; done &

### set up a long lived snapshot.
psql -c 'begin; set transaction isolation level repeatable read;
select sum(bbalance) from pgbench_branches; select pg_sleep(300);
select sum(bbalance) from pgbench_branches;'

As this runs, I can see the size of the pgbench_branches bloating once
the snapshot is taken, and continues bloating at a linear rate for the
full 300 seconds.

Once the 300 second pg_sleep is up, the long-lived snapshot holder
receives an error once it tries to access the table again, and then
the bloat stops increasing.  But shouldn't the bloat have stopped
increasing as soon as the snapshot became doomed, which would be after
a minute or so?


Cheers,

Jeff



В списке pgsql-hackers по дате отправления:

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: logger process infinite loop
Следующее
От: Jeff Janes
Дата:
Сообщение: Re: logger process infinite loop