Re: WALWriteLocks

Поиск
Список
Период
Сортировка
От Vijaykumar Jain
Тема Re: WALWriteLocks
Дата
Msg-id CAM+6J96M3Sj+eeyFrt2HPQ7VrFojQ1biSM6kC-1mUC_ce-dLWw@mail.gmail.com
обсуждение исходный текст
Ответ на Re: WALWriteLocks  (Laurenz Albe <laurenz.albe@cybertec.at>)
Ответы Re: WALWriteLocks
Список pgsql-admin
ok i have a small laptop with an even smaller vm :)

pgbench -i s 3
pgbench -c 20 -j 5 -T 900 -M prepared

select wait_event_type, wait_event from pg_stat_activity;

 wait_event_type |     wait_event
-----------------+---------------------
 Activity        | LogicalLauncherMain
 Activity        | AutoVacuumMain
 LWLock          | WALWrite
 Lock            | transactionid
 Lock            | tuple
 LWLock          | WALWrite
 Lock            | transactionid
 Lock            | transactionid
 Lock            | tuple
 Lock            | transactionid
 Lock            | transactionid
 Lock            | transactionid
 Lock            | tuple
 IO              | WALSync
 Lock            | transactionid
                 |
 Activity        | BgWriterHibernate
 Activity        | CheckpointerMain
 LWLock          | WALWrite


i then destroyed the slow WAL db 
rm -rf data 


and built a new one without additional latency to WALdir.

initdb -D data
pg_ctl -D data start

pgbench -i -s 3
pgbench -c 20 -j 5 -T 900 -M prepared

i see similar output as above
but no 
WALWriteLock

old thread, just for reference. do not read into anything :) 



Thanks,
Vijay





On Fri, 30 Apr 2021 at 00:22, Laurenz Albe <laurenz.albe@cybertec.at> wrote:
On Fri, 2021-04-30 at 00:13 +0530, Vijaykumar Jain wrote:
> I tried the below, but i could not simulate WALWriteLock waits.
>
> create table foo(id int)
>
>  for i in {1..10}; do  psql -c "begin transaction; insert into foo select 1 from generate_series(1, 1000); commit;" & done

Perhaps you should do simple inserts of one row and run that script
with a pgbench and lots of clients.

Yours,
Laurenz Albe
--
Cybertec | https://www.cybertec-postgresql.com

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

Предыдущее
От: Henry Francisco Garcia Cortez
Дата:
Сообщение: a stop job is running for postgresql cluster 11-main
Следующее
От: Vijaykumar Jain
Дата:
Сообщение: Re: WALWriteLocks