pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Flush relcache entries when their FKs are meddled with 4+ messages / 1 participants [nested] [flat]
* pgsql: Flush relcache entries when their FKs are meddled with @ 2019-01-21 22:39 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2019-01-21 22:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Flush relcache entries when their FKs are meddled with Back in commit 100340e2dcd0, we made relcache entries keep lists of the foreign keys applying to the relation -- but we forgot to update CacheInvalidateHeapTuple to flush those entries when new FKs got created or existing ones updated/deleted. No bugs appear to have been reported that would be explained by this ommission, but I noticed the problem while working on an unrelated bugfix which clearly showed it. Fix by adding relcache flush on relevant foreign key changes. Backpatch to 9.6, like the aforementioned commit. Discussion: https://postgr.es/m/201901211927.7mmhschxlejh@alvherre.pgsql Reviewed-by: Tom Lane Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/175544093524bef9c28c59c8d49c77b1fcf4fb92 Modified Files -------------- src/backend/utils/cache/inval.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Flush relcache entries when their FKs are meddled with @ 2019-01-21 22:39 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2019-01-21 22:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Flush relcache entries when their FKs are meddled with Back in commit 100340e2dcd0, we made relcache entries keep lists of the foreign keys applying to the relation -- but we forgot to update CacheInvalidateHeapTuple to flush those entries when new FKs got created or existing ones updated/deleted. No bugs appear to have been reported that would be explained by this ommission, but I noticed the problem while working on an unrelated bugfix which clearly showed it. Fix by adding relcache flush on relevant foreign key changes. Backpatch to 9.6, like the aforementioned commit. Discussion: https://postgr.es/m/201901211927.7mmhschxlejh@alvherre.pgsql Reviewed-by: Tom Lane Branch ------ REL_11_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/a7474308ceafb6d73730507165f45ffdbd5429c8 Modified Files -------------- src/backend/utils/cache/inval.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Flush relcache entries when their FKs are meddled with @ 2019-01-21 22:39 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2019-01-21 22:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Flush relcache entries when their FKs are meddled with Back in commit 100340e2dcd0, we made relcache entries keep lists of the foreign keys applying to the relation -- but we forgot to update CacheInvalidateHeapTuple to flush those entries when new FKs got created or existing ones updated/deleted. No bugs appear to have been reported that would be explained by this ommission, but I noticed the problem while working on an unrelated bugfix which clearly showed it. Fix by adding relcache flush on relevant foreign key changes. Backpatch to 9.6, like the aforementioned commit. Discussion: https://postgr.es/m/201901211927.7mmhschxlejh@alvherre.pgsql Reviewed-by: Tom Lane Branch ------ REL_10_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/3037b28b89b44fccfcfddb2254655f45b3005f82 Modified Files -------------- src/backend/utils/cache/inval.c | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) ^ permalink raw reply [nested|flat] 4+ messages in thread
* pgsql: Flush relcache entries when their FKs are meddled with @ 2019-01-21 22:39 Alvaro Herrera <alvherre@alvh.no-ip.org> 0 siblings, 0 replies; 4+ messages in thread From: Alvaro Herrera @ 2019-01-21 22:39 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Flush relcache entries when their FKs are meddled with Back in commit 100340e2dcd0, we made relcache entries keep lists of the foreign keys applying to the relation -- but we forgot to update CacheInvalidateHeapTuple to flush those entries when new FKs got created or existing ones updated/deleted. No bugs appear to have been reported that would be explained by this ommission, but I noticed the problem while working on an unrelated bugfix which clearly showed it. Fix by adding relcache flush on relevant foreign key changes. Backpatch to 9.6, like the aforementioned commit. Discussion: https://postgr.es/m/201901211927.7mmhschxlejh@alvherre.pgsql Reviewed-by: Tom Lane Branch ------ REL9_6_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4aead13a751f86a9e143d3ee931171a11fd7bf7e Modified Files -------------- src/backend/utils/cache/inval.c | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) ^ permalink raw reply [nested|flat] 4+ messages in thread
end of thread, other threads:[~2019-01-21 22:39 UTC | newest] Thread overview: 4+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2019-01-21 22:39 pgsql: Flush relcache entries when their FKs are meddled with Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-01-21 22:39 pgsql: Flush relcache entries when their FKs are meddled with Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-01-21 22:39 pgsql: Flush relcache entries when their FKs are meddled with Alvaro Herrera <alvherre@alvh.no-ip.org> 2019-01-21 22:39 pgsql: Flush relcache entries when their FKs are meddled with 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