Re: Require assistance in Postgres + Hibernate : Error: java.math.BigInteger cannot be cast to java.math.BigDecimal

2018-02-13 Thread Francisco Olarte
Vinodh: On Tue, Feb 13, 2018 at 9:58 AM, Vinodh NV wrote: > Require assistance on the below: > Code snippet: > Map ic; > //Populate values for ic > long count = ((BigDecimal)ic.get(“EB”)).longValue(); > > > Getting the below error: >

Multiple postmasters running from same directory

2018-02-13 Thread Vikas Sharma
Hi, We are running Postgresql 9.4 with streaming replication and repmgr. Operating system is RHEL6.8 On the master I can see multiple postmaster processes from the same data directory. ps -ef |grep -i postgres|grep postm postgres 81440 1 0 Jan31 ?00:11:37

Re: Multiple postmasters running from same directory

2018-02-13 Thread Laurenz Albe
Vikas Sharma wrote: > We are running Postgresql 9.4 with streaming replication and repmgr. > Operating system is RHEL6.8 > > On the master I can see multiple postmaster processes from the same data > directory. > > ps -ef |grep -i postgres|grep postm > postgres 81440 1 0 Jan31 ?

Re: Require assistance in Postgres + Hibernate : Error: java.math.BigInteger cannot be cast to java.math.BigDecimal

2018-02-13 Thread Francisco Olarte
On Tue, Feb 13, 2018 at 12:39 PM, rob stone wrote: >> long count = ((BigDecimal)ic.get(“EB”)).longValue(); .. > The method is documented as:- > public static BigDecimal valueOf(long val) His problem seems to be the opposit, he does not have the long value and wants it.

Require assistance in Postgres + Hibernate : Error: java.math.BigInteger cannot be cast to java.math.BigDecimal

2018-02-13 Thread Vinodh NV
Hi, Require assistance on the below: Code snippet: Map ic; //Populate values for ic long count = ((BigDecimal)ic.get(“EB”)).longValue(); Getting the below error: java.math.BigInteger cannot be cast to java.math.BigDecimal ®java.lang.ClassCastException:

Prepared statements (PREPARE and JDBC) are a lot slower than "normal" ones.

2018-02-13 Thread Robert Zenz
We are seeing a quite heavy slow down when using prepared statements in 10.1. I haven't done some thorough testing, to be honest, but what we are having is a select from a view (complexity of it should not matter in my opinion), something like this: prepare TEST (text, int) select * from

Re: Trying to the behavior of a parallel query with with a change in the transaction isolation mode

2018-02-13 Thread Luis Carril
Thanks for the answer it worked, the third analyze in the sequence below show multiple workers planned and none launched. PREPARE st AS SELECT avg(a) FROM parallel_big; EXPLAIN ANALYZE EXECUTE st; BEGIN; SET TRANSACTION ISOLATION LEVEL READ COMMITTED, READ ONLY; EXPLAIN ANALYZE EXECUTE st;

Re: oracle_fdw Question

2018-02-13 Thread Laurenz Albe
chiru r wrote: > I am trying to install and configure the oracle_fdw on PostgreSQL DB servers. > What we are trying is, inorder to install (make, make install) oracle_fdw on > all DB servers,we want to compile on one server and want build a package/tar > file to copy the library files and

RE: Barman 2.3 errors

2018-02-13 Thread GALLIANO Nicolas
Hi 1/ thanks for your answer 2/ it’ right … the barman support list is better … sorry 3/ i’ve verified the pg replication slot : postgres@postgres# SELECT slot_name, active, restart_lsn FROM pg_replication_slots WHERE slot_type = 'physical' AND slot_name = 'barman'; slot_name | active |

Re: Prepared statements (PREPARE and JDBC) are a lot slower than "normal" ones.

2018-02-13 Thread Laurenz Albe
Robert Zenz wrote: > We are seeing a quite heavy slow down when using prepared statements in 10.1. > > I haven't done some thorough testing, to be honest, but what we are having is > a > select from a view (complexity of it should not matter in my opinion), > something > like this: > >

Re: session_replication_role meaning?

2018-02-13 Thread Luca Ferrari
On Wed, Jan 31, 2018 at 5:19 AM, Peter Eisentraut wrote: > The documentation was recently updated in the master branch, so maybe > you will find this explanation a bit more detailed: >

