On 10/10/2016 12:38 PM, Simplex wrote:
> STEP_1_ON-THE-APP-SERVER - compile the application
>
> gcc -o db_test.o -c -I/usr/include/postgresql db_test.c
> gcc -o db_test db_test.o -lpq
>
> {
> STEP_2_ON-THE-DB-SERVER - stop PostgreSQL
>
> sudo service postgresql stop
>
> STEP_3_ON-THE-APP-SERVER - run the application
>
> valgrind --leak-check=full --show-reachable=yes --leak-resolution=high -v
> ./db_test > ./log.log 2>&1
>
> STEP_4_ON-THE-DB-SERVER - wait [N] seconds (N is a random chosen number
> between 10-3000) and start PostgreSQL
>
> } Repeat several times to get the leak
I was not able to reproduce this. Can you help to analyze this in more
detail, please? Which version of PostgreSQL are you using? Can you load
debug symbols or compile from source, to get a stack trace with symbol
names? How often do you see the error? Do you have a theory of how the
leak occurs?
- Heikki