doc fix for pg_stat_activity.backend_type

2018-11-11 Thread John Naylor
Hi all, Commit fc70a4b0df3 added backend_type to pg_stat_activity, but the documentation omitted "logical replication launcher". Patch attached. -John Naylor diff --git a/doc/src/sgml/monitoring.sgml b/doc/src/sgml/monitoring.sgml index add71458e2..ddf607bb17 100644 ---

RE: COPY FROM WHEN condition

2018-11-11 Thread myungkyu.lim
>> COPY table_name WHERE (some_condition) >> >> Users should already be familiar with the idea that WHERE performs a filter. >> > So, what about using FILTER here? We already use it for aggregates when > filtering rows to process. > That being said, I have no strong feelings either way. I'd be

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-11-11 Thread Amit Kapila
On Mon, Nov 12, 2018 at 10:55 AM Haribabu Kommi wrote: > > On Fri, Nov 9, 2018 at 2:12 PM Amit Kapila wrote: >> >> On Thu, Nov 8, 2018 at 10:56 PM Magnus Hagander wrote: >> > >> > On Thu, Nov 8, 2018 at 3:53 PM Sergei Kornilov wrote: >> >> >> >> Hi >> >> >> >> >> Sure, but what are we going

Re: Perl 5.26 and windows build system

2018-11-11 Thread Noah Misch
On Wed, Oct 17, 2018 at 05:16:15PM -0400, Andrew Dunstan wrote: > On 10/17/2018 04:38 AM, Victor Wagner wrote: > >BTW, have anyone experienced some success using Strawberry perl instead > >of Active perl both for building postgres and as PL/Perl engine? > > > >Active State seems to abandon support

Re: PostgreSQL vs SQL/XML Standards

2018-11-11 Thread Markus Winand
> On 2018-11-9, at 05:07 , Pavel Stehule wrote: > > > > čt 8. 11. 2018 v 15:18 odesílatel Markus Winand > napsal: > > > On 2018-11-6, at 15:23 , Pavel Stehule > > wrote: > > > > > > > > po 29. 10. 2018 v 11:45 odesílatel

Re: csv format for psql

2018-11-11 Thread Pavel Stehule
po 12. 11. 2018 v 5:19 odesílatel David G. Johnston < david.g.johns...@gmail.com> napsal: > On Friday, November 9, 2018, Michael Paquier wrote: > >> On Fri, Nov 09, 2018 at 05:28:07PM +0100, Daniel Verite wrote: >> > But again COPY is concerned with importing the data that preexists, >> > even

Re: New function pg_stat_statements_reset_query() to reset statistics of a specific query

2018-11-11 Thread Haribabu Kommi
On Fri, Nov 9, 2018 at 2:12 PM Amit Kapila wrote: > On Thu, Nov 8, 2018 at 10:56 PM Magnus Hagander > wrote: > > > > On Thu, Nov 8, 2018 at 3:53 PM Sergei Kornilov wrote: > >> > >> Hi > >> > >> >> Sure, but what are we going to achieve with that number? What > >> >> information user is going

Re: Tid scan improvements

2018-11-11 Thread Edmund Horner
Hi, here's the new patch(s). Mostly the same, but trying to address your comments from earlier as well as clean up a few other things I noticed. Cheers, Edmund On Fri, 9 Nov 2018 at 15:01, Edmund Horner wrote: > > On Tue, 6 Nov 2018 at 16:40, David Rowley > wrote: > > I've been looking over

RE: speeding up planning with partitions

2018-11-11 Thread Imai, Yoshikazu
Hi Amit, On Thu, Nov 8, 2018 at 8:26 PM, Amit Langote wrote: > On 2018/11/07 10:00, Imai, Yoshikazu wrote: > > About inheritance_make_rel_from_joinlist(), I considered how it processes > > joins for sub-partitioned-table. > > > > sub-partitioned-table image: > > part > > sub1 > > leaf1 > >

Re: csv format for psql

2018-11-11 Thread David G. Johnston
On Friday, November 9, 2018, Michael Paquier wrote: > On Fri, Nov 09, 2018 at 05:28:07PM +0100, Daniel Verite wrote: > > But again COPY is concerned with importing the data that preexists, > > even if it's weird, whereas a psql output formats are not. > > Hm. I checked the contents of the patch

Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation

