Skip to content

Commit

Permalink
small trick about pg debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
dingxiong committed Dec 9, 2024
1 parent cda4f93 commit fbe46fb
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions _posts/2024-05-16-postgres-getting-started.md
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,16 @@ Breakpoint 1: where = mysqld`JOIN::estimate_rowcount() + 44 at sql_optimizer.cc:
Process 4071 launched: '/Users/xiongding/code/mysql-server/build/bin/mysqld' (arm64)
```

I haven't make it work under debugger because some signal handler issue. Life
is short. Do not want to spend time making it work. Instead, there is a simple
trick to inspect internal states. It has a pretty print function that can print
out any node.

```
#include "nodes/print.h"
pprint(transform);
```

### Configurations

The main configuration file is `postgresql.conf`. I thought Postgres reads it
Expand Down

0 comments on commit fbe46fb

Please sign in to comment.