Shared buffer access rule violations?
P <apraveen@pivotal.io>
From: Asim R P <apraveen@pivotal.io>
To: PostgreSQL mailing lists <pgsql-hackers@postgresql.org>
Date: 2018-07-11T00:15:13Z
Lists: pgsql-hackers
Hi, In order to make changes to a shared buffer, one must hold a pin on it and the content lock in exclusive mode. This rule seems to be followed in most of the places but there are a few exceptions. One can find several PageInit() calls with no content lock held. See, for example: fill_seq_with_data() vm_readbuf() fsm_readbuf() Moreover, fsm_vacuum_page() performs "PageGetContents(page))->fp_next_slot = 0;" without content lock. There may be more but I want to know if these can be treated as violations before moving ahead. Asim
Commits
-
Fix inadequate buffer locking in FSM and VM page re-initialization.
- 0cf3363c0110 9.3.24 landed
- 6d2d5ab173a9 9.4.19 landed
- 17c3dabbb70c 9.5.14 landed
- 073ffefd8082 9.6.10 landed
- f1963a1e79a4 10.5 landed
- 5586e42b3493 11.0 landed
- 130beba36d6d 12.0 landed