2018-11-11 Thread Amit Langote
On 2018/11/12 12:59, Tom Lane wrote: > Amit Langote writes: >> On 2018/11/10 7:33, Tom Lane wrote: >>> I'd argue not, actually. I think there is plausible precedent in >>> updatable views, where what we use is the defaults associated with the >>> view, not the underlying table. Correspondingly,

Re: Adding a TAP test checking data consistency on standby with minRecoveryPoint

2018-11-11 Thread Michael Paquier
On Fri, Nov 09, 2018 at 12:42:27PM +, Andrew Gierth wrote: > Seems simple enough - the LSN on the page is actually two 4-byte values > with the most significant one first, regardless of platform byte order > (though each individual word is in native order), so > > my ($hi,$lo) =

Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation

2018-11-11 Thread Tom Lane
Amit Langote writes: > On 2018/11/10 7:33, Tom Lane wrote: >> I'd argue not, actually. I think there is plausible precedent in >> updatable views, where what we use is the defaults associated with the >> view, not the underlying table. Correspondingly, what ought to govern >> in a partitioned

Re: zheap: a new storage format for PostgreSQL

2018-11-11 Thread Amit Kapila
On Sun, Nov 11, 2018 at 11:55 PM Kuntal Ghosh wrote: > > On Sat, Nov 10, 2018 at 8:51 PM Daniel Westermann > wrote: > > > > >>Thanks. Initializing the variable seems like the right fix here. > > > > ... just had a warning when recompiling from the latest sources on CentOS 7: > > > > labels

Re: BUG #15212: Default values in partition tables don't work as expected and allow NOT NULL violation

2018-11-11 Thread Amit Langote
On 2018/11/10 7:33, Tom Lane wrote: > Alvaro Herrera writes: >> On 2018-Nov-09, Jürgen Strobel wrote: >>> Regarding your example, what I expected is that *both* inserts would >>> consistently result in a tuple of (1, 42) since p should route the >>> insert to p1 and use p1's defaults. The current

RE: [PROPOSAL]a new data type 'bytea' for ECPG

2018-11-11 Thread Matsumura, Ryo
> From: Tsunakawa, Takayuki [mailto:tsunakawa.ta...@jp.fujitsu.com] > > I think the host variable data type that corresponds to the server-side bytea > should be bytea. As the following pages state or imply, it would be better > to create standard-compliant LOB types someday, and use the keyword

Re:Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock

2018-11-11 Thread chjis...@163.com
There's a mistake in the last mail.About how to reproduct the issue,the following SQL should be:set enable_seqscan = false;select count(*) from tb1 where id =1;4. execute select SQL    set enable_seqscan = false;    select count(*) from tb1 where id =2;Regard,Chen Huajun

Re: [HACKERS] [PATCH v2] Add and report the new "session_read_only" GUC pseudo-variable.

2018-11-11 Thread Melanie Plageman
On Mon, Sep 24, 2018 at 9:28 AM Elvis Pranskevichus wrote: > On Thursday, March 1, 2018 4:25:16 AM EDT Andres Freund wrote: > > A CF entry for this patch has been created yesterday, without any > > changes having happend since the above status update. Given that > > there's been no progress for

Re: COPY FROM WHEN condition

2018-11-11 Thread Tomas Vondra
On 11/9/18 4:51 PM, Adam Berlin wrote: > As a newcomer to this patch, when I read this example: > > COPY table_name WHEN (some_condition) > > .. I expect COPY to only be run when the condition is true, and I do not expect the WHEN clause to filter rows. I'm curious what you think about: >

Re: zheap: a new storage format for PostgreSQL

2018-11-11 Thread Kuntal Ghosh
On Sat, Nov 10, 2018 at 8:51 PM Daniel Westermann wrote: > > >>Thanks. Initializing the variable seems like the right fix here. > > ... just had a warning when recompiling from the latest sources on CentOS 7: > > labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing > -fwrapv

Re:Re: Connections hang indefinitely while taking a gin index's LWLock buffer_content lock

2018-11-11 Thread chenhj
Hi Before we only discussed the connection hang on the primary, the connection hang on the standby database should be another problem. When the recovery process replays the gin's delete WAL record, the order of get lwlock is not the same as the select process, resulting in a deadlock. Accord

Re: csv format for psql

2018-11-11 Thread Daniel Verite
Michael Paquier wrote: > - The experience is confusing, as the psql format uses different options > than the backend to do the same things: > -- tuples_only instead of HEADER. > -- fieldsep_csv instead of DELIMITER > -- null is an equivalent of the one with the same name, which is >