Re: display offset along with block number in vacuum errors

2020-08-20 Thread Amit Kapila
On Thu, Aug 20, 2020 at 12:18 PM Masahiko Sawada wrote: > > On Thu, 20 Aug 2020 at 14:01, Amit Kapila wrote: > > > > On Wed, Aug 19, 2020 at 12:54 PM Masahiko Sawada > > wrote: > > > > Here, we can notice that for the index, we are getting context > > information but not for the heap. The reason

Re: Asynchronous Append on postgres_fdw nodes.

2020-08-20 Thread Kyotaro Horiguchi
At Wed, 19 Aug 2020 23:25:36 -0500, Justin Pryzby wrote in > On Thu, Jul 02, 2020 at 11:14:48AM +0900, Kyotaro Horiguchi wrote: > > As the result of a discussion with Fujita-san off-list, I'm going to > > hold off development until he decides whether mine or Thomas' is > > better. > > The lates

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Fujii Masao
On 2020/08/20 13:00, David Rowley wrote: On Thu, 20 Aug 2020 at 03:31, Fujii Masao wrote: With the patch, for example, whatever "summary" settng is, "buffers on" displays the planner's buffer usage if it happens. I forgot to mention earlier, you'll also need to remove the part in the docs t

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Pierre Giraud
Can you please show what the plan would look like for? =# explain (buffers on, summary on, format JSON) select * from t; Le 20/08/2020 à 09:58, Fujii Masao a écrit : > > > On 2020/08/20 13:00, David Rowley wrote: >> On Thu, 20 Aug 2020 at 03:31, Fujii Masao >> wrote: >>> With the patch, for

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Fujii Masao
On 2020/08/20 17:03, Pierre Giraud wrote: Can you please show what the plan would look like for? =# explain (buffers on, summary on, format JSON) select * from t; With my patch, the following is reported in that case. =# explain (buffers on, summary on, format JSON) select * from pg_class;

Re: please update ps display for recovery checkpoint

2020-08-20 Thread Michael Paquier
On Wed, Aug 19, 2020 at 12:20:50AM +, k.jami...@fujitsu.com wrote: > On Wednesday, August 19, 2020 7:53 AM (GMT+9), Justin Pryzby wrote: >> During crash recovery, the server writes this to log: >> Please change to say "recovery checkpoint" or similar, as I mentioned here. >> https://www.postgr

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Dilip Kumar
On Wed, Aug 19, 2020 at 1:35 PM Dilip Kumar wrote: > > On Wed, Aug 19, 2020 at 12:20 PM Amit Kapila wrote: > > > > On Wed, Aug 19, 2020 at 10:10 AM Amit Kapila > > wrote: > > > > > > On Mon, Aug 17, 2020 at 6:29 PM Dilip Kumar wrote: > > > > > > > > > > > > In last patch v49-0001, there is one

Re: Include access method in listTables output

2020-08-20 Thread Georgios
‐‐‐ Original Message ‐‐‐ On Thursday, 20 August 2020 07:31, Justin Pryzby wrote: > On Mon, Aug 17, 2020 at 11:10:05PM +0530, vignesh C wrote: > > > On Sat, Aug 1, 2020 at 8:12 AM vignesh C vignes...@gmail.com wrote: > > > > > > > +-- access method column should not be displayed for seque

Re: "ccold" left by reindex concurrently are droppable?

2020-08-20 Thread Julien Rouhaud
On Thu, Aug 20, 2020 at 7:17 AM Michael Paquier wrote: > > On Wed, Aug 19, 2020 at 05:13:12PM -0400, Alvaro Herrera wrote: > > In other words I propose to reword this paragraph as follows: > > > >If the transient index created during the concurrent operation is > >suffixed ccnew, the recom

Re: Refactor pg_rewind code and make it work against a standby

2020-08-20 Thread Kyotaro Horiguchi
Hello. At Wed, 19 Aug 2020 15:50:16 +0300, Heikki Linnakangas wrote in > Hi, > > I started to hack on making pg_rewind crash-safe (see [1]), but I > quickly got side-tracked into refactoring and tidying up up the code > in general. I ended up with this series of patches: ^^; > The first four

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Amit Kapila
On Thu, Aug 20, 2020 at 1:41 PM Dilip Kumar wrote: > > On Wed, Aug 19, 2020 at 1:35 PM Dilip Kumar wrote: > > > > On Wed, Aug 19, 2020 at 12:20 PM Amit Kapila > > wrote: > > > > > > On Wed, Aug 19, 2020 at 10:10 AM Amit Kapila > > > wrote: > > > > > > > > On Mon, Aug 17, 2020 at 6:29 PM Dilip

