From: | "Erik Rijkers" <er(at)xs4all(dot)nl> |
---|---|
To: | "David Fetter" <david(at)fetter(dot)org> |
Cc: | "Andrew Dunstan" <andrew(at)dunslane(dot)net>, "Heikki Linnakangas" <hlinnakangas(at)vmware(dot)com>, "Albe Laurenz" <laurenz(dot)albe(at)wien(dot)gv(dot)at>, "PG Hackers" <pgsql-hackers(at)postgresql(dot)org> |
Subject: | Re: POLA violation with \c service= |
Date: | 2015-01-10 08:30:57 |
Message-ID: | f0be9e2ba7f771e7177be228a643a126.squirrel@webmail.xs4all.nl |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-hackers |
On Fri, January 9, 2015 20:15, David Fetter wrote:
> [psql_fix_uri_service_003.patch]
Applies on master; the feature (switching services) works well but a \c without any parameters produces a segfault:
(centos 6.6, 4.9.2, 64-bit)
$ echo -en "$PGSERVICEFILE\n$PGSERVICE\n$PGPORT\n"
/home/aardvark/.pg_service
service_pola
6968
$ psql
Timing is on.
psql (9.5devel_service_pola_20150109_2340_ac7009abd228)
Type "help" for help.
testdb=# \c service=HEAD
You are now connected to database "testdb" as user "aardvark" via socket in "/tmp" at port "6545".
testdb=# \c service=service_pola
You are now connected to database "testdb" as user "aardvark" via socket in "/tmp" at port "6968".
testdb=# \c
Segmentation fault (core dumped)
or, under gdb:
(gdb) run
Starting program: /home/aardvark/pg_stuff/pg_installations/pgsql.service_pola/bin/psql
[Thread debugging using libthread_db enabled]
Using host libthread_db library "/lib64/libthread_db.so.1".
Timing is on.
psql (9.5devel_service_pola_20150109_2340_ac7009abd228)
Type "help" for help.
testdb=# \c
Program received signal SIGSEGV, Segmentation fault.
0x000000000040b1f5 in uri_prefix_length (connstr=0x0) at common.c:1785
1785 if (strncmp(connstr, uri_designator,
(gdb) bt
#0 0x000000000040b1f5 in uri_prefix_length (connstr=0x0) at common.c:1785
#1 recognized_connection_string (connstr=connstr(at)entry=0x0) at common.c:1805
#2 0x0000000000406592 in do_connect (port=0x676960 "6968", host=0x676940 "/tmp", user=0x676900 "aardvark", dbname=0x0) at
command.c:1643
#3 exec_command (query_buf=0x678150, scan_state=0x677fc0, cmd=0x68f730 "c") at command.c:247
#4 HandleSlashCmds (scan_state=scan_state(at)entry=0x677fc0, query_buf=0x678150) at command.c:112
#5 0x0000000000411283 in MainLoop (source=0x32d4b8e6c0 <_IO_2_1_stdin_>) at mainloop.c:335
#6 0x0000000000413b4e in main (argc=<optimized out>, argv=0x7fffffffd9f8) at startup.c:340
(gdb)
I hope that helps to pinpoint the problem.
thanks,
Erik Rijkers
From | Date | Subject | |
---|---|---|---|
Next Message | Dean Rasheed | 2015-01-10 11:12:07 | Re: INSERT ... ON CONFLICT UPDATE and RLS |
Previous Message | Michael Paquier | 2015-01-10 08:10:21 | Re: Compression of full-page-writes |