Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-06-22 Thread Daniel Verite
Andres Freund wrote: - if (pqFlush(conn) < 0) - goto sendFailed; + if (conn->batch_status == PQBATCH_MODE_OFF) + { + /* +* Give the data a push. In nonblock mode, don't complain if we're unable +* to send it

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-06-22 Thread Thomas Munro
On Thu, Jun 22, 2017 at 10:59 PM, Mahendranath Gurram wrote: > I'm implementing the In-Memory index as per your suggestion. So far it's > good. Great news. > As of now, only one thing is unclear for me. How could i detach the > dsa(dsa_detach() call) in backend

Re: [HACKERS] PATCH: Batch/pipelining support for libpq

2017-06-22 Thread Daniel Verite
Craig Ringer wrote: > The kernel will usually do some packet aggregation unless we use > TCP_NODELAY (which we don't and shouldn't) Not sure. As a point of comparison, Oracle has it as a tunable parameter (TCP.NODELAY), and they changed its default from No to Yes starting from their 10g

[HACKERS] TRUE and true

2017-06-22 Thread Kyotaro HORIGUCHI
Hello, I have a maybe-silly question. What makes us have both TRUE/true or FALSE/false as constants of bool? The following definitions in c.h didn't mess anything up. #define TRUEtrue #define FALSE false # NIL seems causing similar mess. regards, -- Kyotaro Horiguchi NTT Open Source

Re: [HACKERS] Regarding Postgres Dynamic Shared Memory (DSA)

2017-06-22 Thread Mahendranath Gurram
Hi Thomas, I'm implementing the In-Memory index as per your suggestion. So far it's good. As of now, only one thing is unclear for me. How could i detach the dsa(dsa_detach() call) in backend (typically during backend quit). Of-course when process quits, all it's associated memory will

Re: [HACKERS] A bug in mapping attributes in ATExecAttachPartition()

2017-06-22 Thread Ashutosh Bapat
On Thu, Jun 15, 2017 at 4:06 PM, Amit Langote wrote: > > Anyway, I tried to implement the refactoring in patch 0002, which is not > all of the patch 0001 that Jeevan posted. Please take a look. I wondered > if we should emit a NOTICE when an individual leaf

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-06-22 Thread Amit Langote
On 2017/06/22 16:56, Michael Paquier wrote: > On Wed, Jun 21, 2017 at 9:42 AM, Amit Langote > wrote: >> On 2017/06/20 20:37, Amit Kapila wrote: >>> On Tue, Jun 20, 2017 at 1:50 PM, Amit Langote >>> wrote: On 2017/06/19 23:31, Tom

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Craig Ringer
On 22 June 2017 at 17:00, Kang Yuzhe wrote: > diff --git a/src/backend/executor/nodeModifyTable.c > b/src/backend/executor/nodeModifyTable.c > index 8619ce3..e3ac758 100644 > --- a/src/backend/executor/nodeModifyTable.c > +++ b/src/backend/executor/nodeModifyTable.c The

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Thomas Munro
On Thu, Jun 22, 2017 at 9:00 PM, Kang Yuzhe wrote: > I just downloaded the patch from GSoC site. I just looked at https://wiki.postgresql.org/wiki/Add_MERGE_command_GSoC_2010 and saw that the file https://wiki.postgresql.org/wiki/File:Merge_v201.tar was uploaded on 24 Aug

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 11:23 AM, Craig Ringer wrote: > On 22 June 2017 at 16:05, Kang Yuzhe wrote: >> Dear PG hackers, >> >> First my apology if I appear to be a jerk or not following the policy. >> >> I emailed Boxuan Zhai who was in charge of the

Re: [HACKERS] Incorrect documentation about pg_stat_activity

2017-06-22 Thread Yugo Nagata
On Thu, 22 Jun 2017 14:14:53 +0530 Ashutosh Bapat wrote: > On Wed, Jun 21, 2017 at 7:48 PM, Simon Riggs wrote: > > On 21 June 2017 at 16:15, Yugo Nagata wrote: > >> On Wed, 21 Jun 2017 19:08:35 +0530 > >> Kuntal Ghosh

Re: [HACKERS] Incorrect documentation about pg_stat_activity

2017-06-22 Thread Ashutosh Bapat
On Wed, Jun 21, 2017 at 7:48 PM, Simon Riggs wrote: > On 21 June 2017 at 16:15, Yugo Nagata wrote: >> On Wed, 21 Jun 2017 19:08:35 +0530 >> Kuntal Ghosh wrote: >> >>> On Wed, Jun 21, 2017 at 6:05 PM, Yugo Nagata

Re: [HACKERS] An attempt to reduce WALWriteLock contention

2017-06-22 Thread Sokolov Yura
On 2017-06-22 04:16, Michael Paquier wrote: On Wed, Jun 21, 2017 at 4:57 PM, jasrajd wrote: We are also seeing contention on the walwritelock and repeated writes to the same offset if we move the flush outside the lock in the Azure environment. pgbench doesn't scale

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
On Thu, Jun 22, 2017 at 11:16 AM, Michael Paquier wrote: > On Thu, Jun 22, 2017 at 5:05 PM, Kang Yuzhe wrote: >> First my apology if I appear to be a jerk or not following the policy. > > No problem. > >> I emailed Boxuan Zhai who was in charge

Re: [HACKERS] Optional message to user when terminating/cancelling backend

2017-06-22 Thread Yugo Nagata
On Thu, 22 Jun 2017 09:24:54 +0900 Michael Paquier wrote: > On Wed, Jun 21, 2017 at 11:42 PM, Daniel Gustafsson wrote: > > The message is truncated in SetBackendCancelMessage() for safety, but > > pg_{cancel|terminate}_backend() could throw an error

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Craig Ringer
On 22 June 2017 at 16:05, Kang Yuzhe wrote: > Dear PG hackers, > > First my apology if I appear to be a jerk or not following the policy. > > I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in > 2010 of GSoC but without reply. > > I want to apply

Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT

2017-06-22 Thread Thomas Munro
On Thu, Jun 22, 2017 at 6:10 PM, Michael Paquier wrote: > On Thu, Jun 22, 2017 at 2:44 PM, Kuntal Ghosh > wrote: >> On Thu, Jun 22, 2017 at 9:48 AM, Michael Paquier >> wrote: >>> On Thu, Jun 22, 2017 at 1:29 AM,

Re: [HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Michael Paquier
On Thu, Jun 22, 2017 at 5:05 PM, Kang Yuzhe wrote: > First my apology if I appear to be a jerk or not following the policy. No problem. > I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in > 2010 of GSoC but without reply. > > I want to apply

[HACKERS] pg_stop_backup(wait_for_archive := true) on standby server

2017-06-22 Thread Masahiko Sawada
Hi, Since an optional second argument wait_for_archive of pg_stop_backup has been introduced in PostgreSQL 10 we can choose whether wait for archiving. But my colleagues found that we can do pg_stop_backup with wait_for_archive = true on the standby server but it actually doesn't wait for WAL

[HACKERS] SQL MERGE patches for PostgreSQL Versions

2017-06-22 Thread Kang Yuzhe
Dear PG hackers, First my apology if I appear to be a jerk or not following the policy. I emailed Boxuan Zhai who was in charge of the SQL Merge keyword in 2010 of GSoC but without reply. I want to apply merge_v201.patch to specific PG version. It failed saying 1 or 2 of 5 hunk failed. My

Re: [HACKERS] Setting pd_lower in GIN metapage

2017-06-22 Thread Michael Paquier
On Wed, Jun 21, 2017 at 9:42 AM, Amit Langote wrote: > On 2017/06/20 20:37, Amit Kapila wrote: >> On Tue, Jun 20, 2017 at 1:50 PM, Amit Langote >> wrote: >>> On 2017/06/19 23:31, Tom Lane wrote: I'd suggest a rule like "if

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-22 Thread Masahiko Sawada
On Wed, Jun 21, 2017 at 8:10 AM, Peter Eisentraut wrote: > On 6/19/17 22:54, Masahiko Sawada wrote: >>> It seems to me we could just take a stronger lock around >>> RemoveSubscriptionRel(), so that workers can't write in there concurrently. >> >> Since we reduced

Re: [HACKERS] kqueue

2017-06-22 Thread Thomas Munro
On Tue, Oct 11, 2016 at 8:08 PM, Torsten Zuehlsdorff wrote: > On 28.09.2016 23:39, Thomas Munro wrote: >> It's difficult to draw any conclusions at this point. > > I'm currently setting up a new FreeBSD machine. Its a FreeBSD 11 with ZFS, > 64 GB RAM and Quad Core.

[HACKERS] Fix comment in xlog.c

2017-06-22 Thread Amit Langote
Attached a patch for $SUBJECT. - * If RecPtr is not NULL, try to read a record at that position. Otherwise + * If RecPtr is valid, try to read a record at that position. Otherwise Commit 4d6d425ab8d addressed the comment above XLogReadRecord() in xlogreader.c, but missed the same above

Re: [HACKERS] Autovacuum launcher occurs error when cancelled by SIGINT

2017-06-22 Thread Michael Paquier
On Thu, Jun 22, 2017 at 2:44 PM, Kuntal Ghosh wrote: > On Thu, Jun 22, 2017 at 9:48 AM, Michael Paquier > wrote: >> On Thu, Jun 22, 2017 at 1:29 AM, Kuntal Ghosh >> wrote: >>> But, I've some more doubts. >>> 1.

Re: [HACKERS] Get stuck when dropping a subscription during synchronizing table

2017-06-22 Thread Kyotaro HORIGUCHI
Hello, At Wed, 21 Jun 2017 22:43:32 -0400, Peter Eisentraut wrote in <501f75c9-c5d6-d023-add0-3b670ac86...@2ndquadrant.com> > On 6/20/17 19:10, Peter Eisentraut wrote: > > On 6/19/17 22:54, Masahiko Sawada wrote: > >>> It seems to me we could just take a

<    1   2