Re: Multiple postmasters running from same directory

2018-02-13 Thread Tom Lane
Laurenz Albe writes: > Vikas Sharma wrote: >> On the master I can see multiple postmaster processes from the same data >> directory. >> ps -ef |grep -i postgres|grep postm >> postgres 81440 1 0 Jan31 ?00:11:37 >> /usr/pgsql-9.4/bin/postmaster -D

Re: Require assistance in Postgres + Hibernate : Error: java.math.BigInteger cannot be cast to java.math.BigDecimal

2018-02-13 Thread Francisco Olarte
Vinodh: You are BOTTOM QUOTING a message which has nothing to thank me from, I was just trying to clarify a misunderstanding of your original question. On Tue, Feb 13, 2018 at 4:14 PM, Vinodh NV wrote: > Thanks for the update Francisco. I had one more query: > In Oracle

Re: Require assistance in Postgres + Hibernate : Error: java.math.BigInteger cannot be cast to java.math.BigDecimal

2018-02-13 Thread Vinodh NV
Thanks for the update Francisco. I had one more query: In Oracle the syntax for calling a stored procedure is Session sess = (Session) entityManager.getDelegate(); sess.createSQLQuery("{ call reset() }").executeUpdate(); Can you please let me know if the below equivalent for postgres is

cursors and function question

2018-02-13 Thread armand pirvu
Hi Is there any elegant way not a two steps way I can output the cursor value at each step? testtbl table has this content col1|col2| col3 ++-- E1 | CAT1 |0 E1 | CAT2 |0 E1 | CAT3 |0 E4

Re: Multiple postmasters running from same directory

2018-02-13 Thread Tom Lane
Francisco Olarte writes: > On Tue, Feb 13, 2018 at 4:50 PM, Tom Lane wrote: >> Putting two and two together, you have some monitoring program that is >> hitting the postmaster with a constant stream of TCP connection requests >> none of which get

Re: cursors and function question

2018-02-13 Thread David G. Johnston
On Tuesday, February 13, 2018, armand pirvu wrote: > > CREATE OR REPLACE FUNCTION foofunc() >RETURNS text AS $$ > > select foofunc(); > foofunc > --- > ("E1","CAT1 ",0) > > But I am looking to get > >

Re: cursors and function question

2018-02-13 Thread Adrian Klaver
On 02/13/2018 11:17 AM, armand pirvu wrote: On Feb 13, 2018, at 12:54 PM, Adrian Klaver > wrote: On 02/13/2018 10:22 AM, armand pirvu wrote: Hi Is there any elegant way not a two steps way I can output the cursor value at each

Re: How do I get rid of database test-aria

2018-02-13 Thread Adrian Klaver
On 02/13/2018 12:38 PM, Sherman Willden wrote: development platform: HP Compaq 6710b postgresql 9.6 Operating System: Ubuntu 17.10 It probably doesn't matter since there is nothing in the database. I don't remember  how I created the database. It appears that postgresql does not like a dash

Re: Windows 10 Pro issue

2018-02-13 Thread Adrian Klaver
On 02/13/2018 12:07 PM, Dale Seaburg wrote: Server:  Windows 10 Pro system Postgresql:  8.4.5 installed several months ago and working correctly, until recently Should have mentioned earlier, version 8.4 went EOL about three and half years ago:

Re: cursors and function question

2018-02-13 Thread David G. Johnston
On Tue, Feb 13, 2018 at 12:03 PM, armand pirvu wrote: > > ERROR: RETURN cannot have a parameter in function returning set > LINE 10: return var2; > HINT: Use RETURN NEXT or RETURN QUERY. > > > and it just sits there > > Any hints ? > >

Re: pglogical in postgres 9.6

2018-02-13 Thread greigwise
No need! I figured it out. Had to put this "synchronize_data := false" on the create_subscription call. Weird that there seem to be redundant parameters for this; one on the replication set add and one on the create subscription. Maybe I'm not quite understanding the usage on those or

Re: Multiple postmasters running from same directory

2018-02-13 Thread Tom Lane
Vikas Sharma writes: > So is it normal for postgres to fork out new postmaster processes from the > same data directory? I haven't seen this earlier. They're not postmasters, they're child processes, as you can easily tell from the PID/PPID columns of your ps output. But a

Re: pglogical in postgres 9.6

