Re: Full-text Search - Thesaurus relationships

2018-10-30 Thread Laurenz Albe
Nicolas Paris wrote: > The documentation[1] says thesaurus can include informations of terms > relationships such broader terms, preferred terms ... > > I haven't been able to find out how to exploit those relationship in > postgres. Is there any keyword to and associated syntax to make use of >

Re: Function for Exception Logging

2018-10-30 Thread Tony Shelver
I'd be interested if there is an answer to this. The big issue with writing to a table is the interaction with rollbacks and commits. Even more difficult in PG functions as they have no commit / rollback capability. I haven't played with stored procedures in in PG11 yet. In Oracle, I wrote log

Is there a way to speed up WAL replay?

2018-10-30 Thread Torsten Förtsch
Hi, I am working on restoring a database from a base backup + WAL. With the default settings the database replays about 3-4 WAL files per second. The startup process takes about 65% of a CPU and writes data with something between 50 and 100 MB/sec. Is there a way to speed that up? The disk can ea

Re: Fwd: Log file

2018-10-30 Thread Igor Korot
Now is there a command to flush the log - delete the content of it? All I'm looking for in the log are DDL commands - CREATE/ALTER/DELETE ones. On Wed, Oct 31, 2018 at 12:32 AM Igor Korot wrote: > > Hi, Tom, > > On Mon, Oct 29, 2018 at 5:08 PM Tom Lane wrote: > > > > Igor Korot writes: > > >

Re: Fwd: Log file

2018-10-30 Thread Igor Korot
Hi, Tom, On Mon, Oct 29, 2018 at 5:08 PM Tom Lane wrote: > > Igor Korot writes: > > On Mon, Oct 29, 2018 at 1:56 PM Tom Lane wrote: > >> You can set up the log files as readable by the OS group of the server > >> (see log_file_mode), and then grant membership in that group to whichever > >> OS

Re: pg_restore to new database wants to wipe out the old database?

2018-10-30 Thread Adrian Klaver
On 10/30/18 3:25 PM, Ron wrote: On 10/30/2018 05:16 PM, David G. Johnston wrote: On Tue, Oct 30, 2018 at 3:09 PM Ron > wrote: Hi, v9.6.9 Why is pg_restore trying to drop my production database, when I (think I) am telling it to create the new da

Full-text Search - Thesaurus relationships

2018-10-30 Thread Nicolas Paris
Hi, The documentation[1] says thesaurus can include informations of terms relationships such broader terms, preferred terms ... I haven't been able to find out how to exploit those relationship in postgres. Is there any keyword to and associated syntax to make use of them ? Thanks, [1]: https

Re: pg_restore to new database wants to wipe out the old database?

2018-10-30 Thread Ron
On 10/30/2018 05:16 PM, David G. Johnston wrote: On Tue, Oct 30, 2018 at 3:09 PM Ron > wrote: Hi, v9.6.9 Why is pg_restore trying to drop my production database, when I (think I) am telling it to create the new database "Molson"? Straight from t

Re: pg_restore to new database wants to wipe out the old database?

2018-10-30 Thread David G. Johnston
On Tue, Oct 30, 2018 at 3:09 PM Ron wrote: > Hi, > > v9.6.9 > > Why is pg_restore trying to drop my production database, when I (think I) > am telling it to create the new database "Molson"? > Straight from the pg_restore documentation: -C "When this option is used, the database named with -d

pg_restore to new database wants to wipe out the old database?

2018-10-30 Thread Ron
Hi, v9.6.9 Why is pg_restore trying to drop my production database, when I (think I) am telling it to create the new database "Molson"? $ cd /backup $ pg_dump -d proddb -j 8 -Fd --no-synchronized-snapshots -Z0 -v -f proddb 2> proddb_pgdump.log $ mv proddb Molson $ pg_restore -vcC --if-exis

Re: Question about servicescript for stopping and starting postgresql instance

2018-10-30 Thread Adrian Klaver
On 10/30/18 2:09 PM, Marian Forums wrote: Hi, Postgres was installed through a repo with yum install. So did you disable the start/stop scripts that the package installed? I will try to run it with another type. Regards Marian Op 30 okt. 2018 om 21:56 heeft Adrian Klaver het volgende ge

Re: editable spreadsheet style interface

2018-10-30 Thread Tim Clarke
On 30/10/2018 20:32, Martin Mueller wrote: I have used Aqua Data Studio for several years. Jetbrains recently released a similar product. Academic licensing is affordable (~ $200 a year) and very cheap if considered in terms of the time it saves you. *From: *David Gauthier *Date: *Tuesday,

Re: Question about servicescript for stopping and starting postgresql instance

