Peter Geoghegan | 8 Dec 10:21 2013

PQclientEncoding() returns -1, resulting in possible assertion failure in psql

It's possible to get psql to abort() in an assertion failure from
legitimate input. If the server is shutdown, and PQclientEncoding()
returns -1, that value can be passed to a site that expects a valid
encoding.

If the call to PQclientEncoding() from processSQLNamePattern() (plus
probably from other places) gets an encoding of -1, (called when we
"\df+ somefunc" after the server is gone - you may have to do it
twice), that can be passed down to PQmblen(), which will in turn pass
that value to pg_encoding_mblen(), which doesn't expect it. Here is a
backtrace from GDB:

#0  0x00007f0d4a3ba037 in __GI_raise (sig=sig <at> entry=6) at
../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x00007f0d4a3bd698 in __GI_abort () at abort.c:90
#2  0x00007f0d4a3b2e03 in __assert_fail_base (fmt=0x7f0d4a50a158
"%s%s%s:%u: %s%sAssertion `%s' failed.\n%n",
assertion=assertion <at> entry=0x7f0d4ac17de8 "((encoding) >= 0 &&
(encoding) < _PG_LAST_ENCODING_)", file=file <at> entry=0x7f0d4ac17de0
"wchar.c", line=line <at> entry=1781,
function=function <at> entry=0x7f0d4ac17e80 <__PRETTY_FUNCTION__.5143>
"pg_encoding_mblen") at assert.c:92
#3  0x00007f0d4a3b2eb2 in __GI___assert_fail (assertion=0x7f0d4ac17de8
"((encoding) >= 0 && (encoding) < _PG_LAST_ENCODING_)",
file=0x7f0d4ac17de0 "wchar.c", line=1781, function=0x7f0d4ac17e80
<__PRETTY_FUNCTION__.5143> "pg_encoding_mblen") at assert.c:101
#4  0x00007f0d4ac13b77 in pg_encoding_mblen (encoding=-1,
mbstr=0xd05d00 "pg_stat_statements") at wchar.c:1781
#5  0x00007f0d4ac01f48 in PQmblen (s=0xd05d00 "pg_stat_statements",
encoding=-1) at fe-misc.c:1143
(Continue reading)

Peter Geoghegan | 8 Dec 02:44 2013

stats_temp_directory SIGHUP documentation bug

Commit be8d6c5c3 made stats_temp_directory SIGHUP, but this isn't
fully reflected in the docs. "18.9. Run-time Statistics" still says:
"This parameter can only be set in the postgresql.conf file or on the
server command line". This should be fixed.

-- 
Peter Geoghegan

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

cbfgterfdy | 7 Dec 01:03 2013
Picon

BUG #8662: psql -H and ts_headline

The following bug has been logged on the website:

Bug reference:      8662
Logged by:          JW
Email address:      cbfgterfdy <at> zacglen.net
PostgreSQL version: 9.2.4
Operating system:   Linux
Description:        

While "psql -H" is quite useful there is flaw when a query includes
ts_headline(). The highlighting html gets escaped along with any other html
special characters.

One can pipe the psql output through sed and undo the special character
conversion. But it would perhaps be nicer if there was some way of allowing
embedded html in results if so wanted.

The html output doesn't have any escaping mechanism what-so-ever.

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Jeff Frost | 6 Dec 18:36 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs


On Dec 6, 2013, at 8:44 AM, John R Pierce <pierce <at> hogranch.com> wrote:

> On 12/6/2013 6:53 AM, Magnus Hagander wrote:
>> What I'm asking for is the 9.2 postgresql packages to depend on a version of openssl that's present in 6.4.
If the user is on 6.5, it will still match, and not be a problem.
> 
> I don't get it, on my centos 6.4 box, yum pulled in the new openssl automatically.    I wonder if the OP's system
wasn't properly configured with RHN.
> 

Well, the issue seems to be specific to RHEL, but if you look way back in the thread, I actually spun up a
RHEL6.4 instance on EC2 and it happily installed the new version of openssl when I did "yum install
postgresql92 postgresql92-server postgresql92-contrib", so I'm not entirely sure why it's broken for
some folks on RHEL6.4, but not others.
Jeff Frost | 6 Dec 18:30 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs


On Dec 6, 2013, at 8:44 AM, John R Pierce <pierce <at> hogranch.com> wrote:

> On 12/6/2013 6:53 AM, Magnus Hagander wrote:
>> What I'm asking for is the 9.2 postgresql packages to depend on a version of openssl that's present in 6.4.
If the user is on 6.5, it will still match, and not be a problem.
> 
> I don't get it, on my centos 6.4 box, yum pulled in the new openssl automatically.    I wonder if the OP's system
wasn't properly configured with RHN.
> 

