Re: PostmasterIsAlive() in recovery (non-USE_POST_MASTER_DEATH_SIGNAL builds)

2020-11-15 Thread Michael Paquier
On Thu, Sep 24, 2020 at 05:55:17PM +1200, Thomas Munro wrote: > Right, RestoreArchivedFile() uses system(), so I guess it can hang > around for a long time after unexpected postmaster exit on every OS if > the command waits. To respond to various kinds of important > interrupts, I suppose that'd

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-15 Thread Masahiro Ikeda
On 2020-11-12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03, Kyotaro Horiguchi wrote: At Tue, 20 Oct

Re: Add statistics to pg_stat_wal view for wal related parameter tuning

2020-11-15 Thread Masahiro Ikeda
On 2020-11-12 16:27, Fujii Masao wrote: On 2020/11/12 14:58, Fujii Masao wrote: On 2020/11/06 10:25, Masahiro Ikeda wrote: On 2020-10-30 11:50, Fujii Masao wrote: On 2020/10/29 17:03, Masahiro Ikeda wrote: Hi, Thanks for your comments and advice. I updated the patch. On 2020-10-21 18:03,

Re: Tracking cluster upgrade and configuration history

2020-11-15 Thread Ian Lawrence Barwick
2020年11月16日(月) 15:48 Bharath Rupireddy : > > On Thu, Nov 12, 2020 at 4:01 AM Mark Dilger > wrote: > > > > While supporting customers, it would frequently be useful to have more > > information about the history of a cluster. For example, which prior > > versions were ever installed and running

RE: Disable WAL logging to speed up data loading

2020-11-15 Thread osumi.takami...@fujitsu.com
Hi On Thursday, October 29, 2020 11:42 AM Fujii Masao wrote: > BTW, with the patch, I observed that PREPARE TRANSACTION and COMMIT > PREPARED caused assertion failure in my env, as I pointed upthread. > > How does the patch handle other feature depending on the existence of WAL, > e.g.,

Re: Cache relation sizes?

2020-11-15 Thread Thomas Munro
On Tue, Aug 4, 2020 at 2:21 PM Thomas Munro wrote: > On Tue, Aug 4, 2020 at 3:54 AM Konstantin Knizhnik > wrote: > > This shared relation cache can easily store relation size as well. > > In addition it will solve a lot of other problems: > > - noticeable overhead of local relcache warming > > -

Re: Corner-case bug in pg_rewind

2020-11-15 Thread Pavel Borisov
> > > 1. Comment regarding > > -- > > 347 * Check for the possibility that the target is in fact a > direct > > 348 * ancestor of the source. In that case, there is no > divergent history > > 349 * in the target that needs rewinding. > > -- > > are better be

Re: Tracking cluster upgrade and configuration history

2020-11-15 Thread Bharath Rupireddy
On Thu, Nov 12, 2020 at 4:01 AM Mark Dilger wrote: > > While supporting customers, it would frequently be useful to have more > information about the history of a cluster. For example, which prior > versions were ever installed and running on the cluster? Has the cluster > ever been run with

Re: Supporting = operator in gin/gist_trgm_ops

2020-11-15 Thread Alexander Korotkov
On Mon, Nov 16, 2020 at 2:13 AM Jeff Janes wrote: > On Sat, Nov 14, 2020 at 12:31 AM Alexander Korotkov > wrote: >> I went through and revised this patch. I made the documentation >> statement less categorical. pg_trgm gist/gin indexes might have lower >> performance of equality operator

Re: Add Information during standby recovery conflicts

2020-11-15 Thread Masahiko Sawada
On Mon, Nov 9, 2020 at 2:49 PM Drouvot, Bertrand wrote: > > Hi, > > On 11/6/20 3:21 AM, Masahiko Sawada wrote: > > CAUTION: This email originated from outside of the organization. Do not > > click links or open attachments unless you can confirm the sender and know > > the content is safe. > >

RE: Terminate the idle sessions

