corey.huinker | 27 Apr 23:15 2015
Picon

BUG #13179: pg_upgrade failure.

The following bug has been logged on the website:

Bug reference:      13179
Logged by:          Corey Huinker
Email address:      corey.huinker <at> gmail.com
PostgreSQL version: 9.3.6
Operating system:   Ubuntu 14.04
Description:        

I am experiencing a pg_upgrade failure 9.3->9.4, that seems to be the same
root cause as BUG #12465: Materialized view dump restoration issue.

I have a SQL immutable function created in the public schema, which returns
a custom enum type that also resides in the public schema. The type is
created correctly, and the function is created correctly.

However, that function is called via a CROSS LATERAL JOIN inside a
materialized view which is in a different  schema. The restoration of that
materialized view fails.

--

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

cees.van.zeeland | 26 Apr 23:46 2015
Picon
Picon

BUG #13168: DROP DATABASE does not clean up all references

The following bug has been logged on the website:

Bug reference:      13168
Logged by:          Cees van Zeeland
Email address:      cees.van.zeeland <at> xs4all.nl
PostgreSQL version: 9.4.1
Operating system:   Windows 7 Home Edition 64 bit
Description:        

-- Follow the next steps to produce an unexpected error
-- The next 16 lines work fine
CREATE DATABASE new
  WITH ENCODING='LATIN1'
       TEMPLATE=template0
       LC_COLLATE='C'
       LC_CTYPE='C'
       CONNECTION LIMIT=-1;

DROP TABLE IF EXISTS category CASCADE; 
CREATE TABLE category
  (
     category_id SERIAL  PRIMARY KEY 
    ,category_name varchar(30) NOT NULL
    ,category_description varchar(200) NOT NULL
  );

-- Now I am going to repeat the same script without DROP TABLE
-- After the next line, I assume that all old references within the database
are gone
DROP DATABASE new;
(Continue reading)

me | 25 Apr 21:53 2015

BUG #13160: Incorrect escaping of quotes in JSON export

The following bug has been logged on the website:

Bug reference:      13160
Logged by:          Andy
Email address:      me <at> andrewray.me
PostgreSQL version: 9.3.5
Operating system:   OSX
Description:        

Postgres escapes quotes incorrectly when creating a JSON export.

    UPDATE models SET column='"hello"' WHERE id=1;

    COPY (SELECT row_to_json(models)
        FROM (SELECT column FROM shaders WHERE id=1) shaders)
        TO '/output.json';

The contents of output.json:

    {"column":"\\"hello\\""}

You can see that the quotes are escaped improperly and it creates invalid
JSON.
It should be:

    {"column":"\"hello\""}

--

-- 
Sent via pgsql-bugs mailing list (pgsql-bugs <at> postgresql.org)
To make changes to your subscription:
(Continue reading)

Michael Paquier | 27 Apr 09:24 2015
Picon

pg_get_constraintdef failing with cache lookup error

Hi all,

pg_get_constraintdef() fails rather easily:
=# select pg_get_constraintdef(1);
ERROR:  cache lookup failed for constraint 1
STATEMENT:  select pg_get_constraintdef(1);
ERROR:  XX000: cache lookup failed for constraint 1
LOCATION:  pg_get_constraintdef_worker, ruleutils.c:1305

Now by looking at pg_get_constraintdef_worker() <at> ruleutils.c it is
commented that this error should never happen:
        if (!HeapTupleIsValid(tup)) /* should not happen */
                elog(ERROR, "cache lookup failed for constraint %u",
constraintId);
But it happens.
Am I missing something? Shouldn't this error be changed into something
more informative?
Regards,
-- 
Michael

--

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

postgresql2 | 24 Apr 18:57 2015
Picon

BUG #13148: Unexpected deferred EXCLUDE constraint violation on derived table

The following bug has been logged on the website:

Bug reference:      13148
Logged by:          Evan Martin
Email address:      postgresql2 <at> realityexists.net
PostgreSQL version: 9.3.6
Operating system:   Windows 7 x64 SP1
Description:        

I have a deferred EXCLUDE constraint on a derived table. Inside a
transaction I insert a new row that conflicts with an existing one (so the
constraint would fail if it was immediate), delete the old row and run an
unrelated UPDATE on the new row, then try to commit. I would expect the
commit to succeed, since there is now no conflict, but it fails with

	ERROR: conflicting key value violates exclusion constraint
"uq_derived_timeslice_dup_time_ex"
	SQL state: 23P01
	Detail: Key (feature_id, valid_time_begin, interpretation,
(COALESCE(sequence_number, (-1))))=(1, 2015-01-01 00:00:00, X, -1) conflicts
with existing key (feature_id, valid_time_begin, interpretation,
(COALESCE(sequence_number, (-1))))=(1, 2015-01-01 00:00:00, X, -1).

If I run the delete statement first it works. If I remove the (seemingly
unrelated) update statement it also works. Reproducible under PostgreSQL
9.3.6 64-bit on Windows 7 and Postgresql 9.2.10 32-bit on Ubuntu using the
script below.

