pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
master

Details
-------
http://git.postgresql.org/pg/commitdiff/769fd9d8e06bf862334a0e04134a3d2c665e5e5b

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_6_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f6802936a53671c9db24273ab2ae94291a68afcd

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_5_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/26ce63ce76f91eac7570fcb893321ed0233d62ff

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_4_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/075cfbe4a966aa9717941ac8dce48434c4706aa5

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_3_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/d2a5b2b28f24e2e98a799fa8877f790ba8e68ab2

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_2_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/f5462dedb70417f57e76b4f90d68d7d099e5b046

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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

* pgsql: Fix mdtruncate() to close fd.c handle of deleted segments.
@ 2016-09-08 23:54  Andres Freund <andres@anarazel.de>
  0 siblings, 0 replies; 7+ messages in thread

From: Andres Freund @ 2016-09-08 23:54 UTC (permalink / raw)
  To: pgsql-committers

Fix mdtruncate() to close fd.c handle of deleted segments.

mdtruncate() forgot to FileClose() a segment's mdfd_vfd, when deleting
it. That lead to a fd.c handle to a truncated file being kept open until
backend exit.

The issue appears to have been introduced way back in 1a5c450f3024ac5,
before that the handle was closed inside FileUnlink().

The impact of this bug is limited - only VACUUM and ON COMMIT TRUNCATE
for temporary tables, truncate files in place (i.e. TRUNCATE itself is
not affected), and the relation has to be bigger than 1GB. The
consequences of a leaked fd.c handle aren't severe either.

Discussion: <20160908220748.oqh37ukwqqncbl3n@alap3.anarazel.de>
Backpatch: all supported releases

Branch
------
REL9_1_STABLE

Details
-------
http://git.postgresql.org/pg/commitdiff/08fdfe7a8a2f7516172a0d89b678a1b6c21c5afb

Modified Files
--------------
src/backend/storage/smgr/md.c | 1 +
1 file changed, 1 insertion(+)


-- 
Sent via pgsql-committers mailing list (pgsql-committers@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-committers


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


end of thread, other threads:[~2016-09-08 23:54 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>
2016-09-08 23:54 pgsql: Fix mdtruncate() to close fd.c handle of deleted segments. Andres Freund <andres@anarazel.de>

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