2018-02-13 Thread Adrian Klaver
On 02/12/2018 06:09 PM, greigwise wrote: hireology_tmp=# \dx List of installed extensions Name | Version | Schema | Description

Windows 10 Pro issue

2018-02-13 Thread Dale Seaburg
Server:  Windows 10 Pro system Postgresql:  8.4.5 installed several months ago and working correctly, until recently On Feb 9, 2018 about 7 PM pg_log file recorded: 2018-02-09 15:04:23 CST LOG:  unexpected EOF on client connection 2018-02-09 19:12:41 CST LOG:  received fast shutdown request

Re: Connection loosing at some places - caused by firewall

2018-02-13 Thread George Neuner
On Tue, 14 Nov 2017 12:09:31 +0100, Durumdara wrote: >*I disabled my firewall at home - the [keepalive] problem vanished!!!* What firewall are you using? Windows own firewall doesn't interfere with keepalive packets. Most commercial SOHO firewalls won't either. George

Re: Multiple postmasters running from same directory

2018-02-13 Thread Vikas Sharma
Thanks Tom, So is it normal for postgres to fork out new postmaster processes from the same data directory? I haven't seen this earlier. I will check from where those connection requests are coming in, Best Regards Vikas On Feb 13, 2018 15:50, "Tom Lane" wrote: > Laurenz

Re: cursors and function question

2018-02-13 Thread Adrian Klaver
On 02/13/2018 10:22 AM, armand pirvu wrote: Hi Is there any elegant way not a two steps way I can output the cursor value at each step? testtbl table has this content col1|col2| col3 ++-- E1 | CAT1 |0 E1 | CAT2

Re: cursors and function question

2018-02-13 Thread armand pirvu
> On Feb 13, 2018, at 12:54 PM, Adrian Klaver wrote: > > On 02/13/2018 10:22 AM, armand pirvu wrote: >> Hi >> Is there any elegant way not a two steps way I can output the cursor value >> at each step? >> testtbl table has this content >> col1|col2|

How do I get rid of database test-aria

2018-02-13 Thread Sherman Willden
development platform: HP Compaq 6710b postgresql 9.6 Operating System: Ubuntu 17.10 It probably doesn't matter since there is nothing in the database. I don't remember how I created the database. It appears that postgresql does not like a dash in the database name. I have not tried to create a

Re: How do I get rid of database test-aria

2018-02-13 Thread Charles Clavadetscher
Hi > On 13.02.2018, at 21:38, Sherman Willden wrote: > > development platform: HP Compaq 6710b > postgresql 9.6 > Operating System: Ubuntu 17.10 > > It probably doesn't matter since there is nothing in the database. I don't > remember how I created the database. It

Re: cursors and function question

2018-02-13 Thread armand pirvu
> On Feb 13, 2018, at 1:22 PM, Adrian Klaver wrote: > > On 02/13/2018 11:17 AM, armand pirvu wrote: >>> On Feb 13, 2018, at 12:54 PM, Adrian Klaver >> >>

Re: Windows 10 Pro issue

2018-02-13 Thread Cyclix
I've seen this before with Win10. 1.- Go to Windows ControlPanel-UserAccounts-ManageAnotherAccount, select postgres and re-enter the Postgres User password, save and close. 2.- Start Windows Services (if running as a service) right click on Postgres Service-Properties-LogOn then enter the same

Re: cursors and function question

2018-02-13 Thread Adrian Klaver
On 02/13/2018 01:25 PM, armand pirvu wrote: On Feb 13, 2018, at 1:22 PM, Adrian Klaver > wrote: Not a trigger , but the idea is we will do some batch processing from said table let’s name it testtbl 1 - we get the records

PostgreSQL Download

2018-02-13 Thread Thiagarajan Lakshminarayanan
Hello, The official postgresql download site ( https://www.postgresql.org/download/linux/redhat/) has a link to download the tar archives (https://www.enterprisedb.com/download-postgresql-binaries) or interactive installer from EnterpriseDB. Is the above download from EnterpriseDB is open source

Re: oracle_fdw Question

2018-02-13 Thread chiru r
Thank you. On Tue, Feb 13, 2018 at 3:31 AM, Laurenz Albe wrote: > chiru r wrote: > > I am trying to install and configure the oracle_fdw on PostgreSQL DB > servers. > > What we are trying is, inorder to install (make, make install) > oracle_fdw on all DB servers,we

Re: cursors and function question

2018-02-13 Thread David G. Johnston
On Tue, Feb 13, 2018 at 3:31 PM, Adrian Klaver wrote: > 2) By global table do you mean a temporary table? If so not sure that is > going to work as I am pretty sure it will disappear after the function is > run. ​Temporary tables can survive until either session or

