pgsql: Reduce the scope of volatile qualifiers

Поиск
Список
Период
Сортировка
От Peter Eisentraut
Тема pgsql: Reduce the scope of volatile qualifiers
Дата
Msg-id E1vxLkA-0028qf-0f@gemulon.postgresql.org
обсуждение исходный текст
Список pgsql-committers
Reduce the scope of volatile qualifiers

Commit c66a7d75e652 introduced a new "cast discards ‘volatile’"
warning (-Wcast-qual) in vac_truncate_clog().

Instead of making use of unvolatize(), remove the warning by reducing the
scope of the volatile qualifier (added in commit 2d2e40e3bef) to only
2 fields.

Also do the same for vac_update_datfrozenxid(), since the intent of
commit f65ab862e3b was to prevent the same kind of race condition that
commit 2d2e40e3bef was fixing.

Author: Bertrand Drouvot <bertranddrouvot.pg@gmail.com>
Suggested-by: Peter Eisentraut <peter@eisentraut.org>
Reviewed-by: Nathan Bossart <nathandbossart@gmail.com>
Discussion: https://www.postgresql.org/message-id/flat/aZ3a%2BV82uSfEjDmD%40ip-10-97-1-34.eu-west-3.compute.internal

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/f2d7570cdde75fd67acb279063b2701806662035

Modified Files
--------------
src/backend/commands/vacuum.c | 16 ++++++++++------
1 file changed, 10 insertions(+), 6 deletions(-)


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