Has there been any discussion of custom dictionaries being defined in the database?

2019-10-16 Thread Morris de Oryx
I've been experimenting with the FTS features in Postgres over the past few days. Mind blow. We're deployed on RDS, which does not give you any file system to access. I'd love to be able to create a custom thesaurus dictionary for our situation, which seems like it is impossible in a setup like ou

Re: PostgreSQL memory usage

2019-10-16 Thread Luca Ferrari
On Wed, Oct 16, 2019 at 6:30 PM Alexander Pyhalov wrote: > I see that at some point several postgresql backends start consuming about 16 > GB RAM. If we account for shared_buffers, it meens 4 GB RAM for private > backend memory. How can we achieve such numbers? I don't see any long-running > (

Can functions containing a CTE be PARALLEL SAFE?

2019-10-16 Thread Erwin Brandstetter
[The manual for Postgres 12 says][1]: > The following operations are always parallel restricted. > - Scans of common table expressions (CTEs). > - Scans of temporary tables. > - ... Further down on the same [manual page:][2] > [...] Similarly, functions must be marked PARALLEL RESTRICTED if

Re: CVE-2018-1058

2019-10-16 Thread Adrian Klaver
On 10/16/19 1:05 PM, Lizeth Solis Aramayo wrote: What commands did you use to dump the 9.6.15 version and restore to the 9.6.5 version? Pg_dump -p 5433 -U postgres -Fc -d dbkerp -n param > param.dump And Pg_restore -p 5432 -U postgres -d dbkerp param.dump Server with pg_dump is Linux red hat 7

Re: Changing PK on replicated database

2019-10-16 Thread Adrian Klaver
On 10/16/19 1:47 PM, PegoraroF10 wrote: I have replication using Publication/Subscription and configured with REPLICA IDENTITY DEFAULT, so it uses PK values to do the replication. Then, I´ve imported data in a new schema and that has several tables with a record with its PK = 0. Replication works

Re: CVE-2018-1058

2019-10-16 Thread Adrian Klaver
On 10/16/19 1:05 PM, Lizeth Solis Aramayo wrote: What commands did you use to dump the 9.6.15 version and restore to the 9.6.5 version? Pg_dump -p 5433 -U postgres -Fc -d dbkerp -n param > param.dump And Pg_restore -p 5432 -U postgres -d dbkerp param.dump Server with pg_dump is Linux red hat 7

Re: CVE-2018-1058

2019-10-16 Thread Adrian Klaver
On 10/16/19 12:55 PM, Ron wrote: On 10/16/19 2:40 PM, Adrian Klaver wrote: On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version,  I got an error, and  I found this page to install a patch What commands

Re: CVE-2018-1058

2019-10-16 Thread Adrian Klaver
On 10/16/19 12:51 PM, Rob Sargent wrote: On 10/16/19 1:40 PM, Adrian Klaver wrote: On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version,  I got an error, and  I found this page to install a patch What

RE: CVE-2018-1058

2019-10-16 Thread Lizeth Solis Aramayo
What commands did you use to dump the 9.6.15 version and restore to the 9.6.5 version? Pg_dump -p 5433 -U postgres -Fc -d dbkerp -n param > param.dump And Pg_restore -p 5432 -U postgres -d dbkerp param.dump Server with pg_dump is Linux red hat 7.6 Server with pg_restore is linux red hat 6.5 I

Re: CVE-2018-1058

2019-10-16 Thread Neil
> On Oct 16, 2019, at 2:55 PM, Ron wrote: > > On 10/16/19 2:40 PM, Adrian Klaver wrote: >> On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: >>> Good afternoon, >>> >>> I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 >>> version, I got an error, and I found this page to

Changing PK on replicated database

2019-10-16 Thread PegoraroF10
I have replication using Publication/Subscription and configured with REPLICA IDENTITY DEFAULT, so it uses PK values to do the replication. Then, I´ve imported data in a new schema and that has several tables with a record with its PK = 0. Replication works but my application doesn´t because it nee

Re: CVE-2018-1058

2019-10-16 Thread Ron
On 10/16/19 2:40 PM, Adrian Klaver wrote: On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version,  I got an error, and  I found this page to install a patch What commands did you use to dump the 9.6.15 ver

