pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Close relations opened specifically for AFTER triggers 6+ messages / 1 participants [nested] [flat]
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:41 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/1051099a9045fe4d6c81eeea33dcd24cd2ba7fd4 Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:41 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:41 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ REL_19_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/4f0af2635be7963c3250d0469e2c159dd0338574 Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:42 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/715d8397195c6435bae837446c3ae9b1dcd4221a Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:42 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:42 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/70d5b066825a8ce5f786313dc9751f3cf1d29569 Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:43 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/059aae612f57b3be5942ea05158c1cf9afa8dd38 Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Close relations opened specifically for AFTER triggers @ 2026-08-26 14:43 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-08-26 14:43 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Close relations opened specifically for AFTER triggers 39dcfda2d fixed an incorrect reuse of ResultRelInfos for AFTER triggers when the ResultRelInfo needed to have a different ri_RootResultRelInfo. That caused an issue in logical replication apply workers as finish_edata() neglects to call ExecCloseResultRelations() and instead relies on ExecCleanupTupleRouting() to close relations opened during partitioning's tuple routing. Since 39dcfda2d, because we may have done some additional table_opens() calls due to having to create an additional ResultRelInfo because of requirements to have a different ri_RootResultRelInfo, we should now be explicitly closing any relations opened on ResultRelInfos in EState's es_trig_target_relations. Since finish_edate() seems to want to avoid calling ExecCloseResultRelations(), add a new external function named ExecCloseTrigTargetRelations(). Reported-by: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: Hayato Kuroda (Fujitsu) <kuroda.hayato@fujitsu.com> Author: David Rowley <dgrowleyml@gmail.com> Reviewed-by: Zhijie Hou (Fujitsu) <houzj.fnst@fujitsu.com> Discussion: https://postgr.es/m/OS9PR01MB121491E7E05950D108AF9A6D8F5A72@OS9PR01MB12149.jpnprd01.prod.outlook.com Backpatch-through: 15 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/c949e6524c0f306513176e8f96bd8b4bdd49d667 Modified Files -------------- src/backend/executor/execMain.c | 16 ++++++++++++++++ src/backend/replication/logical/worker.c | 12 ++++++++---- src/include/executor/executor.h | 1 + src/test/subscription/t/013_partition.pl | 7 +++++++ 4 files changed, 32 insertions(+), 4 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-08-26 14:43 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-08-26 14:41 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.org> 2026-08-26 14:41 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.org> 2026-08-26 14:42 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.org> 2026-08-26 14:42 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.org> 2026-08-26 14:43 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.org> 2026-08-26 14:43 pgsql: Close relations opened specifically for AFTER triggers David Rowley <drowley@postgresql.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