Fix a couple of typos in JIT

2020-08-20 Thread David Rowley
Hi, I was just looking over the JIT code and noticed a few comment and documentation typos. The attached fixes them. I'll push this in my UTC+12 morning if nobody objects to any of the changes before then. Unsure if it'll be worth backpatching or not. David fix_a_few_jit_typos.patch Descript

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread David Rowley
On Thu, 20 Aug 2020 at 19:58, Fujii Masao wrote: > > On 2020/08/20 13:00, David Rowley wrote: > > I forgot to mention earlier, you'll also need to remove the part in > > the docs that mentions BUFFERS requires ANALYZE. > > Thanks for the review! I removed that. > Attached is the updated version of

Re: Fix a couple of typos in JIT

2020-08-20 Thread Abhijit Menon-Sen
At 2020-08-20 22:19:49 +1200, dgrowle...@gmail.com wrote: > > I was just looking over the JIT code and noticed a few comment and > documentation typos. The attached fixes them. The first change does not seem to be correct: -That this is done at query execution time, possibly even only in cases -

Re: Fix a couple of typos in JIT

2020-08-20 Thread David Rowley
On Thu, 20 Aug 2020 at 22:29, Abhijit Menon-Sen wrote: > > At 2020-08-20 22:19:49 +1200, dgrowle...@gmail.com wrote: > > > > I was just looking over the JIT code and noticed a few comment and > > documentation typos. The attached fixes them. > > The first change does not seem to be correct: > > -

Re: New statistics for tuning WAL buffer size

2020-08-20 Thread Fujii Masao
On 2020/08/19 14:10, Masahiro Ikeda wrote: On 2020-08-19 13:49, tsunakawa.ta...@fujitsu.com wrote: From: Masahiro Ikeda If my understanding is correct, we have to measure the performance impact first. Do you know HariBabu is now trying to solve it? If not, I will try to modify patches to ap

Re: New statistics for tuning WAL buffer size

2020-08-20 Thread Fujii Masao
On 2020/08/20 20:01, Fujii Masao wrote: On 2020/08/19 14:10, Masahiro Ikeda wrote: On 2020-08-19 13:49, tsunakawa.ta...@fujitsu.com wrote: From: Masahiro Ikeda If my understanding is correct, we have to measure the performance impact first. Do you know HariBabu is now trying to solve it?

Re: Fix a couple of typos in JIT

2020-08-20 Thread Abhijit Menon-Sen
At 2020-08-20 22:51:41 +1200, dgrowle...@gmail.com wrote: > > > +This is done at query execution time, possibly even only in cases where > > +the relevant task is done a number of times, makes it JIT, rather than > > +ahead-of-time (AOT). Given the way JIT compilation is used in PostgreSQL, > > +th

Re: new heapcheck contrib module

2020-08-20 Thread Amul Sul
On Thu, Aug 20, 2020 at 8:00 AM Mark Dilger wrote: > > > > > On Aug 16, 2020, at 9:37 PM, Amul Sul wrote: > > > > In addition to this, I found a few more things while reading v13 patch are > > as > > below: > > > > Patch v13-0001: > > > > - > > +#include "amcheck.h" > > > > Not in correct order.

Re: Libpq support to connect to standby server as priority

2020-08-20 Thread Peter Smith
On Thu, Aug 20, 2020 at 10:26 AM Greg Nancarrow wrote: > I have updated the patch (attached) based on your comments, with > adjustments made for additional changes based on feedback (which I > tend to agree with) from Robert Haas and Tsunakawa san, who suggested > read-write/read-only should be f

Re: extension patch of CREATE OR REPLACE TRIGGER

2020-08-20 Thread Peter Smith
On Thu, Aug 20, 2020 at 12:11 PM osumi.takami...@fujitsu.com wrote: > I have fixed my patch again. Hi Osumi-san, FYI - The latest patch (v06) has conflicts when applied. Kind Regards, Peter Smith. Fujitsu Australia

Small doubt on update a partition when some rows need to move among partition

2020-08-20 Thread movead...@highgo.ca
Hello, I am trying to handle the limit that we can't do a tuple move caused by BEFORE TRIGGER, during which I get two doubt points: The first issue: In ExecBRUpdateTriggers() or ExecBRInsertTriggers() function why we need to check the result slot after every trigger call. If we should check the

