Re: postgresql v11.1 Segmentation fault: signal 11: by running SELECT... JIT Issue?

2019-01-28 Thread Andrew Gierth
> "pabloa98" == pabloa98 writes: pabloa98> the table baseline_denull has 1765 columns, Uhh... #define MaxHeapAttributeNumber 1600/* 8 * 200 */ Did you modify that? (The back of my envelope says that on 64bit, the largest usable t_hoff would be 248, of which 23 is fixed overhead lea

Re: postgresql v11.1 Segmentation fault: signal 11: by running SELECT... JIT Issue?

2019-01-28 Thread Tom Lane
pabloa98 writes: > I just migrated our databases from PostgreSQL version 9.6 to version 11.1. > We got a segmentation fault while running this query: > SELECT f_2110 as x FROM baseline_denull > ORDER BY eid ASC > limit 500 > OFFSET 131000; > the table baseline_denull has 1765 columns, mainly num

postgresql v11.1 Segmentation fault: signal 11: by running SELECT... JIT Issue?

2019-01-28 Thread pabloa98
Hello I just migrated our databases from PostgreSQL version 9.6 to version 11.1. We got a segmentation fault while running this query: SELECT f_2110 as x FROM baseline_denull ORDER BY eid ASC limit 500 OFFSET 131000; It works in version 11,1 if offset + limit < 131000 approx (it is some number a

Re: Geographical multi-master replication

2019-01-28 Thread Ruben Rubio Rey
> When I said “supported version” of BDR, I mostly meant a newer version of Postgres. I know you have to decide on getting support BDR but regardless of what route you take, part of your plan needs to be > 9.4 :). I agree with you. We will be upgrading to the latest postgres version. On Tue, Jan

Re: Geographical multi-master replication

2019-01-28 Thread Jeremy Finzel
On Mon, Jan 28, 2019 at 3:32 PM Ruben Rubio Rey wrote: > Hi Jeremy, > > > Why don't you consider upgrading from postgres 9.4 and with it to a > supported version of BDR? There is nothing better you can do to keep your > infrastructure up to date, performant, secure, and actually meet your > mult

Re: Geographical multi-master replication

2019-01-28 Thread Ruben Rubio Rey
Hi Jeremy, > Why don't you consider upgrading from postgres 9.4 and with it to a supported version of BDR? There is nothing better you can do to keep your infrastructure up to date, performant, secure, and actually meet your multi-master needs than to upgrade to a newer version of postgres which

Re: number and type of locks for an alter sequence

2019-01-28 Thread Adrian Klaver
On 1/28/19 6:07 AM, Thomas Poty wrote: Hello , In PG10, when I am altering a sequence, i see 2 locks in pg_locks matching my sequence: a RowExclusiveLock and a ShareRowExclusiveLock My question is Why 2 locks? Someone on irc said it was for catalog but i am no sure because pg_locks.relationi

Re: Displaying Comments in Views

2019-01-28 Thread Susan Hurst
Thx for the great info. I appreciate your pointing me in the right direction. Sue --- Susan E Hurst Principal Consultant Brookhurst Data LLC Email: susan.hu...@brookhurstdata.com Mobile: 314-486-3261 On 2019-01-28 09:27, Tom Lane wrote: Susan Hurs

Re: Displaying Comments in Views

2019-01-28 Thread Adrian Klaver
On 1/28/19 7:08 AM, Susan Hurst wrote: What is the trick for displaying column comments in views? The query below works as expected when the table_schema includes tables, however it shows nothing when the table_schema contains only views.  I tried putting the query into an inline statement as

Re: Displaying Comments in Views

2019-01-28 Thread Andrew Gierth
> "Susan" == Susan Hurst writes: Susan> What is the trick for displaying column comments in views? The Susan> query below works as expected when the table_schema includes Susan> tables, however it shows nothing when the table_schema contains Susan> only views. I tried putting the query in

Re: Displaying Comments in Views

2019-01-28 Thread Tom Lane
Susan Hurst writes: > What is the trick for displaying column comments in views? > The query below works as expected when the table_schema includes tables, > however it shows nothing when the table_schema contains only views. No surprise, since you're using pg_statio_all_tables as the source of

