BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats

Поиск
Список
Период
Сортировка
От bryce2@obviously.com
Тема BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats
Дата
Msg-id 20150305181432.2529.76377@wrigleys.postgresql.org
обсуждение исходный текст
Ответы Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-bugs
The following bug has been logged on the website:

Bug reference:      12834
Logged by:          Bryce Nesbitt
Email address:      bryce2@obviously.com
PostgreSQL version: 9.4.1
Operating system:   Linux
Description:

This is an issue primarily for home computers and laptops which run
postgres, but not under heavy load.

Every minute postgresql runs the "stats" process which writes the following
files:

postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/db_0.tmp
postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/global.tmp
postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/db_12066.tmp
postgres(3814): CW /var/lib/postgresql/9.4/main/pg_stat_tmp/global.stat
postgres(568): CW /var/lib/postgresql/9.4/main/base/12066/11868
unknown(568): CW /var/lib/postgresql/9.4/main/global/12062
unknown(568): CW /var/lib/postgresql/9.4/main/base/12066/11828
unknown(568): CW /var/lib/postgresql/8.4/main/base/12066/11833

This data was collected with "fatrace".  There's one set of writes per
installed version of postgres on the test system (8.1,9.1,9.3,9.4).

----

Would it be possible to have the stats process take no action and make no
writes to the disk, if there has been no database activity in the interval?

---
For laptops disk writes wake up the machine and/or harddrive.  For SSD's
it's a wear leveling issue.  With this write happening 24/7 on millions of
computers this is also an energy use optimization potential (reduce
electricity use from your keyboard!)

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

Предыдущее
От: Andres Freund
Дата:
Сообщение: Re: BUG #12833: Cannot cancel query or terminate backend if it client is SIGSTOPed
Следующее
От: Tom Lane
Дата:
Сообщение: Re: BUG #12834: Avoiding Disk Control Writes for better Laptop / SSD compatibility. pgstats