Re: CVE-2018-1058

2019-10-16 Thread Rob Sargent
On 10/16/19 1:40 PM, Adrian Klaver wrote: On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version,  I got an error, and  I found this page to install a patch What commands did you use to dump the 9.6.15 v

Re: CVE-2018-1058

2019-10-16 Thread Adrian Klaver
On 10/14/19 3:27 PM, Lizeth Solis Aramayo wrote: Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version,  I got an error, and  I found this page to install a patch What commands did you use to dump the 9.6.15 version and restore to the 9.6.5 version? W

CVE-2018-1058

2019-10-16 Thread Lizeth Solis Aramayo
Good afternoon, I am working with postgresql 9.6.15 and I need to restore in a 9.6.5 version, I got an error, and I found this page to install a patch https://www.postgresql.org/about/news/1834/ CVE-2018-1058 But I don't k now how to download the patch, please may you help me? Thank you a

Text search lexer's handling of hyphens and negatives

2019-10-16 Thread Raymond Lu
We've been happily using pgsql to store user-generated documents for a while now. We also wanted to be able to search the documents so we tossed the document contents into a tsvector and did a pretty straightforward contents @@ phraseto_tsquery('simple', 'the query'). Our users have a lot of thing

RE: Postgres 10.7 Systemd Startup Issue

2019-10-16 Thread Lu, Dan
Thank you so much for your help! -Original Message- From: Tom Lane [mailto:t...@sss.pgh.pa.us] Sent: Monday, October 14, 2019 2:19 PM To: Lu, Dan Cc: Christopher Browne ; Francisco Olarte ; pgsql-gene...@postgresql.org Subject: Re: Postgres 10.7 Systemd Startup Issue "Lu, Dan" writes

RE: Postgres 10.7 Systemd Startup Issue

2019-10-16 Thread Lu, Dan
Greeting, I have a follow-up question regarding PostgreSQL configure option. Example: ./configure --prefix=/hostname/pg/PostgreSQL-11.5 --with-systemd --with-openssl Above example I configure PG with 2 options: 1. with-systemd 2. with-openssl Is there a catalog view that I can query to see what

Re: Postgres 9.6 active-passive HA cluster

2019-10-16 Thread Michael Lewis
"pg_rewind is a tool for synchronizing a PostgreSQL cluster with another copy of the same cluster, after the clusters' timelines have diverged. A typical scenario is to bring an old master server back online after failover as a standby that follows the new master." -https://www.postgresql.org/docs/

PostgreSQL memory usage

2019-10-16 Thread Alexander Pyhalov
Hello. After looking at my DBMS server for some time I've understood that I don't understand what was going on... A server has 48 GB RAM. shared_buffers is set to 12GB, work_mem - to 32MB, pgbouncer in transaction mode is used to connect pool (pool size 80) to PostgreSQL 10.5 server. I see t

Re: Text search lexer's handling of hyphens and negatives

2019-10-16 Thread Alan Hodgson
On Tue, 2019-10-15 at 20:34 -0700, raylu wrote: > On Tue, Oct 15, 2019 at 3:35 PM Alan Hodgson > wrote: > > My company has found the pg_trm extension to be more useful for > > partial text searches than the full text functions. I don't know > > specifically how it might help with your hyphens but

Re: Analyze and vaccum

2019-10-16 Thread Adrian Klaver
On 10/16/19 5:32 AM, Sonam Sharma wrote: How auto vaccum and vaccum are different ? How analyze and auto analyze are different ? We were running load on a table which yesterday took 3 mins and today it took 30 mins. The autovaccum and autoanalyze are happening daily . But the manual vaccum and

Analyze and vaccum

2019-10-16 Thread Sonam Sharma
How auto vaccum and vaccum are different ? How analyze and auto analyze are different ? We were running load on a table which yesterday took 3 mins and today it took 30 mins. The autovaccum and autoanalyze are happening daily . But the manual vaccum and analyze ran on 26th. Can someone please help

Re: Regarding db dump with Fc taking very long time to completion

2019-10-16 Thread Imre Samu
Hi, Maybe - you can re-use this backup tricks. "Speeding up dump/restore process" https://www.depesz.com/2009/09/19/speeding-up-dumprestore-process/ for example: """ *Idea was: All these tables had primary key based on serial. We could easily get min and max value of the primary key column, and

