Re: Difference between "autovacuum_naptime" and "autovacuum_vacuum_cost_delay"?

2018-08-16 Thread Raghavendra Rao J S V
Thank you very much for your response. Could you clarify me below things,please? What is the difference between "autovacuum_naptime" and "autovacuum_vacuum_cost_delay"? What is the difference between "autovacuum launcher process" and "autovacuum worker process"? How to control the number of

Re: Difference between "autovacuum_naptime" and "autovacuum_vacuum_cost_delay"?

2018-08-16 Thread Joshua D. Drake
On 08/16/2018 06:10 PM, Raghavendra Rao J S V wrote: Hi All, I have gone through several documents but I am still have confusion related to "autovacuum_naptime" and "autovacuum_vacuum_cost_delay". Could you clarify me with an example. When Auto vacuum worker process will start?

Difference between "autovacuum_naptime" and "autovacuum_vacuum_cost_delay"?

2018-08-16 Thread Raghavendra Rao J S V
Hi All, I have gone through several documents but I am still have confusion related to "autovacuum_naptime" and "autovacuum_vacuum_cost_delay". Could you clarify me with an example. When Auto vacuum worker process will start? When Auto vacuum worker process will stop? Does Auto vacuum worker

Re: PostgreSQL System Views or Dictionary Tables

2018-08-16 Thread David G. Johnston
On Thu, Aug 16, 2018 at 2:06 PM, Diego Grampin wrote: > Hello, > > I'm new at PostgreSQL, but known Oracle since ten years ago. > > In PostgreSQL, where can i found system views or dictionary tables (v$*, > dba_* at oracle) or structural dba tables ?. And comand prompt parameters > of the

Re: PostgreSQL System Views or Dictionary Tables

2018-08-16 Thread Adrian Klaver
On 08/16/2018 02:06 PM, Diego Grampin wrote: Hello, I'm new at PostgreSQL, but known Oracle since ten years ago. In PostgreSQL, where can i found system views or dictionary tables (v$*, dba_* at oracle) or structural dba tables ?. And comand prompt parameters of the database (show param X at

PostgreSQL System Views or Dictionary Tables

2018-08-16 Thread Diego Grampin
Hello, I'm new at PostgreSQL, but known Oracle since ten years ago. In PostgreSQL, where can i found system views or dictionary tables (v$*, dba_* at oracle) or structural dba tables ?. And comand prompt parameters of the database (show param X at Oracle) ? The porpose of this is to

Re: pg_upgrade (and recovery) pitfalls

2018-08-16 Thread Stephen Frost
Greetings, * PO (gunnar.bl...@pro-open.de) wrote: > Consider the following scenario/setup: > - 4 DB servers in 2 DCs > - 1 primary (in DC1) > - 1 sync secondary (in other DC) > - 2 async secondaries (distributed over DCs) I'm a bit surprised that you're ok with the latency imposed by using

Re: using graph model with PostgreSQL

2018-08-16 Thread Data Ace
I think's its a forked PostgreSQL, try AgensGraph: https://www.postgresql.org/download/products/8/ On Wed, Aug 15, 2018 at 7:09 AM, 김세훈 wrote: > Hi there, > > currently I'm using PostgreSQL with PostGIS extension to handle geospatial > data. > > In my project I need to apply some graph

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
Adrian Klaver wrote: On 08/16/2018 01:48 AM, Phil Endecott wrote: Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, The above is not clear to me. My best guess: It's not part of the error for the archive command; it's just the next thing in the log file. 

pg_upgrade (and recovery) pitfalls

