ok my bad,
it seems it was renamed,
WALWriteLock in 9,6 to WALWrite :)
so Yes, I do see WALWrite LWLocks.
Thanks,
Vijay
On Fri, 30 Apr 2021 at 01:30, Vijaykumar Jain <vijaykumarjain.github@xxxxxxxxx> wrote:
ok i have a small laptop with an even smaller vm :)pgbench -i s 3pgbench -c 20 -j 5 -T 900 -M preparedselect wait_event_type, wait_event from pg_stat_activity;wait_event_type | wait_event-----------------+---------------------Activity | LogicalLauncherMainActivity | AutoVacuumMainLWLock | WALWriteLock | transactionidLock | tupleLWLock | WALWriteLock | transactionidLock | transactionidLock | tupleLock | transactionidLock | transactionidLock | transactionidLock | tupleIO | WALSyncLock | transactionid|Activity | BgWriterHibernateActivity | CheckpointerMainLWLock | WALWritei then destroyed the slow WAL dbrm -rf dataand built a new one without additional latency to WALdir.initdb -D datapg_ctl -D data startpgbench -i -s 3pgbench -c 20 -j 5 -T 900 -M preparedi see similar output as abovebut noWALWriteLockold thread, just for reference. do not read into anything :)Thanks,VijayOn Fri, 30 Apr 2021 at 00:22, Laurenz Albe <laurenz.albe@xxxxxxxxxxx> 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