A little confusion about JSON Path

2019-10-16 Thread Thomas Kellerer
Hello, I don't understand why the following two JSON Path expressions aren't doing the same thing in Postgres 12: with sample (data) as ( values ('{"k1": {"list":[1,2,3]}}'::jsonb) ) select data, jsonb_path_exists(data, '$.k1.list.type() ? (@ == "array")'),

Re: Text search lexer's handling of hyphens and negatives

2019-10-16 Thread Daniel Verite
raylu wrote: > to_tsvector('simple', 'UVW-789-XYZ') is > 'uvw':1 '-789':2 'xyz':3 > because -789 is a negative integer. If we turn the query '789-XYZ' > into the tsquery as before, we get to_tsquery('simple', '789 <-> xyz') > which doesn't match it. > > Are we missing something here? Is t

Re: Is there any configuration in postgresql.conf or any other configuration of postgres which will make this possible to listen on particular interface

2019-10-16 Thread Francisco Olarte
On Wed, Oct 16, 2019 at 12:07 PM M Tarkeshwar Rao wrote: > Above processes are bind on all the interfaces of a machine. Is there any > configuration in postgresql.conf or any other configuration of postgres which > will make this possible to listen on particular interface? Listening on an INTER

Postgres 9.6 active-passive HA cluster

2019-10-16 Thread Jairam Gauns
Hi guys, We are in process of testing a Postgres 9.6 active-passive HA cluster using streaming replication on Rhel 7.6. We have setup Postgres 9.6 primary/warm standby streaming synchorous replication. We have set synchronous_standby_names=* and synchronous_commit=on. To test we have 5 sql

Is there any configuration in postgresql.conf or any other configuration of postgres which will make this possible to listen on particular interface

2019-10-16 Thread M Tarkeshwar Rao
Hi all, postmaste 2917 postgres3u IPv452341 0t0 TCP *:5432 (LISTEN) postmaste 2917 postgres4u IPv652342 0t0 TCP *:5432 (LISTEN) Above processes are bind on all the interfaces of a machine. Is there any configuration in postgresql.conf or any other configurati

Re: Regarding db dump with Fc taking very long time to completion

2019-10-16 Thread Durgamahesh Manne
On Wed, Oct 16, 2019 at 3:22 PM Durgamahesh Manne wrote: > > > On Wed, Oct 16, 2019 at 3:09 PM Luca Ferrari wrote: > >> On Wed, Oct 16, 2019 at 11:27 AM Durgamahesh Manne >> wrote: >> > Is there any way to reduce dump time when i take dump of the table >> which has 148gb in size without creati

Re: Regarding db dump with Fc taking very long time to completion

2019-10-16 Thread Durgamahesh Manne
On Wed, Oct 16, 2019 at 3:09 PM Luca Ferrari wrote: > On Wed, Oct 16, 2019 at 11:27 AM Durgamahesh Manne > wrote: > > Is there any way to reduce dump time when i take dump of the table > which has 148gb in size without creating partition* on that table has 148gb > in size ? > > I would at least

Re: Regarding db dump with Fc taking very long time to completion

2019-10-16 Thread Luca Ferrari
On Wed, Oct 16, 2019 at 11:27 AM Durgamahesh Manne wrote: > Is there any way to reduce dump time when i take dump of the table which has > 148gb in size without creating partiton on that table has 148gb in size ? I would at least try a parallel dump: should it be -j option to pg_dump. I'm not s

connection timeout with psycopg2

2019-10-16 Thread Vicente Juan Tomas Monserrat
Hi there, I have been testing out the following architecture for PostgreSQL HA. +-+ +-+ VIP ++ | +-+| || +--v---+ +--v---+ | pgBouncer | | pgBouncer | | + | |

Re: Regarding db dump with Fc taking very long time to completion

2019-10-16 Thread Durgamahesh Manne
On Fri, Aug 30, 2019 at 4:12 PM Luca Ferrari wrote: > On Fri, Aug 30, 2019 at 11:51 AM Durgamahesh Manne > wrote: > > Logical dump of that table is taking more than 7 hours to be completed > > > > I need to reduce to dump time of that table that has 88GB in size > > Good luck! > I would see tw