Re: display offset along with block number in vacuum errors

2020-08-20 Thread Amit Kapila
On Thu, Aug 20, 2020 at 12:32 PM Amit Kapila wrote: > > On Thu, Aug 20, 2020 at 12:18 PM Masahiko Sawada > wrote: > > > > On Thu, 20 Aug 2020 at 14:01, Amit Kapila wrote: > > > > > > On Wed, Aug 19, 2020 at 12:54 PM Masahiko Sawada > > > wrote: > > > > > > Here, we can notice that for the index

Re: Small doubt on update a partition when some rows need to move among partition

2020-08-20 Thread Ashutosh Bapat
On Thu, Aug 20, 2020 at 5:22 PM movead...@highgo.ca wrote: > > Hello, > > I am trying to handle the limit that we can't do a tuple move caused by > BEFORE TRIGGER, > during which I get two doubt points: > > The first issue: > In ExecBRUpdateTriggers() or ExecBRInsertTriggers() function why we nee

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Julien Rouhaud
On Thu, Aug 20, 2020 at 12:29 PM David Rowley wrote: > > On Thu, 20 Aug 2020 at 19:58, Fujii Masao wrote: > > > > On 2020/08/20 13:00, David Rowley wrote: > > > I forgot to mention earlier, you'll also need to remove the part in > > > the docs that mentions BUFFERS requires ANALYZE. > > > > Thank

Re: Fix a couple of typos in JIT

2020-08-20 Thread Andres Freund
Hi, On 2020-08-20 15:59:26 +0530, Abhijit Menon-Sen wrote: > The original sentence may not be the most shining example of > sentence-ry, but it is correct, and removing the "That" breaks it. That made me laugh ;) David, sounds good, after adapting to Abhijit's concerns. Greetings, Andres Freun

Re: Transactions involving multiple postgres foreign servers, take 2

2020-08-20 Thread Fujii Masao
On 2020/07/27 15:59, Masahiko Sawada wrote: On Thu, 23 Jul 2020 at 22:51, Muhammad Usama wrote: On Wed, Jul 22, 2020 at 12:42 PM Masahiko Sawada wrote: On Sat, 18 Jul 2020 at 01:55, Fujii Masao wrote: On 2020/07/16 14:47, Masahiko Sawada wrote: On Tue, 14 Jul 2020 at 11:19, Fuji

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Fujii Masao
On 2020/08/20 22:34, Julien Rouhaud wrote: On Thu, Aug 20, 2020 at 12:29 PM David Rowley wrote: On Thu, 20 Aug 2020 at 19:58, Fujii Masao wrote: On 2020/08/20 13:00, David Rowley wrote: I forgot to mention earlier, you'll also need to remove the part in the docs that mentions BUFFERS re

ReplicationSlotsComputeRequiredXmin seems pretty questionable

2020-08-20 Thread Tom Lane
While trying to make sense of Adam Sjøgren's problem [1], I found myself staring at ReplicationSlotsComputeRequiredXmin() in slot.c. It seems to me that that is very shaky code, on two different grounds: 1. Sometimes it's called with ProcArrayLock already held exclusively. This means that any dela

Re: "ccold" left by reindex concurrently are droppable?

2020-08-20 Thread Alvaro Herrera
Thanks, Michael and Julien! Pushed to 12-master, with a slight rewording to use the passive voice, hopefully matching the surrounding text. I also changed "temporary" to "transient" in another line, for consistency. -- Álvaro Herrerahttps://www.2ndQuadrant.com/ PostgreSQL Develo

Re: language cleanups in code and docs

2020-08-20 Thread Ashwin Agrawal
On Wed, Jun 17, 2020 at 9:27 AM David Steele wrote: > On 6/17/20 12:08 PM, Magnus Hagander wrote: > > On Wed, Jun 17, 2020 at 4:15 PM Andrew Dunstan > > mailto:andrew.duns...@2ndquadrant.com>> > > > > > I'm not sure I like doing s/Black/Block/ here. It reads oddly. There > are > > too man

Re: proposal - function string_to_table

2020-08-20 Thread Pavel Stehule
Hi čt 20. 8. 2020 v 4:07 odesílatel Peter Smith napsal: > Hi. > > I have been looking at the patch: string_to_table-20200706-2.patch > > Below are some review comments for your consideration. > > > > COMMENT func.sgml (style) > > + > +splits string into table using supplied d