Well, the issue seems to be specific to RHEL, but if you look way back in the thread, I actually spun up a
RHEL6.4 instance on EC2 and it happily installed the new version of openssl when I did "yum install
postgresql92 postgresql92-server postgresql92-contrib", so I'm not entirely sure why it's broken for
some folks on RHEL6.4, but not others.
jheinz | 6 Dec 14:43 2013
Picon

BUG #8661: Update on all rows in table fails

The following bug has been logged on the website:

Bug reference:      8661
Logged by:          J. Heinz
Email address:      jheinz <at> zeitwerk.de
PostgreSQL version: 9.1.3
Operating system:   MacOSX or Windows
Description:        

When we want to update all rows in one table, the sql executes, but didn't
update all rows:

sql: update address set email = 'test <at> test.com';

table:

CREATE TABLE address
(
  id bigint NOT NULL,
  address1 character varying(255),
  address2 character varying(255),
  address3 character varying(255),
  cdate timestamp without time zone DEFAULT now(),
  city character varying(255),
  creator character varying(80),
  email character varying(255),
  fax character varying(255),
  internet character varying(255),
  mdate timestamp without time zone,
  modifier character varying(80),
(Continue reading)

peter.svensson | 6 Dec 08:19 2013
Picon

BUG #8660: RPM installation of 9.2.6 have dependency problem

The following bug has been logged on the website:

Bug reference:      8660
Logged by:          Peter Svensson
Email address:      peter.svensson <at> smhi.se
PostgreSQL version: 9.2.6
Operating system:   RedHat Enterprice Linux
Description:        

We are using RPM:s from http://yum.pgrpms.org/9.2/redhat/rhel-6.4-x86_64/

When trying to upgrade from 9.2.5 to 9.2.6 we got this dependency problems:

Setting up Update Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql92.i686 0:9.2.5-1PGDG.rhel6 will be updated
---> Package postgresql92.x86_64 0:9.2.5-1PGDG.rhel6 will be updated
---> Package postgresql92.i686 0:9.2.6-1PGDG.rhel6 will be an update
---> Package postgresql92.x86_64 0:9.2.6-1PGDG.rhel6 will be an update
--> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package:
postgresql92-9.2.6-1PGDG.rhel6.x86_64
---> Package postgresql92-contrib.x86_64 0:9.2.5-1PGDG.rhel6 will be
updated
---> Package postgresql92-contrib.x86_64 0:9.2.6-1PGDG.rhel6 will be an
update
--> Processing Dependency: libssl.so.10(libssl.so.10)(64bit) for package:
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
--> Processing Dependency: libcrypto.so.10(libcrypto.so.10)(64bit) for
package: postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
(Continue reading)

Jeff Frost | 5 Dec 23:37 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs

It's in the yum info down below:

rhui-REGION-rhel-server-releases

which is defined as:

[rhui-REGION-rhel-server-releases]
name=Red Hat Enterprise Linux Server 6 (RPMs)
mirrorlist=https://rhui2-cds01.REGION.aws.ce.redhat.com/pulp/mirror/content/dist/rhel/rhui/server/6/$releasever/$basearch/os
enabled=1
gpgcheck=1
gpgkey=file:///etc/pki/rpm-gpg/RPM-GPG-KEY-redhat-release
sslverify=1
sslclientkey=/etc/pki/rhui/content-rhel6.key
sslclientcert=/etc/pki/rhui/product/content-rhel6.crt
sslcacert=/etc/pki/rhui/cdn.redhat.com-chain.crt




On 12/05/13 14:34, Vitaly Tskhovrebov wrote:
From what repo does this 101e come from? 

On Thursday, December 5, 2013, Jeff Frost wrote:
On 12/05/13 12:44, Jeff Frost wrote:
> On 12/05/13 12:42, Vitaly Tskhovrebov wrote:
>> Ok, Redhat is in question. I understand the similarities with Centos, but
>> still.
>>
>> I repeated process using very fresh install of redhat just specially for
>> this and was able to reproduce the issue.
> I also just tested it successfully on Scientific Linux 6. Unfortunately, I
> don't have access to a RHEL6 server.
>
>
> Is it possible that the RHN security/update repositories are disabled?
>
>
>
>

Huh, we just spun up a RHEL6.4 server on EC2 and everything installed just
fine.  Also, it seems to have openssl-1.0.1e already:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)

