Sv: Reg: Query for DB growth size

2018-11-28 Thread Andreas Joseph Krogh
På torsdag 29. november 2018 kl. 07:41:24, skrev R.R. PRAVEEN RAJA < rrpraveenr...@live.com >: Hi All,   Can i get the query or steps for how to check the Database growth in postgres. Thanks in advance.   select pg_size_pretty(pg_database_size(current_database()));

Reg: Query for DB growth size

2018-11-28 Thread R.R. PRAVEEN RAJA
Hi All, Can i get the query or steps for how to check the Database growth in postgres. Thanks in advance. Regards, Praveen

Re: Triggers when importing data

2018-11-28 Thread Laurenz Albe
Sathish Kumar wrote: > I am trying to export and import sql file of a database. I would like to know > whether it will execute all the triggers when importing the sql dump which > is for Insert or Update or Delete. > > Export:pg_dump -h test -U db_admin --format=plain --no-owner --no-acl > produc

Triggers when importing data

2018-11-28 Thread Sathish Kumar
Hi, I am trying to export and import sql file of a database. I would like to know whether it will execute all the triggers when importing the sql dump which is for Insert or Update or Delete. Export:pg_dump -h test -U db_admin --format=plain --no-owner --no-acl production | sed -E 's/(DROP|CR

Re: The age() of a column?

2018-11-28 Thread Adrian Klaver
On 11/28/18 7:32 PM, Ron wrote: What does it mean, and where is it documented?  The only place in the https://www.postgresql.org/docs/10/routine-vacuuming.html "The age column measures the number of transactions from the cutoff XID to the current transaction's XID." docs I see reference to

Re: tsvector 256 limit and matching text with common words

2018-11-28 Thread Where is Where
> Hello, I am wondering if it is possible to increase or remove the > '256 positions per lexeme' limit? > > We need to search words with common words like 'the' 'a' in full text. Or > is there workaround for it? Thanks! > ps: this has not been posted on other list.

Re: The age() of a column?

2018-11-28 Thread Tom Lane
Ron writes: > What does it mean, and where is it documented? age(xid) returns the difference between the given xid and the current xid. It's not terribly well documented, but psql's \df gives some info: regression=# \df+ age Schema | Name | Result data type | Argument dat

The age() of a column?

2018-11-28 Thread Ron
What does it mean, and where is it documented?  The only place in the docs I see reference to age() is https://www.postgresql.org/docs/9.6/functions-datetime.html and this doesn't seem to fit that use case. Thanks TAPb=# select COALESCE(ta.schemaname, 'pg_toast') || '.' || cl.relname,   

Re: surprising query optimisation

2018-11-28 Thread Stephen Frost
Greetings, * Chris Withers (ch...@withers.org) wrote: > We have an app that deals with a lot of queries, and we've been slowly > seeing performance issues emerge. We take a lot of free form queries from > users and stumbled upon a very surprising optimisation. > > So, we have a 'state' column whi

Re: surprising query optimisation

2018-11-28 Thread Gavin Flower
On 29/11/2018 11:26, Chris Withers wrote: Hi All, We have an app that deals with a lot of queries, and we've been slowly seeing performance issues emerge. We take a lot of free form queries from users and stumbled upon a very surprising optimisation. So, we have a 'state' column which is a 3

Re: surprising query optimisation

2018-11-28 Thread Adrian Klaver
On 11/28/18 2:26 PM, Chris Withers wrote: Hi All, We have an app that deals with a lot of queries, and we've been slowly seeing performance issues emerge. We take a lot of free form queries from users and stumbled upon a very surprising optimisation. So, we have a 'state' column which is a 3

surprising query optimisation

2018-11-28 Thread Chris Withers
Hi All, We have an app that deals with a lot of queries, and we've been slowly seeing performance issues emerge. We take a lot of free form queries from users and stumbled upon a very surprising optimisation. So, we have a 'state' column which is a 3 character string column with an index on

Re: Primary Key index with Include

