pg.ddx.io pgsql-committers@postgresql.org mailing list archive
help / color / mirror / Atom feedpg-migrator - pg_migrator: Get rid of hard-wired assumptions about
2+ messages / 2 participants
[nested] [flat]
* pg-migrator - pg_migrator: Get rid of hard-wired assumptions about
@ 2009-06-30 13:38 User Tgl <tgl@pgfoundry.org>
0 siblings, 0 replies; 2+ messages in thread
From: tgl@pgfoundry.org @ 2009-06-30 13:38 UTC (permalink / raw)
To: pgsql-committers
Log Message:
-----------
Get rid of hard-wired assumptions about shared library suffix.
Use DLSUFFIX from the backend build, instead.
Modified Files:
--------------
pg_migrator/src:
Makefile (r1.3 -> r1.4)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/Makefile?r1=1.3&r2=1.4)
file.c (r1.24 -> r1.25)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/file.c?r1=1.24&r2=1.25)
pg_migrator.c (r1.49 -> r1.50)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/pg_migrator.c?r1=1.49&r2...)
pg_migrator.h (r1.58 -> r1.59)
(http://cvs.pgfoundry.org/cgi-bin/cvsweb.cgi/pg-migrator/pg_migrator/src/pg_migrator.h?r1=1.58&r2...)
^ permalink raw reply [nested|flat] 2+ messages in thread
* pgsql: Avoid stack overflow in ShowTransactionStateRec()
@ 2024-03-08 11:19 Alexander Korotkov <akorotkov@postgresql.org>
0 siblings, 0 replies; 2+ messages in thread
From: Alexander Korotkov @ 2024-03-08 11:19 UTC (permalink / raw)
To: pgsql-committers@lists.postgresql.org
Avoid stack overflow in ShowTransactionStateRec()
The function recurses, but didn't perform stack-depth checks. It's
just a debugging aid, so instead of the usual check_stack_depth()
call, stop the printing if we'd risk stack overflow.
Here's an example of how to test this:
(n=1000000; printf "BEGIN;"; for ((i=1;i<=$n;i++)); do printf "SAVEPOINT s$i;"; done; printf "SET log_min_messages = 'DEBUG5'; SAVEPOINT sp;") | psql >/dev/null
In the passing, swap building the list of child XIDs and recursing to
parent. That saves memory while recursing, reducing the risk of out of
memory errors with lots of subtransactions. The saving is not very
significant in practice, but this order seems more logical anyway.
Report by Egor Chindyaskin and Alexander Lakhin.
Discussion: https://www.postgresql.org/message-id/1672760457.940462079%40f306.i.mail.ru
Author: Heikki Linnakangas
Reviewed-by: Robert Haas, Andres Freund, Alexander Korotkov
Branch
------
master
Details
-------
https://git.postgresql.org/pg/commitdiff/6f38c43eb135f5d6b873924180562d8334d6e31d
Modified Files
--------------
src/backend/access/transam/xact.c | 21 +++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2024-03-08 11:19 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2009-06-30 13:38 pg-migrator - pg_migrator: Get rid of hard-wired assumptions about User Tgl <tgl@pgfoundry.org>
2024-03-08 11:19 pgsql: Avoid stack overflow in ShowTransactionStateRec() Alexander Korotkov <akorotkov@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