pg.ddx.io pgsql-committers@postgresql.org mailing list archivehelp / color / mirror / Atom feed
pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION 6+ messages / 1 participants [nested] [flat]
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:29 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:29 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ master Details ------- https://git.postgresql.org/pg/commitdiff/6ca8506ea59e396b0efa43edf439d4d3c77d8311 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:30 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ REL_18_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bea57a6b430c988d628582dd88e27281ccbae796 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:30 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ REL_17_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/bb08ac7ac38763076e5507559d9a8b0559572258 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:30 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:30 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ REL_16_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/0687a6eb03b6f25527c2a6b61e43679e496499d3 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:31 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ REL_15_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/f20b79059ea392ef3cef084033508d5d43bf20d9 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
* pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION @ 2026-01-06 04:31 David Rowley <drowley@postgresql.org> 0 siblings, 0 replies; 6+ messages in thread From: David Rowley @ 2026-01-06 04:31 UTC (permalink / raw) To: pgsql-committers@lists.postgresql.org Fix issue with EVENT TRIGGERS and ALTER PUBLICATION When processing the "publish" options of an ALTER PUBLICATION command, we call SplitIdentifierString() to split the options into a List of strings. Since SplitIdentifierString() modifies the delimiter character and puts NULs in their place, this would overwrite the memory of the AlterPublicationStmt. Later in AlterPublicationOptions(), the modified AlterPublicationStmt is copied for event triggers, which would result in the event trigger only seeing the first "publish" option rather than all options that were specified in the command. To fix this, make a copy of the string before passing to SplitIdentifierString(). Here we also adjust a similar case in the pgoutput plugin. There's no known issues caused by SplitIdentifierString() here, so this is being done out of paranoia. Thanks to Henson Choi for putting together an example case showing the ALTER PUBLICATION issue. Author: sunil s <sunilfeb26@gmail.com> Reviewed-by: Henson Choi <assam258@gmail.com> Reviewed-by: zengman <zengman@halodbtech.com> Backpatch-through: 14 Branch ------ REL_14_STABLE Details ------- https://git.postgresql.org/pg/commitdiff/ae45c72960d0db19f60339876a771c5410507f13 Modified Files -------------- src/backend/commands/publicationcmds.c | 7 ++++++- src/backend/replication/pgoutput/pgoutput.c | 6 +++++- 2 files changed, 11 insertions(+), 2 deletions(-) ^ permalink raw reply [nested|flat] 6+ messages in thread
end of thread, other threads:[~2026-01-06 04:31 UTC | newest] Thread overview: 6+ messages (download: mbox mbox.gz follow: Atom feed) -- links below jump to the message on this page -- 2026-01-06 04:29 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION David Rowley <drowley@postgresql.org> 2026-01-06 04:30 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION David Rowley <drowley@postgresql.org> 2026-01-06 04:30 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION David Rowley <drowley@postgresql.org> 2026-01-06 04:30 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION David Rowley <drowley@postgresql.org> 2026-01-06 04:31 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION David Rowley <drowley@postgresql.org> 2026-01-06 04:31 pgsql: Fix issue with EVENT TRIGGERS and ALTER PUBLICATION 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