Re: Regarding query execution for long time

2019-01-28 Thread Durgamahesh Manne
On Mon, Jan 28, 2019 at 8:41 PM Adrian Klaver wrote: > On 1/28/19 5:04 AM, Ron wrote: > > On 1/28/19 6:20 AM, Durgamahesh Manne wrote: > >> Hi > >> > >> below query is being executed for long time > >> > >> Select > >> distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, > >> ltrim(rtrim(TFA.cli

Re: Regarding query execution for long time

2019-01-28 Thread Adrian Klaver
On 1/28/19 4:20 AM, Durgamahesh Manne wrote: Hi below query is being executed for long time Select distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber, concat(TFA.first_name, ' ', TFA.last_name) as vchAccountName, concat('AP:TIAA', TF

Re: Regarding query execution for long time

2019-01-28 Thread Adrian Klaver
On 1/28/19 5:04 AM, Ron wrote: On 1/28/19 6:20 AM, Durgamahesh Manne wrote: Hi below query is being executed for long time Select distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber, concat(TFA.first_name, ' ', TFA.last_name) as vchA

Displaying Comments in Views

2019-01-28 Thread Susan Hurst
What is the trick for displaying column comments in views? The query below works as expected when the table_schema includes tables, however it shows nothing when the table_schema contains only views. I tried putting the query into an inline statement as a column selection in a wrapper query..

Re: multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
On Mon, Jan 28, 2019 at 03:17:47PM +0100, Laurenz Albe wrote: > > Now, I would have thought that the "IF NOT EXISTS" part of > > the CREATE EXTENSION would have allowed the subsequent CREATE > > INDEX to succeed. > > > > I am wrong ? > > No, you are right. > > The "pg_trgm" extension does *not*

Re: Regarding query execution for long time

2019-01-28 Thread Ron
On 1/28/19 8:10 AM, Durgamahesh Manne wrote: On Mon, Jan 28, 2019 at 6:34 PM Ron > wrote: On 1/28/19 6:20 AM, Durgamahesh Manne wrote: > Hi > > below query is being executed for long time > > Select > distinct ltrim(rtrim(ssnumber)),

Re: multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Laurenz Albe
Karsten Hilbert wrote: > the Orthanc DICOM server tries to create a trigram index using this code: > > db->Execute( > "CREATE EXTENSION IF NOT EXISTS pg_trgm; " > "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers > USING gin(value gin_trgm_ops);"); >

Re: error when creating logical replication slot

2019-01-28 Thread Tom Lane
Josef Machytka writes: > I am implementing logical replication and today during some final tests > before implementing it to the production I have got this error when logical > replication slot on master was created. > NOTICE: 2019-01-28 09:08:22.081007+00: logical replication slot x does >

Re: Regarding query execution for long time

2019-01-28 Thread Durgamahesh Manne
On Mon, Jan 28, 2019 at 6:34 PM Ron wrote: > On 1/28/19 6:20 AM, Durgamahesh Manne wrote: > > Hi > > > > below query is being executed for long time > > > > Select > > distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, > > ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber, > > concat(TF

number and type of locks for an alter sequence

2019-01-28 Thread Thomas Poty
Hello , In PG10, when I am altering a sequence, i see 2 locks in pg_locks matching my sequence: a RowExclusiveLock and a ShareRowExclusiveLock My question is Why 2 locks? Someone on irc said it was for catalog but i am no sure because pg_locks.relationid is the same for the 2 locks. At the same

Re: Regarding query execution for long time

2019-01-28 Thread Ron
On 1/28/19 6:20 AM, Durgamahesh Manne wrote: Hi below query is being executed for long time Select distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber, concat(TFA.first_name, ' ', TFA.last_name) as vchAccountName, concat('AP:TIAA', TF

Regarding query execution for long time

2019-01-28 Thread Durgamahesh Manne
Hi below query is being executed for long time Select distinct ltrim(rtrim(ssnumber)), CL.iInsightClientId, ltrim(rtrim(TFA.client_account_key)) as vchAccountNumber, concat(TFA.first_name, ' ', TFA.last_name) as vchAccountName, concat('AP:TIAA', TFA.routing_number) as vchRepLabel, null as vchOpen

multi-SQL command string aborts despite IF EXISTS

2019-01-28 Thread Karsten Hilbert
Hello all, the Orthanc DICOM server tries to create a trigram index using this code: db->Execute( "CREATE EXTENSION IF NOT EXISTS pg_trgm; " "CREATE INDEX DicomIdentifiersIndexValues2 ON DicomIdentifiers USING gin(value gin_trgm_ops);"); which results in this s

Re: logical replication problem

2019-01-28 Thread Achilleas Mantzios
On 28/1/19 12:12 μ.μ., Thomas Schweikle wrote: Hi! Setup: - db-server_A on port 5432 - db-server_B on port 5433 on db-server_A: postgres=# \dRp Liste der Publikationen Name | Eigentümer | Alle Tabellen | Inserts | Updates | Deletes --++---+--

Re: logical replication problem

2019-01-28 Thread Pavan Teja
And that's the reason for the error. In the subscriber no need of any data. Jus structure sync is enough. Try truncating the database and start the replication from fresh ull get rid of the errors Regards, Pavan On Mon 28 Jan, 2019, 3:50 PM Thomas Schweikle On Mon, Jan 28, 2019 at 11:15 AM Pavan

type int2vector

2019-01-28 Thread 吉成恒
select * from pg_partition where 2 =all(pg_partition.paratts); -- 吉成恒 光大证券股份有限公司 信息技术总部(数据中心) 地址:静安区新闸路1508号7楼 电话:021-22169287 手机:18717772189 邮箱:j...@ebscn.com

Re: data definition within plpgsql

2019-01-28 Thread Laurenz Albe
haman...@t-online.de wrote: > I tried this code (to be inserted within a larger psql script) > > do $_$ > declare > next int; > begin > select max(id) + 1 into next from items; > execute 'create temp sequence tmp_ids start $1' using next; > end > $_$ language plpgsql; > >

Re: data definition within plpgsql

2019-01-28 Thread Pavel Stehule
Hi po 28. 1. 2019 v 11:18 odesílatel napsal: > > > Hi, > > I tried this code (to be inserted within a larger psql script) > > do $_$ > declare > next int; > begin > select max(id) + 1 into next from items; > execute 'create temp sequence tmp_ids start $1' using next; > t

Re: logical replication problem

2019-01-28 Thread Thomas Schweikle
On Mon, Jan 28, 2019 at 11:15 AM Pavan Teja wrote: > > Does the db_server_B has data in it?? Yes, it has -- about 51GiByte ... Changed frequently. > Regards, > Pavan > > On Mon 28 Jan, 2019, 3:42 PM Thomas Schweikle > >> Hi! >> >> Setup: >> >> - db-server_A on port 5432 >> - db-server_B on port

data definition within plpgsql

2019-01-28 Thread hamann . w
Hi, I tried this code (to be inserted within a larger psql script) do $_$ declare next int; begin select max(id) + 1 into next from items; execute 'create temp sequence tmp_ids start $1' using next; end $_$ language plpgsql; but that reports a syntax error near $1. Wha

logical replication problem

2019-01-28 Thread Thomas Schweikle
Hi! Setup: - db-server_A on port 5432 - db-server_B on port 5433 on db-server_A: postgres=# \dRp Liste der Publikationen Name | Eigentümer | Alle Tabellen | Inserts | Updates | Deletes --++---+-+-+- mig1 | postgres | t

error when creating logical replication slot

2019-01-28 Thread Josef Machytka
Hi all, I am implementing logical replication and today during some final tests before implementing it to the production I have got this error when logical replication slot on master was created. NOTICE: 2019-01-28 09:08:22.081007+00: logical replication slot x does not exist - creating... ER

Re: Does creating readOnly connections, when possible, free up resources in Postgres?

2019-01-28 Thread Laurenz Albe
David Kremer wrote: > I have an API server and I'm trying to be conscientious managing Postgres's > resources carefully. On the client side, I have a Hikari Pool. > > Usually when I need a connection, I simply create a default read/write > connection, > even if I don't plan to make any updates or