pg.ddx.io  pgsql-committers@postgresql.org mailing list archive  
help / color / mirror / Atom feed
pgsql: Allow to log raw parse tree.
3+ messages / 2 participants
[nested] [flat]

* pgsql: Allow to log raw parse tree.
@ 2025-09-05 22:52  Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Tatsuo Ishii @ 2025-09-05 22:52 UTC (permalink / raw)
  To: pgsql-committers@lists.postgresql.org

Allow to log raw parse tree.

This commit allows to log the raw parse tree in the same way we
currently log the parse tree, rewritten tree, and plan tree.

To avoid unnecessary log noise for users not interested in this
detail, a new GUC option, "debug_print_raw_parse", has been added.

When starting the PostgreSQL process with "-d N", and N is 3 or higher,
debug_print_raw_parse is enabled automatically, alongside
debug_print_parse.

Author: Chao Li <lic@highgo.com>
Reviewed-by: Tender Wang <tndrwang@gmail.com>
Reviewed-by: Tatsuo Ishii <ishii@postgresql.org>
Reviewed-by: John Naylor <johncnaylorls@gmail.com>
Discussion: https://postgr.es/m/CAEoWx2mcO0Gpo4vd8kPMAFWeJLSp0MeUUnaLdE1x0tSVd-VzUw%40mail.gmail.com

Branch
------
master

Details
-------
https://git.postgresql.org/pg/commitdiff/06473f5a344df8c9594ead90a609b86f6724cff8

Modified Files
--------------
doc/src/sgml/config.sgml                      | 12 +++++++++---
doc/src/sgml/rules.sgml                       |  1 +
src/backend/tcop/postgres.c                   |  7 +++++++
src/backend/utils/misc/guc_parameters.dat     |  6 ++++++
src/backend/utils/misc/guc_tables.c           |  1 +
src/backend/utils/misc/postgresql.conf.sample |  1 +
src/include/utils/guc.h                       |  1 +
7 files changed, 26 insertions(+), 3 deletions(-)



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Allow to log raw parse tree.
@ 2025-09-06 00:52  Michael Paquier <michael@paquier.xyz>
  parent: Tatsuo Ishii <ishii@postgresql.org>
  0 siblings, 1 reply; 3+ messages in thread

From: Michael Paquier @ 2025-09-06 00:52 UTC (permalink / raw)
  To: Tatsuo Ishii <ishii@postgresql.org>; +Cc: pgsql-committers@lists.postgresql.org

On Fri, Sep 05, 2025 at 10:52:55PM +0000, Tatsuo Ishii wrote:
> Allow to log raw parse tree.
> 
> This commit allows to log the raw parse tree in the same way we
> currently log the parse tree, rewritten tree, and plan tree.
> 
> To avoid unnecessary log noise for users not interested in this
> detail, a new GUC option, "debug_print_raw_parse", has been added.
> 
> When starting the PostgreSQL process with "-d N", and N is 3 or higher,
> debug_print_raw_parse is enabled automatically, alongside
> debug_print_parse.

prion is complaining here:
https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2025-09-05%2023%3A03%3A05

I did not look into the details, but this usually points to a
use-after-free problem.
--
Michael

Attachments:

  signature.asc (application/pgp-signature, 832B) download

^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: pgsql: Allow to log raw parse tree.
@ 2025-09-06 02:45  Tatsuo Ishii <ishii@postgresql.org>
  parent: Michael Paquier <michael@paquier.xyz>
  0 siblings, 0 replies; 3+ messages in thread

From: Tatsuo Ishii @ 2025-09-06 02:45 UTC (permalink / raw)
  To: michael@paquier.xyz; +Cc: pgsql-committers@lists.postgresql.org

> prion is complaining here:
> https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=prion&dt=2025-09-05%2023%3A03%3A05
> 
> I did not look into the details, but this usually points to a
> use-after-free problem.

Regression diff shows:

inline patch 1: /home/ec2-user/bf/root/HEAD/pgsql.build/src/test/regress/results/create_table.out (+2/-0 lines) download inline-1.patchdiff -U3 /home/ec2-user/bf/root/HEAD/pgsql/src/test/regress/expected/create_table.out /home/ec2-user/bf/root/HEAD/pgsql.build/src/test/regress/results/create_table.out --- /home/ec2-user/bf/root/HEAD/pgsql/src/test/regress/expected/create_table.out 2025-09-05 23:03:07.629079514 +0000 +++ /home/ec2-user/bf/root/HEAD/pgsql.build/src/test/regress/results/create_table.out 2025-09-05 23:06:31.360832166 +0000 @@ -83,13 +83,16 @@ -- create an extra wide table to test for issues related to that -- (temporarily hide query, to avoid the long CREATE TABLE stmt) \\set ECHO none +ERROR: could not extend file "base/16384/1249" with FileFallocate(): No space left on device +HINT: Check free disk space.
Looks like out of disk space? Best regards, -- Tatsuo Ishii SRA OSS K.K. English: http://www.sraoss.co.jp/index_en/ Japanese:http://www.sraoss.co.jp ^ permalink raw reply [nested|flat] 3+ messages in thread


end of thread, other threads:[~2025-09-06 02:45 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2025-09-05 22:52 pgsql: Allow to log raw parse tree. Tatsuo Ishii <ishii@postgresql.org>
2025-09-06 00:52 ` Michael Paquier <michael@paquier.xyz>
2025-09-06 02:45   ` Tatsuo Ishii <ishii@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