Re: cursors and function question

2018-02-13 Thread armand pirvu
> On Feb 13, 2018, at 4:37 PM, David G. Johnston > wrote: > > On Tue, Feb 13, 2018 at 3:31 PM, Adrian Klaver > wrote: > 2) By global table do you mean a temporary table? If so not sure that is > going

Re: I do not get the point of the information_schema

2018-02-13 Thread Peter J. Holzer
On 2018-02-12 23:01:41 +0100, Thiemo Kellner wrote: > I try to implement SCD2 on trigger level and try to generated needed code on > the fly. Therefore I need to read data about the objects in the database. So > far so good. I know of the information_schema and the pg_catalog. The > documentation

Re: How do I get rid of database test-aria

2018-02-13 Thread Adrian Klaver
On 02/13/2018 03:08 PM, Sherman Willden wrote: Yes the double quotes worked. I tried single quotes but since that didn't work I just assumed that double quotes would not work either. The below explains why:

Re: I do not get the point of the information_schema

2018-02-13 Thread Peter J. Holzer
On 2018-02-13 16:06:43 -0700, David G. Johnston wrote: > On Tue, Feb 13, 2018 at 3:57 PM, Peter J. Holzer wrote: > > (That said, it looks like both PostgreSQL and MariaDB include additional > columns beyond those mandated by the standard - you can't rely on those, >

Re: I do not get the point of the information_schema

2018-02-13 Thread David G. Johnston
On Tue, Feb 13, 2018 at 4:17 PM, Peter J. Holzer wrote: > > It is possible that all the columns that PostgreSQL has are required by > the standard and that MariaDB is non-conforming by omitting them, but at > least some of the names look quite PostgreSQL-specific to me. So my >

Re: I do not get the point of the information_schema

2018-02-13 Thread Tom Lane
"David G. Johnston" writes: > Unless our docs are completely misleading I'd say that PostgreSQL is being > conforming while MariaDB is treating information_schema as their version of > pg_catalog (or at least our system views over top of pg_catalog). Our project

Re: I do not get the point of the information_schema

2018-02-13 Thread David G. Johnston
On Tue, Feb 13, 2018 at 3:57 PM, Peter J. Holzer wrote: > (That said, it looks like both PostgreSQL and MariaDB include additional > columns beyond those mandated by the standard - you can't rely on those, > of course. And some databases like Oracle don't even have an

Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-13 Thread DrakoRod
Hi folks!! I have a problem with a serial data type and partitioned table, I used rules to insert in child tables. But the problem is that the some does'nt insert and the sequence value jump sometimes 3 in 3 or 10 in 10. The example is the next: I don't understand why sequence jumps in this

Re: How do I get rid of database test-aria

2018-02-13 Thread Sherman Willden
Yes the double quotes worked. I tried single quotes but since that didn't work I just assumed that double quotes would not work either. Thanks all; Sherman On Tue, Feb 13, 2018 at 1:41 PM, Adrian Klaver wrote: > On 02/13/2018 12:38 PM, Sherman Willden wrote: > >>

Re: Table Partitioning: Sequence jump issue 10 in 10 with serial datatype

2018-02-13 Thread DrakoRod
Sorry, your right! The example is: CREATE TABLE customers ( id serial PRIMARY KEY, name TEXT, other_data TEXT ); CREATE TABLE customers_part1( CHECK (id<1) )INHERITS (customers); CREATE TABLE customers_part2( CHECK (id>=1 AND id<2) )INHERITS (customers); CREATE OR

unsubsribe

2018-02-13 Thread Welkin
unsubsribe

Re: pglogical in postgres 9.6

2018-02-13 Thread Jeremy Finzel
On Tue, Feb 13, 2018 at 1:46 PM greigwise wrote: > No need! I figured it out. > > Had to put this "synchronize_data := false" on the create_subscription > call. > Weird that there seem to be redundant parameters for this; one on the > replication set add and one on the