pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
5+ messages / 1 participants
[nested] [flat]

* pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
@ 2018-04-18 16:07 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-04-18 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
master

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

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



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

* pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
@ 2018-04-18 16:07 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-04-18 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
REL_10_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/94a898f69c8399314c322bb560ea7ddbf877ccba

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



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

* pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
@ 2018-04-18 16:07 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-04-18 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
REL9_6_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/69e3a548e99f81babf28140526670dded7f94dcf

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



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

* pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
@ 2018-04-18 16:07 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-04-18 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
REL9_5_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/82acf3eb7db92640f16a1197e62f2dceba77415c

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



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

* pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.
@ 2018-04-18 16:07 Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 0 replies; 5+ messages in thread

From: Tom Lane @ 2018-04-18 16:07 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY.

Commit 54eff5311 did not account for the possibility that we'd have
a transaction snapshot due to default_transaction_isolation being
set high enough to require one.  The transaction snapshot is enough
to hold back our advertised xmin and thus risk deadlock anyway.
The only way to get rid of that snap is to start a new transaction,
so let's do that instead.  Also throw in an assert checking that we
really have gotten to a state where no xmin is being advertised.

Back-patch to 9.4, like the previous commit.

Discussion: https://postgr.es/m/CAMkU=1ztk3TpQdcUNbxq93pc80FrXUjpDWLGMeVBDx71GHNwZQ@mail.gmail.com

Branch
------
REL9_4_STABLE

Details
-------
https://git.postgresql.org/pg/commitdiff/7490ce725edd5b46f14fa8a449a97c9487c1d143

Modified Files
--------------
src/backend/commands/indexcmds.c | 17 ++++++++++++++---
1 file changed, 14 insertions(+), 3 deletions(-)



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


end of thread, other threads:[~2018-04-18 16:07 UTC | newest]

Thread overview: 5+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2018-04-18 16:07 pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-18 16:07 pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-18 16:07 pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-18 16:07 pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. Tom Lane <tgl@sss.pgh.pa.us>
2018-04-18 16:07 pgsql: Better fix for deadlock hazard in CREATE INDEX CONCURRENTLY. Tom Lane <tgl@sss.pgh.pa.us>

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