pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix reference-after-free when waiting for another xact due to co 2+ messages / 1 participants [nested] [flat]
* pgsql: Fix reference-after-free when waiting for another xact due to co @ 2015-02-04 14:09 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2015-02-04 14:09 UTC (permalink / raw) To: pgsql-committers Fix reference-after-free when waiting for another xact due to constraint. If an insertion or update had to wait for another transaction to finish, because there was another insertion with conflicting key in progress, we would pass a just-free'd item pointer to XactLockTableWait(). All calls to XactLockTableWait() and MultiXactIdWait() had similar issues. Some passed a pointer to a buffer in the buffer cache, after already releasing the lock. The call in EvalPlanQualFetch had already released the pin too. All but the call in execUtils.c would merely lead to reporting a bogus ctid, however (or an assertion failure, if enabled). All the callers that passed HeapTuple->t_data->t_ctid were slightly bogus anyway: if the tuple was updated (again) in the same transaction, its ctid field would point to the next tuple in the chain, not the tuple itself. Backpatch to 9.4, where the 'ctid' argument to XactLockTableWait was added (in commit f88d4cfc) Branch ------ master Details ------- http://git.postgresql.org/pg/commitdiff/57fe246890ad51e166fb6a8da937e41c35d7a279 Modified Files -------------- src/backend/access/heap/heapam.c | 16 ++++++++-------- src/backend/catalog/index.c | 4 ++-- src/backend/executor/execMain.c | 2 +- src/backend/executor/execUtils.c | 4 +++- 4 files changed, 14 insertions(+), 12 deletions(-) -- 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] 2+ messages in thread
* pgsql: Fix reference-after-free when waiting for another xact due to co @ 2015-02-04 14:09 Heikki Linnakangas <heikki.linnakangas@iki.fi> 0 siblings, 0 replies; 2+ messages in thread From: Heikki Linnakangas @ 2015-02-04 14:09 UTC (permalink / raw) To: pgsql-committers Fix reference-after-free when waiting for another xact due to constraint. If an insertion or update had to wait for another transaction to finish, because there was another insertion with conflicting key in progress, we would pass a just-free'd item pointer to XactLockTableWait(). All calls to XactLockTableWait() and MultiXactIdWait() had similar issues. Some passed a pointer to a buffer in the buffer cache, after already releasing the lock. The call in EvalPlanQualFetch had already released the pin too. All but the call in execUtils.c would merely lead to reporting a bogus ctid, however (or an assertion failure, if enabled). All the callers that passed HeapTuple->t_data->t_ctid were slightly bogus anyway: if the tuple was updated (again) in the same transaction, its ctid field would point to the next tuple in the chain, not the tuple itself. Backpatch to 9.4, where the 'ctid' argument to XactLockTableWait was added (in commit f88d4cfc) Branch ------ REL9_4_STABLE Details ------- http://git.postgresql.org/pg/commitdiff/48a565d78ba9413317d6095010cf622e9d6a36eb Modified Files -------------- src/backend/access/heap/heapam.c | 16 ++++++++-------- src/backend/catalog/index.c | 4 ++-- src/backend/executor/execMain.c | 2 +- src/backend/executor/execUtils.c | 4 +++- 4 files changed, 14 insertions(+), 12 deletions(-) -- 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] 2+ messages in thread
end of thread, other threads:[~2015-02-04 14:09 UTC | newest] Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2015-02-04 14:09 pgsql: Fix reference-after-free when waiting for another xact due to co Heikki Linnakangas <heikki.linnakangas@iki.fi> 2015-02-04 14:09 pgsql: Fix reference-after-free when waiting for another xact due to co Heikki Linnakangas <heikki.linnakangas@iki.fi>
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