2018-10-30 Thread Adrian Klaver
On 10/30/18 9:27 AM, Marian Forums wrote: Hi Adrain, Thanks for your reply. How was Postgres installed on this machine? Have you tried the script from the docs? My script looks like this: I am no systemd expert, still the Type=forking does not seem right to me. # cat /usr/lib/systemd/s

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-30 Thread Adrian Klaver
On 10/30/18 9:15 AM, GPT wrote: Good afternoon! ... Postgres did not behave in a 'poor' way, the extension just did not interpret the results correctly. Eh! Eh! Adrian/Christoph one minute please because this is something new (at least in the very clear way you formulate it now and I can unders

Re: editable spreadsheet style interface

2018-10-30 Thread Martin Mueller
I have used Aqua Data Studio for several years. Jetbrains recently released a similar product. Academic licensing is affordable (~ $200 a year) and very cheap if considered in terms of the time it saves you. From: David Gauthier Date: Tuesday, October 30, 2018 at 2:06 PM To: "pgsql-gene...@post

Re: Question about servicescript for stopping and starting postgresql instance

2018-10-30 Thread Marian Forums
Hi Adrain, Thanks for your reply. My script looks like this: # cat /usr/lib/systemd/system/postgresql-9.6.pg-tstxxx.service [Unit] Description=postgresql_pg-tstxxx After=syslog.target After=network.target [Service] Type=forking User=postgresql Group=postgresqlg Environment=PGDATA=/data/pg-tstxxx/d

editable spreadsheet style interface

2018-10-30 Thread David Gauthier
I think I know the answer to this one but I'll ask anyway... Is there a spreadsheet style interface to a PG DB where users can... - lock records - edit records - submit changes (transaction) Is there any after-market tool for PG that does something like this ?

Cascading replication with slots

2018-10-30 Thread Scot Kreienkamp
Hi everyone, I've never used replication slots before so I'm just wanting to clarify how they work on a two node streaming replication cluster. 1. From the documentation both active and standby nodes seem to be aware of the status of the replication slot... is that true? 2. Any limi

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-30 Thread GPT
Good afternoon! > ... > Postgres did not behave in a 'poor' way, the extension just did not > interpret the results correctly. Eh! Eh! Adrian/Christoph one minute please because this is something new (at least in the very clear way you formulate it now and I can understand it easily)! The statement

Re: pg_stat_all_tables.last_vacuum not always correct.

2018-10-30 Thread Tom Lane
Kathleen Emerson writes: > I ran `VACUUM VERBOSE` on 10-28. After the VACUUM completed, I ran the > query > `SELECT relname, last_vacuum FROM pg_stat_all_tables ORDER BY 2;` > [ and saw old timestamps for some ] > So, at least according to the VERBOSE logs, it seems like these tables > _were_ vacu

Re: Portworx snapshots

2018-10-30 Thread Stephen Frost
Greetings, * Ghislain ROUVIGNAC (g...@sylob.com) wrote: > Our application don't write lot of data, so i don't think the time taken on > replaying the WAL will be an issue for us. That certainly makes things simpler. Then again, if you are not writing a lot of data then you might consider using s

Re: Portworx snapshots

2018-10-30 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > Stephen Frost wrote: > > The downside with any snapshot-style approach is that it means that when > > you have a failure, you have to go through and replay all the WAL since > > the last checkpoint, which is single-threaded and can take

pg_stat_all_tables.last_vacuum not always correct.

2018-10-30 Thread Kathleen Emerson
I ran `VACUUM VERBOSE` on 10-28. After the VACUUM completed, I ran the query `SELECT relname, last_vacuum FROM pg_stat_all_tables ORDER BY 2;` This query returned: relname | last_vacuum -+--- | 2018-1

Is the centos repository for postgresql 10 is broken now?

2018-10-30 Thread Олег Самойлов
In this form https://www.postgresql.org/download/linux/redhat/ I set version 10, platform centos 7, arch x86_64 and I has got yum install https://download.postgresql.org/pub/repos/yum/10/redhat/rhel-7-x86_64/pgdg-centos10-10-2.noarch.rpm I d

Re: How to change standby node to sync from the new master without rebooting the PostgreSQL service?

2018-10-30 Thread Madan Kumar
It's not feasible since my deployments are in cloud. We make use of floating IP for DB clients, but usage of same for within cluster communication will be slight overhead. Warm Regards, Madan Kumar K *"There is no Elevator to Success. You have to take the Stairs"*

Re: R: Problem with stored procedure and nested transactions

2018-10-30 Thread Adrian Klaver
On 10/30/18 7:19 AM, p.piero...@mmbb.it wrote: Thanks, I had already read it. What I cannot find is how to get the behavior I described, is there a way? Yes, follow the link to Section 43.8: https://www.postgresql.org/docs/11/static/plpgsql-transactions.html Paolo Pierotti Viale Lomba

RE: How to change standby node to sync from the new master without rebooting the PostgreSQL service?

2018-10-30 Thread Scot Kreienkamp
Why is it not feasible? How do your DB clients know to switch to the new master? I’m using pcs clustering in my environment to manage two production nodes, automatic failover, and two VIPs (one for master, one for slave). All my clients point at either the master VIP or the slave VIP. When w

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-30 Thread Adrian Klaver
On 10/30/18 3:19 AM, GPT wrote: Very good morning! If, in 2018 when the human structures are very close to reach the edge of our universe, here on earth you are asking me (a simple end-user), in order to run the following "complicated" and "sophisticated" SQL statements: INSERT INTO my_table(ke

R: Problem with stored procedure and nested transactions

2018-10-30 Thread p.pierotti
Thanks, I had already read it. What I cannot find is how to get the behavior I described, is there a way? Paolo Pierotti Viale Lombardia, 4 Lodi (LO) M: +39 328 9035851 P: +39 075 8556435 W: www.mmbb.it -Messaggio originale- Da: Adrian Klaver Inviato: martedì 30 ottobre 2018 15

Re: Problem with stored procedure and nested transactions

2018-10-30 Thread Adrian Klaver
On 10/30/18 7:03 AM, p.piero...@mmbb.it wrote: Hi everyone, I have problems with stored procedures introduced in version 11. I do not understand how to create a nested transaction, in this semplified example: *create**or**replace**procedure*tst_prc(*inout*p_cod *text*) *language*plpgsql *as

Problem with stored procedure and nested transactions

2018-10-30 Thread p.pierotti
Hi everyone, I have problems with stored procedures introduced in version 11. I do not understand how to create a nested transaction, in this semplified example: create or replace procedure tst_prc(inout p_cod text) language plpgsql as $procedure$ begin p_cod := 'a'; begin

Re: How to change standby node to sync from the new master without rebooting the PostgreSQL service?

2018-10-30 Thread Madan Kumar
Thanks Scot. But moving VIP is not feasible option for me. At present PostgreSQL doesn't support for reloading of recovery.conf parameters via SIGHUP. To prevent recovery.conf reload for master IP, I can manage internal DNS to always point to the current master. However there are some cases where o

Re: Question about servicescript for stopping and starting postgresql instance

2018-10-30 Thread Adrian Klaver
On 10/30/18 5:09 AM, Marian Forums wrote: Hi, I have a question about creating a service script to start/stop/status postgresql instance ( version 9.6.8) on Red Hat 7. How did you install Postgres on the machine? I have read the explanation of how to create such a service script on https:

RE: How to change standby node to sync from the new master without rebooting the PostgreSQL service?

2018-10-30 Thread Scot Kreienkamp
Point it at a VIP that travels with the master. Scot Kreienkamp |Senior Systems Engineer | La-Z-Boy Corporate One La-Z-Boy Drive| Monroe, Michigan 48162 | Office: 734-384-6403 | | Mobile: 7349151444 | Email: scot.kreienk...@la-z-boy.com From: Madan Kumar [mailto:madankumar1...@gmail.com] Sent: T

Question about servicescript for stopping and starting postgresql instance

2018-10-30 Thread Marian Forums
Hi, I have a question about creating a service script to start/stop/status postgresql instance ( version 9.6.8) on Red Hat 7. I have read the explanation of how to create such a service script on https://www.postgresql.org/docs/9.6/static/server-start.html . Stopping and Starting works. However

Re: Problem with commit in function

2018-10-30 Thread Christoph Moench-Tegeder
## Mike Martin (redt...@gmail.com): > Subject: Problem with commit in function You can't commit inside a FUNCTION - and there's an obvious ERROR if you try to do that: "invalid transaction termination". Only since version 11 you can use a PROCEDURE and COMMIT/ROLLBACK inside that - and the proced

How to change standby node to sync from the new master without rebooting the PostgreSQL service?

2018-10-30 Thread Madan Kumar
Hi, Whenever there is a change in master, PostgreSQL service on standby nodes must be restarted (after changing the master IP in the recovery.conf) to ensure it is syncing with the new master. Is there a way to point to new master without reboot of PostgreSQL on the standby? Warm Regards, Madan K

Problem with commit in function

2018-10-30 Thread Mike Martin
I have the following function -- FUNCTION: public.update_log() -- DROP FUNCTION public.update_log(); CREATE OR REPLACE FUNCTION public.update_log( ) RETURNS void LANGUAGE 'sql' COST 100 VOLATILE AS $BODY$ truncate table postgres_log_tmp ; COPY postgres_log_tmp FROM '/mnt/pgdata

Re: rw_redis_fdw: SQL Errors when statement is within a function

2018-10-30 Thread GPT
Very good morning! If, in 2018 when the human structures are very close to reach the edge of our universe, here on earth you are asking me (a simple end-user), in order to run the following "complicated" and "sophisticated" SQL statements: INSERT INTO my_table(key, value, expiry) VALUES ('my_key'

Connectivity Support for PostgreSQL 11 in dbForge Data Compare for PostgreSQL

2018-10-30 Thread Devart
Devart has released a new version of dbForge Data Compare for PostgreSQL v.3.1 – a powerful and easy to use tool for table data comparison and synchronization. Devart, a Czech software provider of database connectivity solutions and tools for database management and development, announced the rele

Re: Different memory allocation strategy in Postgres 11?

2018-10-30 Thread Thomas Kellerer
Thomas Munro schrieb am 26.10.2018 um 22:13: >>> I typically configure "shared_buffers = 4096MB" on my 16GB system as >>> sometimes when testing, it pays off to have a bigger cache. >>> >>> With Postgres 10 and earlier, the Postgres process(es) would only >>> allocate that memory from the