2020-11-15 Thread kuroda.hay...@fujitsu.com
Dear Li, > Thanks for your advice! Attached v4. I confirmed it. OK. > @@ -30,6 +30,7 @@ typedef enum TimeoutId > STANDBY_DEADLOCK_TIMEOUT, > STANDBY_TIMEOUT, > STANDBY_LOCK_TIMEOUT, > + IDLE_SESSION_TIMEOUT, > IDLE_IN_TRANSACTION_SESSION_TIMEOUT, > /* First

Re: Feature improvement for pg_stat_statements

2020-11-15 Thread Seino Yuki
Due to similar fixed, we have also merged the patches discussed in the following thread. https://commitfest.postgresql.org/30/2736/ The patch is posted on the 2736 side of the thread. Regards.

Re: [PATCH] Add features to pg_stat_statements

2020-11-15 Thread Seino Yuki
Thanks for updating the patch! + pgss_info->dealloc = 0; + SpinLockInit(_info->mutex); + Assert(pgss_info->dealloc == 0); Why is this assertion check necessary? It seems not necessary. + { + Assert(found == found_info); Having

Re: Skip ExecCheckRTPerms in CTAS with no data

2020-11-15 Thread Michael Paquier
On Fri, Nov 13, 2020 at 12:58:52PM +0530, Bharath Rupireddy wrote: > It's not required to set bistate to null as we have allocated myState > with palloc0 in CreateIntoRelDestReceiver, it will anyways be null. > if (!into->skipData) > myState->bistate = GetBulkInsertState(); > >

Re: Corner-case bug in pg_rewind

2020-11-15 Thread Ian Lawrence Barwick
2020年11月10日(火) 18:07 Pavel Borisov : > > I did some effort to review your patch which seems legit to me. Thanks for the review and feedback. > I think some minor things are better to be improved i.e. > > 1. Comment regarding > -- > 347 * Check for the possibility that the target is

Re: Split copy.c

2020-11-15 Thread Justin Pryzby
On Tue, Nov 03, 2020 at 03:15:27PM +1300, David Rowley wrote: > On Tue, 3 Nov 2020 at 07:35, Andres Freund wrote: > > > > On 2020-11-02 19:43:38 +0200, Heikki Linnakangas wrote: > > > On 02/11/2020 19:23, Andres Freund wrote: > > > > On 2020-11-02 11:03:29 +0200, Heikki Linnakangas wrote: > > > >

Re: CLUSTER on partitioned index

2020-11-15 Thread Justin Pryzby
On Wed, Nov 04, 2020 at 08:23:56PM -0600, Justin Pryzby wrote: > On Tue, Oct 27, 2020 at 07:33:12PM -0500, Justin Pryzby wrote: > > I'm attaching a counter-proposal to your catalog change, which preserves > > indisclustered on children of clustered, partitioned indexes, and > > invalidates > >

Re: Add docs stub for recovery.conf

2020-11-15 Thread Craig Ringer
On Sun, Nov 15, 2020 at 1:49 PM David G. Johnston < david.g.johns...@gmail.com> wrote: > On Fri, Nov 13, 2020 at 10:42 AM Bruce Momjian wrote: > >> I think the big problem, and I have seen this repeatedly, is showing up >> with a patch without discussing whether people actually want the >>

Re: Remove unused variable from SharedSort

2020-11-15 Thread Michael Paquier
On Sun, Nov 15, 2020 at 03:49:58PM +0530, Dilip Kumar wrote: > On Sun, Nov 15, 2020 at 12:50 PM Bharath Rupireddy > wrote: >> We could have used that variable for an assert like >> Assert(state->worker <= shared->nTapes) in worker_freeze_result_tape() >> before accessing

Re: Online verification of checksums

2020-11-15 Thread Michael Paquier
On Sun, Nov 15, 2020 at 04:37:36PM +0100, Magnus Hagander wrote: > On Tue, Nov 10, 2020 at 5:44 AM Michael Paquier wrote: >> On Thu, Nov 05, 2020 at 10:57:16AM +0900, Michael Paquier wrote: >>> I was referring to the patch I sent on this thread that fixes the >>> detection of a corruption for the

Re: Move OpenSSL random under USE_OPENSSL_RANDOM

2020-11-15 Thread Michael Paquier
On Sun, Nov 15, 2020 at 12:16:56PM -0500, Tom Lane wrote: > The obvious problem with this is that if !USE_OPENSSL, we will not have > pulled in openssl's headers. FWIW, I argued upthread against including this part because it is useless: if not building with OpenSSL, we'll never have the base to

Re: Supporting = operator in gin/gist_trgm_ops

2020-11-15 Thread Jeff Janes
On Sat, Nov 14, 2020 at 12:31 AM Alexander Korotkov wrote: > > I went through and revised this patch. I made the documentation > statement less categorical. pg_trgm gist/gin indexes might have lower > performance of equality operator search than B-tree. So, we can't > claim the B-tree index

Re: Move OpenSSL random under USE_OPENSSL_RANDOM

2020-11-15 Thread Tom Lane
Magnus Hagander writes: > I think the defensive-in-code instead of defensive-in-docs is a really > strong argument, so I have pushed it as such. I notice warnings that I think are caused by this patch on some buildfarm members, eg drongo| 2020-11-15 06:59:05 |

Re: list of extended statistics on psql

2020-11-15 Thread Tomas Vondra
Thanks, It's better to always post the whole patch series, so that cfbot can test it properly. Sending just 0003 separately kind breaks that. Also, 0003 seems to only tweak the .sql file, not the expected output, and there actually seems to be two places that mistakenly use \dx (so listing

Re: Online checksums patch - once again

2020-11-15 Thread Magnus Hagander
On Fri, Nov 13, 2020 at 12:22 PM Heikki Linnakangas wrote: > On 12/11/2020 15:17, Daniel Gustafsson wrote: > >> On 5 Oct 2020, at 14:14, Heikki Linnakangas wrote: > >> I would expect the checksums worker to be automatically started at > postmaster startup. Can we make that happen? > > > > A

Re: Online verification of checksums

2020-11-15 Thread Magnus Hagander
On Tue, Nov 10, 2020 at 5:44 AM Michael Paquier wrote: > On Thu, Nov 05, 2020 at 10:57:16AM +0900, Michael Paquier wrote: > > I was referring to the patch I sent on this thread that fixes the > > detection of a corruption for the zero-only case and where pd_lsn > > and/or pg_upper are trashed by

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

2020-11-15 Thread Heikki Linnakangas
On 15/11/2020 09:07, Tom Lane wrote: I wrote: Not sure if you noticed, but piculet has twice failed the 007_standby_source.pl test that was added by 9c4f5192f: ... Now, I'm not sure what to make of that, but I can't help noticing that piculet uses --disable-atomics while francolin uses

Re: More time spending with "delete pending"

2020-11-15 Thread Alexander Lakhin
15.11.2020 08:00, Alexander Lakhin wrote: > And it rises another question, what if pg_ls_dir_files() is called for a > directory where hundreds or thousands of files are really inaccessible > due to restrictions? > I mean that using CreateFile() in the modified stat() implementation can > be

Re: Supporting = operator in gin/gist_trgm_ops

2020-11-15 Thread Erik Rijkers
On 2020-11-15 06:55, Alexander Korotkov wrote: > Sorry to be nitpicking - it's the one thing I'm really good at :P Hi Alexander, The last touch... (you forgot the missing 'the') thanks! Erik Rijkers --- doc/src/sgml/pgtrgm.sgml.orig 2020-11-15 08:00:54.607816533 +0100 +++

Re: Remove unused variable from SharedSort

2020-11-15 Thread Dilip Kumar
On Sun, Nov 15, 2020 at 12:50 PM Bharath Rupireddy wrote: > > On Thu, Nov 12, 2020 at 5:29 PM Dilip Kumar wrote: > > > > While going through the code I noticed that the nTapes member in > > SharedSort is unused. This is just initialized with nworkers but > > never used. The attached patch

Re: Terminate the idle sessions

2020-11-15 Thread Li Japin
On Nov 13, 2020, at 6:27 PM, kuroda.hay...@fujitsu.com wrote: I read your patch, and I think the documentation is too simple to avoid all problems. (I think if some connection pooling is used, the same problem will occur.) Could you add some explanations in