2018-11-28 Thread Adrian Klaver
On 11/28/18 11:55 AM, PegoraroF10 wrote: As you know version 11 gives us the possibility to include aditional columns to an index. So, if I recreate all my primary key indexes to contain a description column, like ... CREATE UNIQUE INDEX CONCURRENTLY Products_pk ON Products(Product_ID) INCLUDE(N

Primary Key index with Include

2018-11-28 Thread PegoraroF10
As you know version 11 gives us the possibility to include aditional columns to an index. So, if I recreate all my primary key indexes to contain a description column, like ... CREATE UNIQUE INDEX CONCURRENTLY Products_pk ON Products(Product_ID) INCLUDE(Name); ALTER TABLE Products ADD CONSTRAINT P

Force Reconnect of streaming replication

2018-11-28 Thread Hannes Erven
Hi, consider a PG10 master center, streaming via internet to another site. The receiving site has a fast primary uplink and much slower backup link. When the primary link goes down, all traffic is routed through the backup connection. The streaming replication's connection drops and is automat

Re: 2018-11-28 10:40:01,906 9672 CRITICAL ? odoo.service.server: Failed to initialize database `abc`

2018-11-28 Thread Andreas Kretschmer
Am 28.11.2018 um 16:16 schrieb pavan95: The objects in the database "abc" are moved to custom schema named "xyz". Then we're facing this error "2018-11-28 10:40:01,906 9672 CRITICAL ? odoo.service.server: Failed to initialize database `abc`" . In detail it is throwing the error "relation ir_%%

Re: 2018-11-28 10:40:01,906 9672 CRITICAL ? odoo.service.server: Failed to initialize database `abc`

2018-11-28 Thread Adrian Klaver
On 11/28/18 7:16 AM, pavan95 wrote: Hello Community, Anyone has configured odoo with postgres? Please guide me with the below error. We have been experiencing an error while configuring the odoo(odoo 11.0) application to the postgres(postgres 10.5) database. We have done the configuration in tw

2018-11-28 10:40:01,906 9672 CRITICAL ? odoo.service.server: Failed to initialize database `abc`

2018-11-28 Thread pavan95
Hello Community, Anyone has configured odoo with postgres? Please guide me with the below error. We have been experiencing an error while configuring the odoo(odoo 11.0) application to the postgres(postgres 10.5) database. We have done the configuration in two approaches. First Approach: All t

Re: Regarding Tds_fdw

2018-11-28 Thread Durgamahesh Manne
On Wed, Nov 28, 2018 at 6:31 PM Durgamahesh Manne wrote: > > > On Wed, Nov 28, 2018 at 4:22 PM Pavel Stehule > wrote: > >> Hi >> >> st 28. 11. 2018 v 11:28 odesílatel Durgamahesh Manne < >> maheshpostgr...@gmail.com> napsal: >> >>> Hi >>> >>> Respected community members >>> >>> I have configured

Re: Regarding Tds_fdw

2018-11-28 Thread Durgamahesh Manne
On Wed, Nov 28, 2018 at 4:22 PM Pavel Stehule wrote: > Hi > > st 28. 11. 2018 v 11:28 odesílatel Durgamahesh Manne < > maheshpostgr...@gmail.com> napsal: > >> Hi >> >> Respected community members >> >> I have configured tds_fdw on postgres server.. I have created multiple >> foreign tables relate

Re: Regarding Tds_fdw

2018-11-28 Thread Pavel Stehule
Hi st 28. 11. 2018 v 11:28 odesílatel Durgamahesh Manne < maheshpostgr...@gmail.com> napsal: > Hi > > Respected community members > > I have configured tds_fdw on postgres server.. I have created multiple > foreign tables related to sql server as of now i could run select queries > with out any i

Re: Regarding Tds_fdw

2018-11-28 Thread Thomas Kellerer
Durgamahesh Manne schrieb am 28.11.2018 um 11:28: > I have configured tds_fdw on postgres server.. I have created > multiple foreign tables related to sql server as of now i could run > select queries with out any issues > >   i got  this error ERROR: cannot insert into foreign table "pgsql"  when

Regarding Tds_fdw

2018-11-28 Thread Durgamahesh Manne
Hi Respected community members I have configured tds_fdw on postgres server.. I have created multiple foreign tables related to sql server as of now i could run select queries with out any issues i got this error ERROR: cannot insert into foreign table "pgsql" when i tried to insert the data

Re: Creating a function

2018-11-28 Thread Pavel Křehula
Hi, something like this? create or replace FUNCTION "IncentiveBin"(in Gwac double precision, in MtgRaate double precision, in BinSize double precision) RETURNS double precision LANGUAGE sql VOLATILE PARALLEL

Creating a function

2018-11-28 Thread Glenn Schultz
Hi, I am trying to create a function to bin based on user value and I am stuck. I followed the postgres create function tutoriall but I am missing something. Any help would be appreciated as I think I am just going further off course at this point Glenn CREATE FUNCTION "IncentiveBin"(in Gwac d