From: Saxena, Shivam <shsaxena@teamdrg.com>
To: pgsql-bugs@postgresql.org <pgsql-bugs@postgresql.org>
Cc: DB Development DBAs <DBDevelopmentDBAs@teamdrg.com>
Cc: Lee, Ming <milee@teamdrg.com>
Subject: BUG: Session getting disconnected while executing a function to create materialised views in PostgreSQL 9.6
Date: Thu, 11 Aug 2016 09:30:06 +0000
Message-ID: <97218716-480B-4527-B5CD-D08D798A0C7B@dresources.com> (raw)
List-Unsubscribe: <mailto:majordomo@postgresql.org?body=unsub%20pgsql-bugs>
Dear Team,
While creating a 9.6 database environment we have come across a situation where the session is getting disconnected while running a function. Below are the DB details and function details.
DB Version: PostgreSQL 9.6beta3 on x86_64-pc-linux-gnu, compiled by gcc (GCC) 4.4.7 20120313 (Red Hat 4.4.7-17), 64-bit
DB Client: PgAdmin 3 v1.22.1
DB Client Operating System: Mac OS v10.11.3
DB Function definition (sample test function to replicate the issue):-
CREATE OR REPLACE FUNCTION testing_func()
RETURNS void AS $$
BEGIN
DROP MATERIALIZED VIEW IF EXISTS test1;
CREATE MATERIALIZED VIEW test1 AS
(
SELECT 1 as a,2 as b,3 as c,4 as d,5 as e,6 as f
ORDER BY
1
) WITH NO DATA;
END;
$$ LANGUAGE plpgsql;
Replication Scenario:
* Compile the above code. Run select query of the above function (I.e. Select testing_func();)
Result:
* Session gets disconnected forcibly.
Few other observations:
* The same code snippet runs fine in PostreSQL v9.5
* When we remove the clause WITH NO DATA, then the functions runs successfully
Please let me know in case any more details are required from our side.
Regards,
Shivam Saxena
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-bugs@postgresql.org
Cc: shsaxena@teamdrg.com, DBDevelopmentDBAs@teamdrg.com, milee@teamdrg.com
Subject: Re: BUG: Session getting disconnected while executing a function to create materialised views in PostgreSQL 9.6
In-Reply-To: <97218716-480B-4527-B5CD-D08D798A0C7B@dresources.com>
References: <97218716-480B-4527-B5CD-D08D798A0C7B@dresources.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox