pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Free disk space for dropped relations on commit.
7+ messages / 1 participants
[nested] [flat]

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:22  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/9f35f943732eaf9121a107f54ea043925e9a5d7b

Modified Files
--------------
src/backend/storage/smgr/md.c | 100 +++++++++++++++++++++++++++++-------------
1 file changed, 69 insertions(+), 31 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:22  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL_13_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 100 +++++++++++++++++++++++++++++-------------
1 file changed, 69 insertions(+), 31 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:22  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL_12_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/50f338574242be955c79ed0b3e193ce3ff4cd5eb

Modified Files
--------------
src/backend/storage/smgr/md.c | 100 +++++++++++++++++++++++++++++-------------
1 file changed, 69 insertions(+), 31 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:22  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:22 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 89 +++++++++++++++++++++++++++++++------------
1 file changed, 65 insertions(+), 24 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:23  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/22701755dc6429ec5896e37958565466b0509310

Modified Files
--------------
src/backend/storage/smgr/md.c | 89 +++++++++++++++++++++++++++++++------------
1 file changed, 65 insertions(+), 24 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:23  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL9_6_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 89 +++++++++++++++++++++++++++++++------------
1 file changed, 65 insertions(+), 24 deletions(-)



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

* pgsql: Free disk space for dropped relations on commit.
@ 2020-12-01 02:23  Thomas Munro <tmunro@postgresql.org>
  0 siblings, 0 replies; 7+ messages in thread

From: Thomas Munro @ 2020-12-01 02:23 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Free disk space for dropped relations on commit.

When committing a transaction that dropped a relation, we previously
truncated only the first segment file to free up disk space (the one
that won't be unlinked until the next checkpoint).

Truncate higher numbered segments too, even though we unlink them on
commit.  This frees the disk space immediately, even if other backends
have open file descriptors and might take a long time to get around to
handling shared invalidation events and closing them.  Also extend the
same behavior to the first segment, in recovery.

Back-patch to all supported releases.

Bug: #16663
Reported-by: Denis Patron <denis.patron@previnet.it>
Reviewed-by: Pavel Borisov <pashkin.elfe@gmail.com>
Reviewed-by: Neil Chen <carpenter.nail.cz@gmail.com>
Reviewed-by: David Zhang <david.zhang@highgo.ca>
Discussion: https://postgr.es/m/16663-fe97ccf9932fc800%40postgresql.org

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/storage/smgr/md.c | 89 +++++++++++++++++++++++++++++++------------
1 file changed, 65 insertions(+), 24 deletions(-)



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


end of thread, other threads:[~2020-12-01 02:23 UTC | newest]

Thread overview: 7+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2020-12-01 02:22 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:22 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:22 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:22 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:23 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:23 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>
2020-12-01 02:23 pgsql: Free disk space for dropped relations on commit. Thomas Munro <tmunro@postgresql.org>

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