yum localinstall --nogpg pgdg-redhat92-9.2-7.noarch.rpm

yum install postgresql92-server postgresql92-contrib
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql92-contrib.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql92 = 9.2.6 for package:
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package:
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
---> Package postgresql92-server.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Running transaction check
---> Package postgresql92.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
---> Package postgresql92-libs.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package
Arch
Version
Repository                              Size
=============================================================================================================================================================================================
Installing:
 postgresql92-contrib
x86_64
9.2.6-1PGDG.rhel6
pgdg92                                 436 k
 postgresql92-server
x86_64
9.2.6-1PGDG.rhel6
pgdg92                                 3.8 M
Installing for dependencies:
 postgresql92
x86_64
9.2.6-1PGDG.rhel6
pgdg92                                 971 k
 postgresql92-libs
x86_64
9.2.6-1PGDG.rhel6
pgdg92                                 187 k

Transaction Summary
=============================================================================================================================================================================================
Install       4 Package(s)

Total download size: 5.4 M
Installed size: 23 M
Is this ok [y/N]: y
Downloading Packages:
(1/4):
postgresql92-9.2.6-1PGDG.rhel6.x86_64.rpm
| 971 kB     00:00
(2/4):
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64.rpm
| 436 kB     00:00
(3/4):
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64.rpm
| 187 kB     00:00
(4/4):
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64.rpm
| 3.8 MB     00:00
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total
3.4 MB/s | 5.4 MB     00:01
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing :
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64
1/4
  Installing :
postgresql92-9.2.6-1PGDG.rhel6.x86_64
2/4
  Installing :
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64
3/4
  Installing :
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
4/4
  Verifying  :
postgresql92-9.2.6-1PGDG.rhel6.x86_64
1/4
  Verifying  :
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64
2/4
  Verifying  :
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64
3/4
  Verifying  :
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
4/4

Installed:
  postgresql92-contrib.x86_64
0:9.2.6-1PGDG.rhel6
postgresql92-server.x86_64
0:9.2.6-1PGDG.rhel6

Dependency Installed:
  postgresql92.x86_64
0:9.2.6-1PGDG.rhel6
postgresql92-libs.x86_64
0:9.2.6-1PGDG.rhel6


rpm -qa |grep openssl
openssl-1.0.1e-16.el6_5.x86_64
openssl-devel-1.0.1e-16.el6_5.x86_64

yum info openssl
Loaded plugins: amazon-id, rhui-lb, security
Installed Packages
Name        : openssl
Arch        : x86_64
Version     : 1.0.1e
Release     : 16.el6_5
Size        : 4.0 M
Repo        : installed
From repo   : rhui-REGION-rhel-server-releases
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications
between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.



-- Jeff Frost <jeff <at> pgexperts.com> CTO, PostgreSQL Experts, Inc. Phone: 1-888-PG-EXPRT x506 FAX: 415-762-5122 http://www.pgexperts.com/
Jeff Frost | 5 Dec 23:09 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs

On 12/05/13 12:44, Jeff Frost wrote:
> On 12/05/13 12:42, Vitaly Tskhovrebov wrote:
>> Ok, Redhat is in question. I understand the similarities with Centos, but
>> still.
>>
>> I repeated process using very fresh install of redhat just specially for
>> this and was able to reproduce the issue.
> I also just tested it successfully on Scientific Linux 6. Unfortunately, I
> don't have access to a RHEL6 server.
>
>
> Is it possible that the RHN security/update repositories are disabled?
>
>
>
>

Huh, we just spun up a RHEL6.4 server on EC2 and everything installed just
fine.  Also, it seems to have openssl-1.0.1e already:

$ cat /etc/redhat-release
Red Hat Enterprise Linux Server release 6.4 (Santiago)

yum localinstall --nogpg pgdg-redhat92-9.2-7.noarch.rpm

yum install postgresql92-server postgresql92-contrib
Loaded plugins: amazon-id, rhui-lb, security
Setting up Install Process
Resolving Dependencies
--> Running transaction check
---> Package postgresql92-contrib.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Processing Dependency: postgresql92 = 9.2.6 for package:
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
--> Processing Dependency: libpq.so.5()(64bit) for package:
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64
---> Package postgresql92-server.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Running transaction check
---> Package postgresql92.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
---> Package postgresql92-libs.x86_64 0:9.2.6-1PGDG.rhel6 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

=============================================================================================================================================================================================
 Package                                             
Arch                                  
Version                                           
Repository                              Size
=============================================================================================================================================================================================
Installing:
 postgresql92-contrib                                
