pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Make autovacuum more selective about temp tables to keep
4+ messages / 1 participants
[nested] [flat]

* pgsql: Make autovacuum more selective about temp tables to keep
@ 2018-12-27 19:04  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2018-12-27 19:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make autovacuum more selective about temp tables to keep

When temp tables are in danger of XID wraparound, autovacuum drops them;
however, it preserves those that are owned by a working session.  This
is desirable, except when the session is connected to a different
database (because the temp tables cannot be from that session), so make
it only keep the temp tables only if the backend is in the same database
as the temp tables.

This is not bulletproof: it fails to detect temp tables left by a
session whose backend ID is reused in the same database but the new
session does not use temp tables.  Commit 943576bddcb5 fixes that case
too, for branches 11 and up (which is why we don't apply this fix to
those branches), but back-patching that one is not universally agreed
on.

Discussion: https://postgr.es/m/20181214162843.37g6h3txto43akrb@alvherre.pgsql
Reviewed-by: Takayuki Tsunakawa, Michaël Paquier

Branch
------
REL9_5_STABLE

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

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



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

* pgsql: Make autovacuum more selective about temp tables to keep
@ 2018-12-27 19:04  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2018-12-27 19:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make autovacuum more selective about temp tables to keep

When temp tables are in danger of XID wraparound, autovacuum drops them;
however, it preserves those that are owned by a working session.  This
is desirable, except when the session is connected to a different
database (because the temp tables cannot be from that session), so make
it only keep the temp tables only if the backend is in the same database
as the temp tables.

This is not bulletproof: it fails to detect temp tables left by a
session whose backend ID is reused in the same database but the new
session does not use temp tables.  Commit 943576bddcb5 fixes that case
too, for branches 11 and up (which is why we don't apply this fix to
those branches), but back-patching that one is not universally agreed
on.

Discussion: https://postgr.es/m/20181214162843.37g6h3txto43akrb@alvherre.pgsql
Reviewed-by: Takayuki Tsunakawa, Michaël Paquier

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 9 +++++++--
1 file changed, 7 insertions(+), 2 deletions(-)



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

* pgsql: Make autovacuum more selective about temp tables to keep
@ 2018-12-27 19:04  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2018-12-27 19:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make autovacuum more selective about temp tables to keep

When temp tables are in danger of XID wraparound, autovacuum drops them;
however, it preserves those that are owned by a working session.  This
is desirable, except when the session is connected to a different
database (because the temp tables cannot be from that session), so make
it only keep the temp tables only if the backend is in the same database
as the temp tables.

This is not bulletproof: it fails to detect temp tables left by a
session whose backend ID is reused in the same database but the new
session does not use temp tables.  Commit 943576bddcb5 fixes that case
too, for branches 11 and up (which is why we don't apply this fix to
those branches), but back-patching that one is not universally agreed
on.

Discussion: https://postgr.es/m/20181214162843.37g6h3txto43akrb@alvherre.pgsql
Reviewed-by: Takayuki Tsunakawa, Michaël Paquier

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7fc2363a615842e42f927d915331a4b3bd67af19

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



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

* pgsql: Make autovacuum more selective about temp tables to keep
@ 2018-12-27 19:04  Alvaro Herrera <alvherre@alvh.no-ip.org>
  0 siblings, 0 replies; 4+ messages in thread

From: Alvaro Herrera @ 2018-12-27 19:04 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Make autovacuum more selective about temp tables to keep

When temp tables are in danger of XID wraparound, autovacuum drops them;
however, it preserves those that are owned by a working session.  This
is desirable, except when the session is connected to a different
database (because the temp tables cannot be from that session), so make
it only keep the temp tables only if the backend is in the same database
as the temp tables.

This is not bulletproof: it fails to detect temp tables left by a
session whose backend ID is reused in the same database but the new
session does not use temp tables.  Commit 943576bddcb5 fixes that case
too, for branches 11 and up (which is why we don't apply this fix to
those branches), but back-patching that one is not universally agreed
on.

Discussion: https://postgr.es/m/20181214162843.37g6h3txto43akrb@alvherre.pgsql
Reviewed-by: Takayuki Tsunakawa, Michaël Paquier

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/5199abaca318f0571aa3df09f5b700335d7d62d1

Modified Files
--------------
src/backend/postmaster/autovacuum.c | 11 +++++++++--
1 file changed, 9 insertions(+), 2 deletions(-)



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


end of thread, other threads:[~2018-12-27 19:04 UTC | newest]

Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 19:04 pgsql: Make autovacuum more selective about temp tables to keep Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-12-27 19:04 pgsql: Make autovacuum more selective about temp tables to keep Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-12-27 19:04 pgsql: Make autovacuum more selective about temp tables to keep Alvaro Herrera <alvherre@alvh.no-ip.org>
2018-12-27 19:04 pgsql: Make autovacuum more selective about temp tables to keep Alvaro Herrera <alvherre@alvh.no-ip.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