2018-08-16 Thread PO
Hello -general! (didn't want to pester -hackers with this, as I don't know if I've been doing something terribly wrong ;-) Consider the following scenario/setup: - 4 DB servers in 2 DCs - 1 primary (in DC1) - 1 sync secondary (in other DC) - 2 async secondaries (distributed over DCs) -

Re: Sv: Re: Sv: Re: regex match and special characters

2018-08-16 Thread Adrian Klaver
On 08/16/2018 08:19 AM, Adrian Klaver wrote: On 08/16/2018 08:13 AM, Adrian Klaver wrote: Wonder if the OP has standard_conforming_strings='off' and escape_string_warning='off'? In the above referring to 9.6.9 instance. Well that theory is no good: test=# select version();

Re: Sv: Re: Sv: Re: regex match and special characters

2018-08-16 Thread Adrian Klaver
On 08/16/2018 08:13 AM, Adrian Klaver wrote: Wonder if the OP has standard_conforming_strings='off' and escape_string_warning='off'? In the above referring to 9.6.9 instance. -- *Andreas Joseph Krogh* CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com

Re: Sv: Re: Sv: Re: regex match and special characters

2018-08-16 Thread Tom Lane
Andreas Joseph Krogh writes: > When using E-syntax you need to double the backslash for escaping: > andreak@[local]:5433 10.4 andreak=# select 'abcd'||chr(8198) ~ E'abcd\\s'; Another thing to keep in mind is that this is all locale-dependent (specifically, LC_CTYPE, I believe). In plain old C

Re: Sv: Re: Sv: Re: regex match and special characters

2018-08-16 Thread Adrian Klaver
On 08/16/2018 07:47 AM, Andreas Joseph Krogh wrote: På torsdag 16. august 2018 kl. 16:32:40, skrev Adrian Klaver mailto:adrian.kla...@aklaver.com>>: On 08/16/2018 07:04 AM, Andreas Joseph Krogh wrote: > char(2006) produces the wrong character as 2006 is the hex-value. You > have

Sv: Re: Sv: Re: regex match and special characters

2018-08-16 Thread Andreas Joseph Krogh
På torsdag 16. august 2018 kl. 16:32:40, skrev Adrian Klaver < adrian.kla...@aklaver.com >: On 08/16/2018 07:04 AM, Andreas Joseph Krogh wrote: > char(2006) produces the wrong character as 2006 is the hex-value. You > have to use 8198: >

Re: Sv: Re: regex match and special characters

2018-08-16 Thread Adrian Klaver
On 08/16/2018 07:04 AM, Andreas Joseph Krogh wrote: char(2006) produces the wrong character as 2006 is the hex-value. You have to use 8198: andreak@[local]:543310.4 andreak=# select version(); ┌┐ │  

Sv: Re: regex match and special characters

2018-08-16 Thread Andreas Joseph Krogh
På torsdag 16. august 2018 kl. 15:16:52, skrev Adrian Klaver < adrian.kla...@aklaver.com >: On 08/16/2018 03:59 AM, Alex Kliukin wrote: > Hi, > > Here is a simple SQL statement that gives different results on PostgreSQL 9.6 and PostgreSQL 10+. The space

Re: Copy over large data Postgresql 9.5

2018-08-16 Thread Andreas Kretschmer
On 16 August 2018 15:41:31 CEST, Vikas Sharma wrote: >Hello Experts, > >I need to transfer pgsql 9.5 data of 90GB from one Cloud provider to >other. We have plenty of downtime to do this. I will be copying over >data >directory after shutting down pgsql services on the source. Why not using

Re: regex match and special characters

2018-08-16 Thread Tom Lane
Alex Kliukin writes: > Here is a simple SQL statement that gives different results on PostgreSQL 9.6 > and PostgreSQL 10+. The space character at the end of the string is actually > U+2006 SIX-PER-EM SPACE > (http://www.fileformat.info/info/unicode/char/2006/index.htm) I think the reason for

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Adrian Klaver
On 08/16/2018 01:48 AM, Phil Endecott wrote: Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, The above is not clear to me. My best guess: It's not part of the error for the archive command; it's just the next thing in the log file.  Y is (1) trying write

Copy over large data Postgresql 9.5

2018-08-16 Thread Vikas Sharma
Hello Experts, I need to transfer pgsql 9.5 data of 90GB from one Cloud provider to other. We have plenty of downtime to do this. I will be copying over data directory after shutting down pgsql services on the source. The problem is how can I confirm that the data has been copied over correctly.

Re: regex match and special characters

2018-08-16 Thread Adrian Klaver
On 08/16/2018 03:59 AM, Alex Kliukin wrote: Hi, Here is a simple SQL statement that gives different results on PostgreSQL 9.6 and PostgreSQL 10+. The space character at the end of the string is actually U+2006 SIX-PER-EM SPACE (http://www.fileformat.info/info/unicode/char/2006/index.htm)

Re: Copying data from a CSV file into a table dynamically

2018-08-16 Thread pavan95
Thank you so much Ron. You saved my efforts after a slight modification of quotes of the command you said, it started working fine. The modified command is as below: cat /tmp/xyz/abc/postgresql-`date --date="0 days ago" +%Y-%m-%d`_*.csv | psql -U aaa -d mydb -c "COPY postgres_log1 FROM STDIN

Re: Logical replication from standby

2018-08-16 Thread Andres Freund
Hi, On 2018-08-16 14:32:34 +0200, Andreas Joseph Krogh wrote: > På torsdag 16. august 2018 kl. 14:18:12, skrev Andres Freund > >: > On 2018-08-16 13:35:06 +0200, Andreas Joseph Krogh wrote: > > Any plans to support $subject? > > There's LOADS of discussion on this

Sv: Re: Logical replication from standby

2018-08-16 Thread Andreas Joseph Krogh
På torsdag 16. august 2018 kl. 14:18:12, skrev Andres Freund mailto:and...@anarazel.de>>: On 2018-08-16 13:35:06 +0200, Andreas Joseph Krogh wrote: > Any plans to support $subject? There's LOADS of discussion on this on the lists.   I couldn't find anything specifically regarding "from

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Stephen Frost
Greetings, * Phil Endecott (spam_from_pgsql_li...@chezphil.org) wrote: > David Steele wrote: > >pgBackRest has done this for years and it saves a *lot* of headaches. > > The system to which I am sending the WAL files is a rsync.net > account. I use it because of its reliability, but methods for

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread David Steele
On 8/16/18 4:37 AM, Phil Endecott wrote: > David Steele wrote: >> On 8/15/18 4:25 PM, Phil Endecott wrote: >>> - Should my archive_command detect the case where it is asked to >>> write the same file again with the same contents, and report success >>> in that case? >> >> Yes. > >> There are a

Logical replication from standby

2018-08-16 Thread Andreas Joseph Krogh
Any plans to support $subject?   Offloading the primary by replicating from standby would be very useful.   -- Andreas Joseph Krogh CTO / Partner - Visena AS Mobile: +47 909 56 963 andr...@visena.com www.visena.com

regex match and special characters

2018-08-16 Thread Alex Kliukin
Hi, Here is a simple SQL statement that gives different results on PostgreSQL 9.6 and PostgreSQL 10+. The space character at the end of the string is actually U+2006 SIX-PER-EM SPACE (http://www.fileformat.info/info/unicode/char/2006/index.htm) test=# select 'abcd ' ~ 'abcd\s'; ?column?

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
Adrian Klaver wrote: On 08/15/2018 01:25 PM, Phil Endecott wrote: Dear Experts, Here is my latest issue with replication: I have 3 systems, X, Y and Z. Initially X is replicated to Y and Y is replicated to Z; in each case the replication involves log-shipping using archive_command and

Re: During promotion, new master tries to archive same segment twice

2018-08-16 Thread Phil Endecott
David Steele wrote: On 8/15/18 4:25 PM, Phil Endecott wrote: - Should my archive_command detect the case where it is asked to write the same file again with the same contents, and report success in that case? Yes. There are a number of cases where the same WAL segment can be pushed more

Re: Odd Row Estimates in Query Plan (rows=75)

2018-08-16 Thread Laurenz Albe
Don Seiler wrote: > We have a report query that has gone from maybe a few seconds to run to a few > minutes to run since mid-July. > Looking at the output of EXPLAIN ANALYZE, the row count estimates are way > off, even though this table was > just analyzed a day or so ago. What's more bizarre to