pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Prevent race condition while reading relmapper file.
6+ messages / 1 participants
[nested] [flat]

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
master

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

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
REL_13_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/2a0ab13f8dd1346d03b00a737734aeca036514f9

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
REL_12_STABLE

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

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread

* pgsql: Prevent race condition while reading relmapper file.
@ 2021-06-24 07:46  Heikki Linnakangas <heikki.linnakangas@iki.fi>
  0 siblings, 0 replies; 6+ messages in thread

From: Heikki Linnakangas @ 2021-06-24 07:46 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Prevent race condition while reading relmapper file.

Contrary to the comment here, POSIX does not guarantee atomicity of a
read(), if another process calls write() concurrently. Or at least Linux
does not. Add locking to load_relmap_file() to avoid the race condition.

Fixes bug #17064. Thanks to Alexander Lakhin for the report and test case.

Backpatch-through: 9.6, all supported versions.
Discussion: https://www.postgresql.org/message-id/17064-bb0d7904ef72add3@postgresql.org

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/85ae8ccb2fb330785c6503316635dc7256cbe495

Modified Files
--------------
src/backend/utils/cache/relmapper.c | 34 ++++++++++++++++++++--------------
1 file changed, 20 insertions(+), 14 deletions(-)



^ permalink  raw  reply  [nested|flat] 6+ messages in thread


end of thread, other threads:[~2021-06-24 07:46 UTC | newest]

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>
2021-06-24 07:46 pgsql: Prevent race condition while reading relmapper file. Heikki Linnakangas <heikki.linnakangas@iki.fi>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox