Re: [GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Michael Paquier
On Mon, Jun 15, 2015 at 9:04 AM, Anton Bushmelev wrote: > Hello, thank t for response, measure in bytes may bemore correct, but to > bring it to the customer? :) I think it is easier to say that the standby > database lags behind master no more than 15 minutes, than the fact that it > differs for

Re: [GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Anton Bushmelev
Hello, thank t for response, measure in bytes may bemore correct, but to bring it to the customer? :) I think it is easier to say that the standby database lags behind master no more than 15 minutes, than the fact that it differs for 1 megabyte. ps: sorry for my English On 06/15/2015 02:57 AM,

Re: [GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Michael Paquier
On Mon, Jun 15, 2015 at 8:30 AM, Anton Bushmelev wrote: > Hello, dear guru =) help me to fix situation when no change made on primary > and standby show lag more than 15 minutes: > master : > postgres=# select * from pg_stat_replication > ; > -[ RECORD 1 ]+-- > pid

[GENERAL] pg_last_xact_replay_timestamp lies

2015-06-14 Thread Anton Bushmelev
Hello, dear guru =) help me to fix situation when no change made on primary and standby show lag more than 15 minutes: master : postgres=# select * from pg_stat_replication ; -[ RECORD 1 ]+-- pid | 18553 usesysid | 117942 usename | rep

Re: [GENERAL] Row count estimation bug in BETWEEN?

2015-06-14 Thread Tom Lane
Yaroslav writes: > Tom Lane-2 wrote >> PG doesn't try to estimate inequalities exactly, because it usually >> doesn't make enough of a difference to matter. Currently we don't >> even bother to distinguish say ">" from ">=" for estimation purposes, >> though certainly we would need to in order to

Re: [GENERAL] Row count estimation bug in BETWEEN?

2015-06-14 Thread Yaroslav
> My simple test (using MCVs) is below ... I've posted wrong second query in the test, should have been: EXPLAIN SELECT * FROM t2 WHERE n >= 0 AND n <= 2 -- rows=12 - WBR, Yaroslav Schekin. -- View this message in context: http://postgresql.nabble.com/Row-count-estimation-bug-in-BETWEEN-tp