pg_upgrade segfaults when given an invalid PGSERVICE value - Mailing list pgsql-hackers

From Steve Singer
Subject pg_upgrade segfaults when given an invalid PGSERVICE value
Date
Msg-id 51473BE9.9020600@ca.afilias.info
Whole thread Raw
Responses Re: pg_upgrade segfaults when given an invalid PGSERVICE value  (Bruce Momjian <bruce@momjian.us>)
List pgsql-hackers
If you try running pg_upgrade with the PGSERVICE environment variable
set to some invalid/non-existent service pg_upgrade segfaults

Program received signal SIGSEGV, Segmentation fault.
0x000000000040bdd1 in check_pghost_envvar () at server.c:304
304        for (option = start; option->keyword != NULL; option++)
(gdb) p start
$5 = (PQconninfoOption *) 0x0


PQconndefaults can return NULL if it has issues.

The attached patch prints a minimally useful error message. I don't a
good way of getting a more useful error message out of PQconndefaults()

I checked this against master but it was reported to me as a issue in 9.2

Steve



Attachment

pgsql-hackers by date:

Previous
From: Pavel Stehule
Date:
Subject: Re: Improving avg performance for numeric
Next
From: Tom Lane
Date:
Subject: Re: Materialized view assertion failure in HEAD