-- **** One-off set-up ****
/*
(Continue reading)

pdrolet | 24 Apr 12:10 2015
Picon

BUG #13143: Cannot stop and restart a streaming server with a replication slot

The following bug has been logged on the website:

Bug reference:      13143
Logged by:          Patrice Drolet
Email address:      pdrolet <at> infodata.ca
PostgreSQL version: 9.4.1
Operating system:   Windows 2008r2
Description:        

I have experienced it many times. The master streams to the slave for days
and no problem (using a replication slot). If I stop the master, it does not
want to restart and I have this error in the log:

2015-04-24 04:47:12 EDT LOG:  le système de bases de données a été arrêté à
2015-04-24 04:44:37 EDT
2015-04-24 04:47:12 EDT PANIC:  n'a pas pu synchroniser sur disque (fsync)
le fichier « pg_replslot/node_win2012sec/state » : Bad file descriptor
2015-04-24 04:47:12 EDT LOG:  processus de lancement (PID 23180) quitte avec
le code de sortie 3
2015-04-24 04:47:12 EDT LOG:  annulation du démarrage à cause d'un échec
dans le processus de lancement

To restart the server, I have to manually delete the folder in pg_replslot.
But then I need to re build the slave. Not very practical for a multi
gigabyte database. 

--

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

grant | 23 Apr 00:09 2015
Picon

BUG #13128: Postgres deadlock on startup failure when max_prepared_transactions is not sufficiently high.

The following bug has been logged on the website:

Bug reference:      13128
Logged by:          Grant McAlister
Email address:      grant <at> amazon.com
PostgreSQL version: 9.3.6
Operating system:   Linux 64bit
Description:        

Steps to reproduce

1.       Set max_prepared_transactions to 2 in postgresql.conf.
2.       start Postgres.
3.       Create two uncommitted prepared transactions: BEGIN; PREPARE
TRANSACTION ‘test1’; BEGIN; PREPARE TRANSACTION ‘test2’;
4.       Set max_prepared_transactions to 1 in postgresql.conf.
5.       Restart Postgres again.

At this point the startup will fail with a fatal but the postmaster process
keeps running.

LOG:  database system was interrupted; last known up at 2015-04-16 17:19:56
PDT
LOG:  database system was not properly shut down; automatic recovery in
progress
LOG:  record with zero length at 0/1826C70
LOG:  redo is not required
LOG:  recovering prepared transaction 1685
LOG:  recovering prepared transaction 1683
FATAL:  maximum number of prepared transactions reached
(Continue reading)

stejsky | 22 Apr 14:38 2015
Picon

BUG #13125: text bug

The following bug has been logged on the website:

Bug reference:      13125
Logged by:          Petr Stejskal
Email address:      stejsky <at> volny.cz
PostgreSQL version: 9.4.1
Operating system:   Vista
Description:        

There is bug in error message "connction" when connecting using odbc
SQLDriverConnect with incomplete parameters:

"connction string lacks some option"

--

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

stejsky | 22 Apr 14:20 2015
Picon

BUG #13124: OLEDB insert/update on rowset

The following bug has been logged on the website:

Bug reference:      13124
Logged by:          Petr Stejskal
Email address:      stejsky <at> volny.cz
PostgreSQL version: 9.4.1
Operating system:   Windows Vista
Description:        

Hello, 
does the Postgresql oledb driver support Insert/Update operation?
I get the error E_NOINTERFACE (0x80004002) on Insert function.

see the code:

  CoInitialize(NULL);
	CDataSource db;
	CSession session;
	CDBPropSet	dbinit(DBPROPSET_DBINIT);

  dbinit.AddProperty(DBPROP_AUTH_INTEGRATED, "SSPI");
	dbinit.AddProperty(DBPROP_AUTH_PERSIST_SENSITIVE_AUTHINFO, false);
  dbinit.AddProperty(DBPROP_AUTH_USERID, "myuser");
  dbinit.AddProperty(DBPROP_AUTH_PASSWORD, "pass");
	dbinit.AddProperty(DBPROP_INIT_CATALOG,  "mydatabase");
	dbinit.AddProperty(DBPROP_INIT_DATASOURCE, "127.0.0.1");
	dbinit.AddProperty(DBPROP_INIT_LCID, (long)1029);
	dbinit.AddProperty(DBPROP_INIT_PROMPT, (short)4);
	hr = db.OpenWithServiceComponents("PostgreSQL.1", &dbinit);
	hr = session.Open(db);
(Continue reading)

xi | 22 Apr 17:48 2015
Picon

BUG #13126: table constraint loses its comment

The following bug has been logged on the website:

Bug reference:      13126
Logged by:          Kirill Simonov
Email address:      xi <at> resolvent.net
PostgreSQL version: 9.4.1
Operating system:   Ubuntu 15.04
Description:        

In some circumstances, the comment on a table constraint disappears.  Here
is an example:

-- Create a table with a primary key constraint.

CREATE TYPE enum1 AS ENUM ('foo', 'bar');
CREATE TYPE enum2 AS ENUM ('foo', 'bar', 'baz');

CREATE TABLE t (x enum1 NOT NULL);
ALTER TABLE t ADD CONSTRAINT t_pk PRIMARY KEY (x);
COMMENT ON CONSTRAINT t_pk ON t IS 'the primary key of table "t"';

-- Find the constraint:
--
--    oid   
-- ---------
--  3400853
-- (1 row)

SELECT c.oid
FROM pg_constraint c
(Continue reading)

Michael Paquier | 22 Apr 02:56 2015
Picon

contrib/start-scripts/linux failing on RHEL 6 with ~9.3 because of missing oom_score_adj

Hi all,

Support for oom_score_adj has been added in kernel 2.6.36, a version
newer than 2.6.32-71 which is embedded in RHEL6, so the startup script
contrib/start-scripts/linux would fail because it does not check for
the presence of oom_score_adj before adding the value of OOM_SCORE_ADJ
to it.

We could argue that this is not directly a problem of PG itself as one
could just copy the startup script from the code tree to create its
own service script and fix it, still I am getting the feeling that we
should show a better logic with something like the patch attached.
Thoughts?
-- 
Michael

--

-- 
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