Patch: Don't set LoadedSSL unless secure_initialize succeeds

2022-05-21 Thread Gurjeet Singh
The initialization in PostmasterMain() blindly turns on LoadedSSL, irrespective of the outcome of secure_initialize(). I don't think that's how it should behave, primarily because of the pattern followed by the other places that call secure_initialize(). This patch makes PostmasterMain() behave id

Re: tweak to a few index tests to hits ambuildempty() routine.

2022-05-21 Thread Noah Misch
On Sun, May 22, 2022 at 04:24:16PM +1200, Thomas Munro wrote: > On Sat, May 21, 2022 at 6:15 PM Noah Misch wrote: > > On Mon, Apr 25, 2022 at 10:05:08AM -0400, Tom Lane wrote: > > > Alvaro Herrera writes: > > > > Hmm, so 027_stream_regress.pl is not prepared to deal with any unlogged > > > > tabl

Re: Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs

2022-05-21 Thread mahendrakar s
Hi Bharath, +1. This seems to be good idea to have checks on upper bound for the max_wal_size and min_wal_size. We have seen customers play with these parameters and ran into issues. It will also be better to consider all the control parameters and have a min/max checks on them as well. Thanks, M

Re: tweak to a few index tests to hits ambuildempty() routine.

2022-05-21 Thread Thomas Munro
On Sat, May 21, 2022 at 6:15 PM Noah Misch wrote: > On Mon, Apr 25, 2022 at 10:05:08AM -0400, Tom Lane wrote: > > Alvaro Herrera writes: > > > Hmm, so 027_stream_regress.pl is not prepared to deal with any unlogged > > > tables that may be left in the regression database (which is what my > > > s

Re: docs: mention "pg_read_all_stats" in "track_activities" description

2022-05-21 Thread Michael Paquier
On Sat, May 21, 2022 at 11:57:43AM -0700, Nathan Bossart wrote: > Sorry, I should've noticed this yesterday. This should probably follow > 6198420's example and say "roles with privileges of the pg_read_all_stats > role" instead of "members of the pg_read_all_stats role." Yes, I saw that, but tha

Re: check for null value before looking up the hash function

2022-05-21 Thread Tomas Vondra
On 5/21/22 19:24, David G. Johnston wrote: > On Sat, May 21, 2022 at 10:04 AM Ranier Vilela > wrote: > > Em sáb., 21 de mai. de 2022 às 13:13, Tom Lane > escreveu: > > Ranier Vilela mailto:ranier...@gmail.com>> > wri

Re: docs: mention "pg_read_all_stats" in "track_activities" description

2022-05-21 Thread Nathan Bossart
On Sat, May 21, 2022 at 12:28:58PM +0900, Michael Paquier wrote: > Indeed, it is a good idea to add this information. Will apply and > backpatch accordingly. Sorry, I should've noticed this yesterday. This should probably follow 6198420's example and say "roles with privileges of the pg_read_all

Unsubscribing from this mailing list.

2022-05-21 Thread Israa Odeh
Greetings!Please I need to cancel my subscription to this mailing list, could you delete me from it, or tell me how to unsubscribe. Best Regards,Israa Odeh. Sent from Mail for Windows 

Re: Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs

2022-05-21 Thread rajesh singarapu
Hi Bharath, Could you explain why min wal size must be at least twice but not equal to wal_segment_size ? thanks Rajesh On Sat, May 21, 2022 at 7:08 PM Bharath Rupireddy wrote: > > Hi, > > Currently postgres allows setting any value for max_wal_size or > min_wal_size, not enforcing "at least tw

Re: definition of CalculateMaxmumSafeLSN

2022-05-21 Thread Tom Lane
Bharath Rupireddy writes: > On Mon, Feb 28, 2022 at 7:31 PM Sergei Kornilov wrote: >> I just spotted in src/include/access/xlog.h: >> extern XLogRecPtr CalculateMaxmumSafeLSN(void); >> This function doesn't seem to be used anywhere or even defined? "git grep >> CalculateMaxmumSafeLSN" shows only

Re: check for null value before looking up the hash function

2022-05-21 Thread David G. Johnston
On Sat, May 21, 2022 at 10:04 AM Ranier Vilela wrote: > Em sáb., 21 de mai. de 2022 às 13:13, Tom Lane > escreveu: > >> Ranier Vilela writes: >> > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < >> > tomas.von...@enterprisedb.com> escreveu: >> >> That's a quite bold claim, and yet you have

Re: check for null value before looking up the hash function

2022-05-21 Thread Ranier Vilela
Em sáb., 21 de mai. de 2022 às 13:13, Tom Lane escreveu: > Ranier Vilela writes: > > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < > > tomas.von...@enterprisedb.com> escreveu: > >> That's a quite bold claim, and yet you haven't supported it by any > >> argument whatsoever. Trade-offs betw

Re: check for null value before looking up the hash function

2022-05-21 Thread Tom Lane
Ranier Vilela writes: > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < > tomas.von...@enterprisedb.com> escreveu: >> That's a quite bold claim, and yet you haven't supported it by any >> argument whatsoever. Trade-offs between complexity and efficiency are a >> crucial development task, so c

Re: check for null value before looking up the hash function

2022-05-21 Thread David G. Johnston
On Sat, May 21, 2022 at 8:32 AM Ranier Vilela wrote: > Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < > tomas.von...@enterprisedb.com> escreveu: > >> >> >> On 5/21/22 15:06, Ranier Vilela wrote: >> >>Zhihong Yu writes: >> >>> I was looking at the code in hash_record() >> >>> of src/backend

Re: check for null value before looking up the hash function

2022-05-21 Thread Ranier Vilela
Em sáb., 21 de mai. de 2022 às 12:05, Tomas Vondra < tomas.von...@enterprisedb.com> escreveu: > > > On 5/21/22 15:06, Ranier Vilela wrote: > >>Zhihong Yu writes: > >>> I was looking at the code in hash_record() > >>> of src/backend/utils/adt/rowtypes.c > >>> It seems if nulls[i] is true, we don't

Re: check for null value before looking up the hash function

2022-05-21 Thread Tomas Vondra
On 5/21/22 15:06, Ranier Vilela wrote: >>Zhihong Yu writes: >>> I was looking at the code in hash_record() >>> of src/backend/utils/adt/rowtypes.c >>> It seems if nulls[i] is true, we don't need to look up the hash function. > >>I don't think this is worth changing. It complicates the logic, >

Enforce "max_wal_size/ min_wal_size must be at least twice wal_segment_size" limit while setting GUCs

2022-05-21 Thread Bharath Rupireddy
Hi, Currently postgres allows setting any value for max_wal_size or min_wal_size, not enforcing "at least twice as wal_segment_size" limit [1]. This isn't a problem if the server continues to run, however, the server can't come up after a crash or restart or maintenance or upgrade (goes to a conti

Re: check for null value before looking up the hash function

2022-05-21 Thread Ranier Vilela
Em sáb., 21 de mai. de 2022 às 10:06, Ranier Vilela escreveu: > >Zhihong Yu writes: > >> I was looking at the code in hash_record() > >> of src/backend/utils/adt/rowtypes.c > >> It seems if nulls[i] is true, we don't need to look up the hash > function. > > >I don't think this is worth changing.

doc: CREATE FOREIGN TABLE .. PARTITION OF .. DEFAULT

2022-05-21 Thread Justin Pryzby
It looks like the docs weren't updated in 6f6b99d13 for v11. The docs also seem to omit "FOR VALUES" literal. And don't define partition_bound_spec (which I didn't fix here). diff --git a/doc/src/sgml/ref/create_foreign_table.sgml b/doc/src/sgml/ref/create_foreign_table.sgml index b374d8645db..1

Re: check for null value before looking up the hash function

2022-05-21 Thread Ranier Vilela
>Zhihong Yu writes: >> I was looking at the code in hash_record() >> of src/backend/utils/adt/rowtypes.c >> It seems if nulls[i] is true, we don't need to look up the hash function. >I don't think this is worth changing. It complicates the logic, >rendering it unlike quite a few other functions w

Re: definition of CalculateMaxmumSafeLSN

2022-05-21 Thread Bharath Rupireddy
On Mon, Feb 28, 2022 at 7:31 PM Sergei Kornilov wrote: > > Hello > I just spotted in src/include/access/xlog.h: > extern XLogRecPtr CalculateMaxmumSafeLSN(void); > > This function doesn't seem to be used anywhere or even defined? "git grep > CalculateMaxmumSafeLSN" shows only this line. > Was add

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-05-21 Thread Amit Kapila
On Mon, Oct 11, 2021 at 11:58 AM Masahiko Sawada wrote: > > It's much simpler than mine. I think that creating an entry of a > catalog-changed transaction in the reorder buffer before > SunapBuildCommitTxn() is the right direction. > > After more thought, given DDLs are not likely to happen than D

Re: PG15 beta1 fix pg_stat_statements view document

2022-05-21 Thread Michael Paquier
On Sat, May 21, 2022 at 03:36:10AM +, Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Thank you for your comment. > I attached the fixed patch. Thanks, applied. -- Michael signature.asc Description: PGP signature

Re: CPU time for pg_stat_statement

2022-05-21 Thread Julien Rouhaud
Hi, On Sat, May 21, 2022 at 12:21:49AM +0300, Michail Nikolaev wrote: > > > This might be interesting: > > https://github.com/powa-team/pg_stat_kcache > > Oh, nice, looks like it could help me to reduce CPU and test my > assumption (using exec_user_time and exec_system_time). > > BWT, do you know

Re:Remove an undefined function CalculateMaxmumSafeLSN

2022-05-21 Thread Sergei Kornilov
Hello Yes, I already wrote about this artifact. And created CF app entry so it wouldn't get lost: https://commitfest.postgresql.org/38/3616/ regards, Sergei

Fix unnecessary includes and comments in 019_replslot_limit.pl, 007_wal.pl and 004_timeline_switch.pl

2022-05-21 Thread Bharath Rupireddy
Hi, While working on a feature, I noticed that there are unnecessary includes of "use File::Path qw(rmtree);" in some TAP test files and also some wrong comments in 019_replslot_limit.pl. Attaching a patch to fix these. Regards, Bharath Rupireddy. v1-0001-Fix-unnecessary-includes-and-comments-i

Remove an undefined function CalculateMaxmumSafeLSN

2022-05-21 Thread Bharath Rupireddy
Hi, While working on a feature, I came across an undefined (declaration-only) function CalculateMaxmumSafeLSN added by commit c655077 [1]. Attaching a patch to remove it. [1] commit c6550776394e25c1620bc8258427c8f1d448080d Author: Alvaro Herrera Date: Tue Apr 7 18:35:00 2020 -0400 Allow u