Re: optimize lookups in snapshot [sub]xip arrays

2022-07-23 Thread Zhang Mingli
Hi, all > > if (!snapshot->suboverflowed) > { > /* we have full data, so search subxip */ > - int32 j; > - > - for (j = 0; j < snapshot->subxcnt; j++) > - { > -

Re: redacting password in SQL statement in server log

2022-07-23 Thread Zhihong Yu
On Sat, Jul 23, 2022 at 5:27 PM Tom Lane wrote: > Zhihong Yu writes: > > Currently, in situation such as duplicate role creation, the server log > > would show something such as the following: > > > 2022-07-22 13:48:18.251 UTC [330] STATEMENT: CREATE ROLE test WITH LOGIN > > PASSWORD 'foobar';

Re: redacting password in SQL statement in server log

2022-07-23 Thread Tom Lane
Zhihong Yu writes: > Currently, in situation such as duplicate role creation, the server log > would show something such as the following: > 2022-07-22 13:48:18.251 UTC [330] STATEMENT: CREATE ROLE test WITH LOGIN > PASSWORD 'foobar'; > The password itself should be redacted before logging the

Re: Cleaning up historical portability baggage

2022-07-23 Thread Tom Lane
Thomas Munro writes: > Here are some more, a couple of which I posted before but I've now > gone a bit further with them in terms of removing configure checks > etc: After looking through these briefly, I'm pretty concerned about whether this won't break our Cygwin build in significant ways. For

redacting password in SQL statement in server log

2022-07-23 Thread Zhihong Yu
Hi, Currently, in situation such as duplicate role creation, the server log would show something such as the following: 2022-07-22 13:48:18.251 UTC [330] STATEMENT: CREATE ROLE test WITH LOGIN PASSWORD 'foobar'; The password itself should be redacted before logging the statement. Here is

Re: Cleaning up historical portability baggage

2022-07-23 Thread Tom Lane
Thomas Munro writes: > Some of these depend on SUSv2 options (not just "base"), but we > already do that (fsync, ...) and they're all features that are by now > ubiquitous, which means the fallback code is untested and the probes > are pointless. Reading this, it occurred to me that it'd be

PSA for folks forwarding personal email domains to Gmail

2022-07-23 Thread Tom Lane
If you happen to have noticed that you aren't getting any email directly from me, or other people who set an SPF policy for their domain, the reason might be this: : host gmail-smtp-in.l.google.com[74.125.140.26] said: 550-5.7.26 The MAIL FROM domain [sss.pgh.pa.us] has an SPF record with a hard

Re: Handle infinite recursion in logical replication setup

2022-07-23 Thread vignesh C
On Fri, Jul 22, 2022 at 10:17 AM Amit Kapila wrote: > > On Fri, Jul 22, 2022 at 1:39 AM Jonathan S. Katz wrote: > > > > Thanks for the work on this feature -- this is definitely very helpful > > towards supporting more types of use cases with logical replication! > > > > I've read through the

Re: Handle infinite recursion in logical replication setup

2022-07-23 Thread vignesh C
On Fri, Jul 22, 2022 at 1:39 AM Jonathan S. Katz wrote: > > Hi, > > On 7/21/22 6:34 AM, vignesh C wrote: > > On Thu, Jul 21, 2022 at 2:06 PM Amit Kapila wrote: > >> > >> On Wed, Jul 20, 2022 at 2:33 PM vignesh C wrote: > >>> > >>> Modified. Apart from this I have run pgperltidy on the perl file

Re: Unprivileged user can induce crash by using an SUSET param in PGOPTIONS

2022-07-23 Thread Tom Lane
Nathan Bossart writes: > On Fri, Jul 22, 2022 at 06:44:04PM -0400, Tom Lane wrote: >> Another idea is to add a "bool interactive" parameter to InitPostgres, >> thereby shoving the issue out to the call sites. Still wouldn't >> expose the am_walsender angle, but conceivably it'd be more >>

Re: Support logical replication of DDLs

2022-07-23 Thread Zheng Li
On Sat, Jul 23, 2022 at 11:33 AM Joe Conway wrote: > > On 7/22/22 17:18, Zheng Li wrote: > > Here is a patch that supports replication of global object commands, > > these include ROLE statements, database statements and tablespace > > statements. > > The patch should be applied on top of the

Re: Support logical replication of DDLs

2022-07-23 Thread Joe Conway
On 7/22/22 17:18, Zheng Li wrote: Here is a patch that supports replication of global object commands, these include ROLE statements, database statements and tablespace statements. The patch should be applied on top of the v13 DDL replication patch set that ZJ Hou sent in the previous email.

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-23 Thread Martin Kalcher
Am 22.07.22 um 11:31 schrieb Martin Kalcher: i came to the same conclusions and went with Option 1 (see patch). Mainly because most code in utils/adt is organized by type and this way it is clear, that this is a thin wrapper around pg_prng. Small patch update. I realized the new functions

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

2022-07-23 Thread Amit Kapila
On Fri, Jul 22, 2022 at 11:48 AM Masahiko Sawada wrote: > > On Wed, Jul 20, 2022 at 5:50 PM Amit Kapila wrote: > > > > On Wed, Jul 20, 2022 at 1:28 PM Masahiko Sawada > > wrote: > > > > > > > This is required if we don't want to introduce a new set of functions > > as you proposed above. I am

Re: Refactoring the regression tests for more independence

2022-07-23 Thread Aleksander Alekseev
Hi Tom, > FWIW, I tried to replicate this locally on my own RPi3B+, using > current Ubuntu 20.04.4 LTS (GNU/Linux 5.4.0-1066-raspi aarch64). > No luck: it all works fine for me. We have at least one Raspbian > buildfarm animal too, and it's not been unhappy either. I suspect > there is

Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-23 Thread Michael Paquier
On Sat, Jul 23, 2022 at 05:44:28PM +0900, Michael Paquier wrote: > Changing get_altertable_subcmdtypes() to return a set of rows made of > (subcommand, object description) is what I actually meant upthread as > it feels natural given a CollectedCommand in input, and as >

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-07-23 Thread Bharath Rupireddy
On Thu, Jul 21, 2022 at 9:50 AM Kyotaro Horiguchi wrote: > > At Wed, 20 Jul 2022 17:25:33 +0530, Bharath Rupireddy > wrote in > > On Wed, Jul 20, 2022 at 12:55 PM Kyotaro Horiguchi > > wrote: > > PSA v7 patch set. > > Thanks. Looks perfect, but (sorry..) in the final checking, I found > "log

Re: Amcheck verification of GiST and GIN

2022-07-23 Thread Andrey Borodin
> On 26 Jun 2022, at 00:10, Andrey Borodin wrote: > > I will split the patch in 3 steps: > 1. extract generic functions to amcheck.c > 2. add gist functions > 3. add gin functions > > I'll fix other notes too in the next version. Done. PFA attached patchset. Thanks! Best regards, Andrey

Re: Avoiding smgrimmedsync() during nbtree index builds

2022-07-23 Thread Heikki Linnakangas
On 05/03/2022 00:03, Melanie Plageman wrote: On Wed, Mar 2, 2022 at 8:09 PM Justin Pryzby wrote: Rebased to appease cfbot. I ran these paches under a branch which shows code coverage in cirrus. It looks good to my eyes.

A proposal for shared memory based backup infrastructure

2022-07-23 Thread Bharath Rupireddy
Hi, Right now, the session that starts the backup with pg_backup_start() has to end it with pg_backup_stop() which returns the backup_label and tablespace_map contents (commit 39969e2a1). If the backups were to be taken using custom disk snapshot tools on production servers, following are the

Re: MultiXact\SLRU buffers configuration

2022-07-23 Thread Thomas Munro
On Sat, Jul 23, 2022 at 8:41 PM Andrey Borodin wrote: > Thomas, do you still have any doubts? Or is it certain that SLRU will be > replaced by any better subsystem in 16? Hi Andrey, Sorry for my lack of replies on this and the other SLRU thread -- I'm thinking and experimenting. More soon.

Re: Collect ObjectAddress for ATTACH DETACH PARTITION to use in event trigger

2022-07-23 Thread Michael Paquier
On Fri, Jul 22, 2022 at 02:26:02PM +0530, Amit Kapila wrote: > Yeah, that would be a good idea but I think instead of changing > get_altertable_subcmdtypes(), can we have a new function say > get_altertable_subcmdinfo() that returns additional information from > address. The other alternative

Re: MultiXact\SLRU buffers configuration

2022-07-23 Thread Andrey Borodin
> On 21 Jul 2022, at 18:00, Yura Sokolov wrote: > > In this case simple buffer increase does help. But "buckets" > increase performance gain. Yura, thank you for your benchmarks! We already knew that patch can save the day on pathological workloads, now we have a proof of this. Also there's

Re: Pluggable toaster

2022-07-23 Thread Nikita Malakhov
Hi hackers! Matthias, thank you very much for your feedback! Sorry, I forgot to attach files. Attaching here, but they are for the commit tagged "15beta2", I am currently rebasing this branch onto the actual master and will provide rebased version, with some corrections according to your