Re: deb repo doesn't have latest. or possible to update web page?

2020-08-20 Thread Roger Pack
On Wed, Aug 19, 2020 at 11:23 AM Magnus Hagander wrote: > > > > On Wed, Aug 19, 2020 at 7:04 PM Roger Pack wrote: >> >> As a note I tried to use the deb repo today: >> >> https://www.postgresql.org/download/linux/debian/ >> >> with an old box on Wheezy. >> It only seems to have binaries up to pos

Re: Fix a couple of typos in JIT

2020-08-20 Thread David Rowley
On Fri, 21 Aug 2020 at 02:25, Andres Freund wrote: > David, sounds good, after adapting to Abhijit's concerns. Thank you both for having a look. Now pushed. David

Problems with the FSM, heap fillfactor, and temporal locality

2020-08-20 Thread Peter Geoghegan
I'm concerned about how the FSM gives out pages to heapam. Disabling the FSM entirely helps TPC-C/BenchmarkSQL, which uses non-default heap fillfactors for most tables [1]. Testing has shown that this actually increases throughput for the benchmark (as measured in TPM) by 5% - 9%, even though my ap

Re: SyncRepLock acquired exclusively in default configuration

2020-08-20 Thread Masahiko Sawada
On Wed, 19 Aug 2020 at 21:41, Fujii Masao wrote: > > > > On 2020/08/12 15:32, Masahiko Sawada wrote: > > On Wed, 12 Aug 2020 at 14:06, Asim Praveen wrote: > >> > >> > >> > >>> On 11-Aug-2020, at 8:57 PM, Robert Haas wrote: > >>> > >>> I think this gets to the root of the issue. If we check the f

Fix typo in procarrary.c

2020-08-20 Thread Masahiko Sawada
Hi, I've attached the patch for $subject. s/replications lots/replication slots/ Regards, -- Masahiko Sawadahttp://www.2ndQuadrant.com/ PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services fix_typo.patch Description: Binary data

Re: Fix typo in procarrary.c

2020-08-20 Thread Fujii Masao
On 2020/08/21 10:58, Masahiko Sawada wrote: Hi, I've attached the patch for $subject. s/replications lots/replication slots/ Thanks for the patch! Also it's better to s/replications slots/replication slots/ ? --- a/src/backend/storage/ipc/procarray.c +++ b/src/backend/storage/ipc/procarr

Re: Creating foreign key on partitioned table is too slow

2020-08-20 Thread Amit Langote
On Thu, Aug 20, 2020 at 10:50 AM Amit Langote wrote: On Thu, Aug 20, 2020 at 3:06 AM Alvaro Herrera wrote: > > On 2020-Aug-19, Amit Langote wrote: > > > On Thu, Aug 6, 2020 at 4:25 PM kato-...@fujitsu.com > > > wrote: > > > > On Wednesday, August 5, 2020 9:43 AM I wrote: > > > > > I'll report t

RE: New statistics for tuning WAL buffer size

2020-08-20 Thread tsunakawa.ta...@fujitsu.com
From: Fujii Masao > I agree to expose the number of WAL write caused by full of WAL buffers. > It's helpful when tuning wal_buffers size. Haribabu separated that number > into two fields in his patch; one is the number of WAL write by backend, > and another is by background processes and workers.

RE: New statistics for tuning WAL buffer size

2020-08-20 Thread tsunakawa.ta...@fujitsu.com
From: Fujii Masao > Just idea; it may be worth exposing the number of when new WAL file is > created and zero-filled. This initialization may have impact on > the performance of write-heavy workload generating lots of WAL. If this > number is reported high, to reduce the number of this initializat

Re: New statistics for tuning WAL buffer size

2020-08-20 Thread Fujii Masao
On 2020/08/21 12:08, tsunakawa.ta...@fujitsu.com wrote: From: Fujii Masao Just idea; it may be worth exposing the number of when new WAL file is created and zero-filled. This initialization may have impact on the performance of write-heavy workload generating lots of WAL. If this number is r

Re: Fix typo in procarrary.c

2020-08-20 Thread Masahiko Sawada
On Fri, 21 Aug 2020 at 11:18, Fujii Masao wrote: > > > > On 2020/08/21 10:58, Masahiko Sawada wrote: > > Hi, > > > > I've attached the patch for $subject. > > > > s/replications lots/replication slots/ > > Thanks for the patch! > > Also it's better to s/replications slots/replication slots/ ? > >

Re: Fix typo in procarrary.c

