pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Ignore inherited temp relations from other sessions when truncat
6+ messages / 1 participants
[nested] [flat]

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be issues on children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/285abc8df4d7741fc4e303fb6a906a364345ebbe

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be issues on children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/0a323ae6769968408d00ec1a9d1790706d5540fc

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be issues on children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/1d7007671051d04881365c075ed1fc4e36a578f5

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be issues on children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
REL_10_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be work on the children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/1e504f01da11db0181d7b28bb30cb5eeb0767184

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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

* pgsql: Ignore inherited temp relations from other sessions when truncat
@ 2018-12-27 01:19  Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 6+ messages in thread

From: Michael Paquier @ 2018-12-27 01:19 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Ignore inherited temp relations from other sessions when truncating

Inheritance trees can include temporary tables if the parent is
permanent, which makes possible the presence of multiple temporary
children from different sessions.  Trying to issue a TRUNCATE on the
parent in this scenario causes a failure, so similarly to any other
queries just ignore such cases, which makes TRUNCATE work
transparently.

This makes truncation behave similarly to any other DML query working on
the parent table with queries which need to be issues on children.  A
set of isolation tests is added to cover basic cases.

Reported-by: Zhou Digoal
Author: Amit Langote, Michael Paquier
Discussion: https://postgr.es/m/15565-ce67a48d0244436a@postgresql.org
Backpatch-through: 9.4

Branch
------
REL_11_STABLE

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

Modified Files
--------------
src/backend/commands/tablecmds.c             |  23 ++-
src/test/isolation/expected/inherit-temp.out | 217 +++++++++++++++++++++++++++
src/test/isolation/isolation_schedule        |   1 +
src/test/isolation/specs/inherit-temp.spec   |  78 ++++++++++
4 files changed, 316 insertions(+), 3 deletions(-)



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


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

Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>
2018-12-27 01:19 pgsql: Ignore inherited temp relations from other sessions when truncat Michael Paquier <michael@paquier.xyz>

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