x86_64                                
9.2.6-1PGDG.rhel6                                 
pgdg92                                 436 k
 postgresql92-server                                 
x86_64                                
9.2.6-1PGDG.rhel6                                 
pgdg92                                 3.8 M
Installing for dependencies:
 postgresql92                                        
x86_64                                
9.2.6-1PGDG.rhel6                                 
pgdg92                                 971 k
 postgresql92-libs                                   
x86_64                                
9.2.6-1PGDG.rhel6                                 
pgdg92                                 187 k

Transaction Summary
=============================================================================================================================================================================================
Install       4 Package(s)

Total download size: 5.4 M
Installed size: 23 M
Is this ok [y/N]: y
Downloading Packages:
(1/4):
postgresql92-9.2.6-1PGDG.rhel6.x86_64.rpm                                                                                                                     
| 971 kB     00:00    
(2/4):
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64.rpm                                                                                                             
| 436 kB     00:00    
(3/4):
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64.rpm                                                                                                                
| 187 kB     00:00    
(4/4):
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64.rpm                                                                                                              
| 3.8 MB     00:00    
---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
Total                                                                                                                                                       
3.4 MB/s | 5.4 MB     00:01    
Running rpm_check_debug
Running Transaction Test
Transaction Test Succeeded
Running Transaction
  Installing :
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64                                                                                                                               
1/4
  Installing :
postgresql92-9.2.6-1PGDG.rhel6.x86_64                                                                                                                                    
2/4
  Installing :
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64                                                                                                                             
3/4
  Installing :
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64                                                                                                                            
4/4
  Verifying  :
postgresql92-9.2.6-1PGDG.rhel6.x86_64                                                                                                                                    
1/4
  Verifying  :
postgresql92-libs-9.2.6-1PGDG.rhel6.x86_64                                                                                                                               
2/4
  Verifying  :
postgresql92-server-9.2.6-1PGDG.rhel6.x86_64                                                                                                                             
3/4
  Verifying  :
postgresql92-contrib-9.2.6-1PGDG.rhel6.x86_64                                                                                                                            
4/4

Installed:
  postgresql92-contrib.x86_64
0:9.2.6-1PGDG.rhel6                                              
postgresql92-server.x86_64
0:9.2.6-1PGDG.rhel6                                             

Dependency Installed:
  postgresql92.x86_64
0:9.2.6-1PGDG.rhel6                                                   
postgresql92-libs.x86_64
0:9.2.6-1PGDG.rhel6                                                  

rpm -qa |grep openssl
openssl-1.0.1e-16.el6_5.x86_64
openssl-devel-1.0.1e-16.el6_5.x86_64

yum info openssl
Loaded plugins: amazon-id, rhui-lb, security
Installed Packages
Name        : openssl
Arch        : x86_64
Version     : 1.0.1e
Release     : 16.el6_5
Size        : 4.0 M
Repo        : installed
From repo   : rhui-REGION-rhel-server-releases
Summary     : A general purpose cryptography library with TLS implementation
URL         : http://www.openssl.org/
License     : OpenSSL
Description : The OpenSSL toolkit provides support for secure communications
between
            : machines. OpenSSL includes a certificate management tool and shared
            : libraries which provide various cryptographic algorithms and
            : protocols.

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Jeff Frost | 5 Dec 21:52 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs

On 12/05/13 12:44, Vitaly Tskhovrebov wrote:
> By the way, openssl 1.0.1e is not available for redhat 6 yet.

Oh, interesting.  Well, I just took a look at the spec file and we don't
specifically require 1.0.1e, it probably just gets baked in due to the build
process.

Can you try rebuilding from the source rpm on a RHEL6 host:

http://yum.postgresql.org/srpms/9.2/redhat/rhel-6-x86_64/repoview/postgresql92.html

-- 
Jeff Frost <jeff <at> pgexperts.com>
CTO, PostgreSQL Experts, Inc.
Phone: 1-888-PG-EXPRT x506
FAX: 415-762-5122
http://www.pgexperts.com/ 

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs

Jeff Frost | 5 Dec 21:44 2013

Re: BUG #8659: Broken dependencies on RHEL6 for 9.2.6 RPMs

On 12/05/13 12:42, Vitaly Tskhovrebov wrote:
> Ok, Redhat is in question. I understand the similarities with Centos, but
> still.
>
> I repeated process using very fresh install of redhat just specially for
> this and was able to reproduce the issue.

I also just tested it successfully on Scientific Linux 6. Unfortunately, I
don't have access to a RHEL6 server.

Is it possible that the RHN security/update repositories are disabled?

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-bugs


Gmane