2020-08-20 Thread Fujii Masao
On 2020/08/21 12:29, Masahiko Sawada wrote: On Fri, 21 Aug 2020 at 11:18, Fujii Masao wrote: On 2020/08/21 10:58, Masahiko Sawada wrote: Hi, I've attached the patch for $subject. s/replications lots/replication slots/ Thanks for the patch! Also it's better to s/replications slots/re

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Amit Kapila
On Thu, Aug 20, 2020 at 5:42 PM Dilip Kumar wrote: > > On Thu, Aug 20, 2020 at 2:30 PM Amit Kapila wrote: > > > > > > Right, I think this can happen if one has changed those by BufFileSeek > > before doing truncate. We should fix that case as well. > > Right. > > > > I will work on those along w

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Amit Kapila
On Fri, Aug 21, 2020 at 9:14 AM Amit Kapila wrote: > > On Thu, Aug 20, 2020 at 5:42 PM Dilip Kumar wrote: > > > > On Thu, Aug 20, 2020 at 2:30 PM Amit Kapila wrote: > > > > > > > > > Right, I think this can happen if one has changed those by BufFileSeek > > > before doing truncate. We should fix

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Amit Kapila
On Fri, Aug 21, 2020 at 9:14 AM Amit Kapila wrote: > > On Thu, Aug 20, 2020 at 5:42 PM Dilip Kumar wrote: > > > > On Thu, Aug 20, 2020 at 2:30 PM Amit Kapila wrote: > > > > > > > > > Right, I think this can happen if one has changed those by BufFileSeek > > > before doing truncate. We should fix

Re: Libpq support to connect to standby server as priority

2020-08-20 Thread Greg Nancarrow
Hi Peter, Thanks for the further review, an updated patch is attached. Please see my responses to your comments below: On Thu, Aug 20, 2020 at 11:36 AM Peter Smith wrote: > > > COMMENT (help text) > > The help text is probably accurate but it does seem a bit confusing still. > > ... > > IMO if

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Dilip Kumar
On Fri, Aug 21, 2020 at 9:14 AM Amit Kapila wrote: > > On Thu, Aug 20, 2020 at 5:42 PM Dilip Kumar wrote: > > > > On Thu, Aug 20, 2020 at 2:30 PM Amit Kapila wrote: > > > > > > > > > Right, I think this can happen if one has changed those by BufFileSeek > > > before doing truncate. We should fix

Re: PATCH: logical_work_mem and logical streaming of large in-progress transactions

2020-08-20 Thread Dilip Kumar
On Fri, Aug 21, 2020 at 10:20 AM Amit Kapila wrote: > > On Fri, Aug 21, 2020 at 9:14 AM Amit Kapila wrote: > > > > On Thu, Aug 20, 2020 at 5:42 PM Dilip Kumar wrote: > > > > > > On Thu, Aug 20, 2020 at 2:30 PM Amit Kapila > > > wrote: > > > > > > > > > > > > Right, I think this can happen if o

Re: [PG13] Planning (time + buffers) data structure in explain plan (format text)

2020-08-20 Thread Pierre Giraud
Le 20/08/2020 à 17:41, Fujii Masao a écrit : > > > On 2020/08/20 22:34, Julien Rouhaud wrote: >> On Thu, Aug 20, 2020 at 12:29 PM David Rowley >> wrote: >>> >>> On Thu, 20 Aug 2020 at 19:58, Fujii Masao >>> wrote: On 2020/08/20 13:00, David Rowley wrote: > I forgot to mention earl

Re: Asymmetric partition-wise JOIN

2020-08-20 Thread Andrey V. Lepikhov
On 7/1/20 2:10 PM, Daniel Gustafsson wrote: On 27 Dec 2019, at 08:34, Kohei KaiGai wrote: The attached v2 fixed the problem, and regression test finished correctly. This patch no longer applies to HEAD, please submit an rebased version. Marking the entry Waiting on Author in the meantime.

Re: Fix typo in procarrary.c

2020-08-20 Thread Masahiko Sawada
On Fri, 21 Aug 2020 at 12:39, Fujii Masao wrote: > > > > On 2020/08/21 12:29, Masahiko Sawada wrote: > > On Fri, 21 Aug 2020 at 11:18, Fujii Masao > > wrote: > >> > >> > >> > >> On 2020/08/21 10:58, Masahiko Sawada wrote: > >>> Hi, > >>> > >>> I've attached the patch for $subject. > >>> > >>> s/