Re: [HACKERS] Make ANALYZE more selective about what is a "most common value"?

2017-06-10 Thread Mark Kirkwood
On 06/06/17 10:12, Gavin Flower wrote: On 06/06/17 09:41, Mark Kirkwood wrote: On 05/06/17 09:30, Tom Lane wrote: I've been thinking about the behavior discussed in https://www.postgresql.org/message-id/flat/20170522132017.29944.48391%40wrigleys.postgresql.org and it seems to me that there

Re: [HACKERS] Make ANALYZE more selective about what is a "most common value"?

2017-06-10 Thread Alvaro Herrera
Gavin Flower wrote: > The standard deviation (sd) is proportional to the square root of > the number in the sample in a Normal Distribution. > > In a Normal Distribution, about 2/3 the values will be within plus > or minus one sd of the mean. > > There seems to be an implicit assumption that

Re: [HACKERS] memory fields from getrusage()

2017-06-10 Thread Tom Lane
Justin Pryzby writes: > This comment from ~1996 says: > https://doxygen.postgresql.org/postgres_8c_source.html > 4421 * the only stats we don't show here are for memory usage -- i can't > 4422 * figure out how to interpret the relevant fields in the rusage >

[HACKERS] Re: [BUGS] Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog

2017-06-10 Thread Alvaro Herrera
Noah Misch wrote: > IMMEDIATE ATTENTION REQUIRED. This PostgreSQL 10 open item is long past due > for your status update. Please reacquaint yourself with the policy on open > item ownership[1] and then reply immediately. If I do not hear from you by > 2017-06-11 07:00 UTC, I will transfer this

Re: [HACKERS] GSoC 2017: Foreign Key Arrays

2017-06-10 Thread Mark Rofail
• After finding the arraycontains function, I implemented arraycontainselem that corresponds to the operator @<(anyarray, anyelem) ◦ Please read the attached patch file to view my progress. • In addition to src/backend/utils/adt/arrayfuncs.c where I implemented arraycontainselem.

[HACKERS] memory fields from getrusage()

2017-06-10 Thread Justin Pryzby
I'm interested to expose output of the remaining (memory) fields from getrusage(). postgres=# SET log_parser_stats='on'; postgres=# SELECT c.oid::regclass, usagecount FROM pg_buffercache b JOIN pg_class c USING (relfilenode) WHERE usagecount=1 ; LOG: PARSER STATISTICS DETAIL: ! system usage

Re: [HACKERS] PostgreSQL 10 changes in exclusion constraints - did something change? CASE WHEN behavior oddity

2017-06-10 Thread Alvaro Herrera
Tom Lane wrote: > I wrote: > > Yes, we already have guards for those cases, but they return fairly opaque > > error messages to the tune of "set-valued function called in context that > > cannot accept a set", because the executor hasn't enough context to do > > better. I'd like the messages to

Re: [HACKERS] PG10 transition tables, wCTEs and multiple operations on the same table

2017-06-10 Thread Alvaro Herrera
Robert Haas wrote: > Not this patch's problem directly, but while scrutinizing this it > crossed my mind that we would need to prohibit constraint triggers > with transition tables. It turns out that we do, in the parser: > > create constraint trigger table2_trig > after insert on table2

Re: [HACKERS] Notes on testing Postgres 10b1

2017-06-10 Thread Josh Berkus
On 06/09/2017 07:54 PM, Greg Stark wrote: > On 7 June 2017 at 01:01, Josh Berkus wrote: >> P3: apparently jsonb_to_tsvector with lang parameter isn't immutable? >> This means that it can't be used for indexing: >> >> libdata=# create index bookdata_fts on bookdata using gin (( >>

Re: [HACKERS] logical replication: \dRp+ and "for all tables"

2017-06-10 Thread Tom Lane
Jeff Janes writes: > On Fri, Jun 9, 2017 at 10:20 PM, Masahiko Sawada > wrote: >> On Sat, Jun 10, 2017 at 7:29 AM, Jeff Janes wrote: >>> That seems unfortunate. Should the "for all tables" be included as >>> another column in

[HACKERS] Getting server crash on Windows when using ICU collation

2017-06-10 Thread Ashutosh Sharma
Hi All, I am seeing a server crash when running queries using ICU collations on Windows. Following are the steps to reproduce the crash with the help of patch to enable icu feature on Windows - [1], 1) psql -d postgres 2) CREATE DATABASE icu_win_test TEMPLATE template0 ENCODING 'UTF8'

[HACKERS] ICU support on Windows

2017-06-10 Thread Ashutosh Sharma
Hi All, Currently, we cannot perform ICU enabled build for postgres on Windows platform. However, this can be done on Linux platforms using '--with-icu' configuration parameter. Attached is the patch that allows us to perform icu enabled build for postgres on Windows platform provided that we

[HACKERS] tablesync.c - comment improvements

2017-06-10 Thread Erik Rijkers
tablesync.c - comment improvements--- src/backend/replication/logical/tablesync.c.orig 2017-06-10 10:20:07.617662465 +0200 +++ src/backend/replication/logical/tablesync.c 2017-06-10 10:45:52.620514397 +0200 @@ -12,18 +12,18 @@ * logical replication. * * The initial data synchronization

[HACKERS] Re: BUG #14680: startup process on standby encounter a deadlock of TwoPhaseStateLock when redo 2PC xlog

2017-06-10 Thread Noah Misch
On Thu, Jun 08, 2017 at 11:17:38PM -0700, Noah Misch wrote: > On Sun, Jun 04, 2017 at 10:24:30PM +, Noah Misch wrote: > > On Thu, Jun 01, 2017 at 01:07:53AM -0700, Michael Paquier wrote: > > > On Wed, May 31, 2017 at 12:30 PM, Michael Paquier > > > wrote: > > > > On

Re: [HACKERS] logical replication: \dRp+ and "for all tables"

2017-06-10 Thread Jeff Janes
On Fri, Jun 9, 2017 at 10:20 PM, Masahiko Sawada wrote: > On Sat, Jun 10, 2017 at 7:29 AM, Jeff Janes wrote: > > If I create a publication "for all tables", \dRp+ doesn't indicate it is > for > > all tables, it just gives a list of the tables. > > >