Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-10-06 Thread John Naylor
On Fri, Sep 16, 2022 at 1:01 PM Masahiko Sawada wrote: > In addition to two patches, I've attached the third patch. It's not > part of radix tree implementation but introduces a contrib module > bench_radix_tree, a tool for radix tree performance benchmarking. It > measures loading and lookup

Re: proposal: possibility to read dumped table's name from file

2022-10-06 Thread Pavel Stehule
Hi I am sending version with handy written parser and meson support po 3. 10. 2022 v 6:34 odesílatel Julien Rouhaud napsal: > Hi, > > > You started rewriting it, but you didn't finish it. > > > > Unfortunately, there is not a clean opinion on using bison's parser for > > this purpose. I

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Amit Kapila
On Fri, Oct 7, 2022 at 8:38 AM Peter Smith wrote: > > On Thu, Oct 6, 2022 at 10:38 PM Amit Kapila wrote: > > > > On Fri, Sep 30, 2022 at 1:56 PM Peter Smith wrote: > > > > > > Here are my review comments for the v35-0001 patch: > > > > > > == > > > > > > 3. GENERAL > > > > > > (this comment

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Amit Kapila
On Fri, Oct 7, 2022 at 8:47 AM Masahiko Sawada wrote: > > On Thu, Oct 6, 2022 at 9:04 PM houzj.f...@fujitsu.com > wrote: > > > > I think the root reason for this kind of deadlock problems is the table > > structure difference between publisher and subscriber(similar to the unique > > difference

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Julien Rouhaud
On Thu, Oct 06, 2022 at 11:51:52PM -0400, Tom Lane wrote: > Michael Paquier writes: > > While studying a bit more this thread, I've been reminded of the fact > > that this would treat different flavors of BEGIN/COMMIT commands (mix > > of upper/lower characters, etc.) as different entries in > >

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 11:51:52PM -0400, Tom Lane wrote: > I've been thinking since the beginning of this thread that there > was no coherent, defensible rationale being offered for jumbling > some utility statements and not others. Yeah. The potential performance impact of all the

Re: shadow variables - pg15 edition

2022-10-06 Thread David Rowley
On Fri, 7 Oct 2022 at 13:24, David Rowley wrote: > Since I just committed the patch to fix the final warnings, I think we > should go ahead and commit the patch you wrote to add > -Wshadow=compatible-local to the standard build flags. I don't mind > doing this. Pushed. David

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Tom Lane
Michael Paquier writes: > While studying a bit more this thread, I've been reminded of the fact > that this would treat different flavors of BEGIN/COMMIT commands (mix > of upper/lower characters, etc.) as different entries in > pg_stat_statements, and it feels inconsistent to me that we'd begin

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 10:43:57AM +0200, Drouvot, Bertrand wrote: > On 10/6/22 8:39 AM, Michael Paquier wrote: >> I am not seeing SAVEPOINT, RELEASE, ROLLBACK .. TO SAVEPOINT >> mentioned on this thread. Would these be worth considering in what >> gets compiled? That would cover the remaining

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Julien Rouhaud
On Fri, Oct 07, 2022 at 10:30:28AM +0900, Michael Paquier wrote: > On Thu, Oct 06, 2022 at 08:28:27PM +0800, Julien Rouhaud wrote: > > If we move to a real jumbling of VariableSetStmt, we should keep the rules > > consistent with the rest of the jumble code and ignore an explicit > > "SESSION" in

Re: use has_privs_of_role() for pg_hba.conf

2022-10-06 Thread Nathan Bossart
On Fri, Oct 07, 2022 at 11:06:47AM +0900, Michael Paquier wrote: > Rather than putting that in a separate script, which means > initializing a new node, etc. could it be better to put that in > 001_password.pl instead? It would be cheaper. Works for me. -- Nathan Bossart Amazon Web Services:

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Masahiko Sawada
On Thu, Oct 6, 2022 at 9:04 PM houzj.f...@fujitsu.com wrote: > > > > > -Original Message- > > From: Masahiko Sawada > > Sent: Thursday, October 6, 2022 4:07 PM > > To: Hou, Zhijie/侯 志杰 > > Cc: Amit Kapila ; Wang, Wei/王 威 > > ; Peter Smith ; Dilip > > Kumar ; Shi, Yu/侍 雨 ; > > PostgreSQL

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-06 Thread Masahiko Sawada
On Fri, Oct 7, 2022 at 8:00 AM Andres Freund wrote: > > Hi, > > On 2022-10-06 14:10:46 +0900, Kyotaro Horiguchi wrote: > > +1. FWIW, the atttached is an example of what it looks like if we > > avoid file format change. > > What about if we go the other direction - simply remove the name from the

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Peter Smith
On Thu, Oct 6, 2022 at 10:38 PM Amit Kapila wrote: > > On Fri, Sep 30, 2022 at 1:56 PM Peter Smith wrote: > > > > Here are my review comments for the v35-0001 patch: > > > > == > > > > 3. GENERAL > > > > (this comment was written after I wrote all the other ones below so > > there might be

create subscription - improved warning message

2022-10-06 Thread Peter Smith
WARNING: tables were not subscribed, you will have to run ALTER SUBSCRIPTION ... REFRESH PUBLICATION to subscribe the tables ~ When I first encountered the above CREATE SUBSCRIPTION warning message I thought it was dubious-looking English... On closer inspection I think the message has some

Re: use has_privs_of_role() for pg_hba.conf

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 10:43:43AM -0700, Nathan Bossart wrote: > Here is a new version of the patch with a test. Thanks, that helps a lot. Now I grab the difference even if your previous patch was already switching the documentation to tell exactly that. On the ground of 6198420, it looks

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 08:28:27PM +0800, Julien Rouhaud wrote: > If we move to a real jumbling of VariableSetStmt, we should keep the rules > consistent with the rest of the jumble code and ignore an explicit "SESSION" > in > the original command. Hm, interesting bit, I should study more this

Re: Issue with pg_stat_subscription_stats

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 04:43:43PM -0700, Andres Freund wrote: > Thanks for bringing this thread up, I'd lost track of it. The merit goes to Sawada-san here, who has poked me about this thread :p -- Michael signature.asc Description: PGP signature

Re: Possible solution for masking chosen columns when using pg_dump

2022-10-06 Thread Виктория Шепард
Hi, I took a look, here are several suggestions for improvement: - Masking is not a main functionality of pg_dump and it is better to write most of the connected things in a separate file like parallel.c or dumputils.c. This will help slow down the growth of an already huge pg_dump file. - Also

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
David Rowley writes: > On Fri, 7 Oct 2022 at 12:35, Tom Lane wrote: >> Which leaves me with the attached proposed wording. > No objections here. Cool, I'll push in a little bit. > With these comments I'd be using slot MCTX_UNUSED4_ID first, then I'd > probably be looking at MCTX_UNUSED5_ID

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread David Rowley
On Fri, 7 Oct 2022 at 12:35, Tom Lane wrote: > Which leaves me with the attached proposed wording. No objections here. With these comments I'd be using slot MCTX_UNUSED4_ID first, then I'd probably be looking at MCTX_UNUSED5_ID after adjusting wipe_mem to do something other than setting bytes

Re: Avoid mix char with bool type in comparisons

2022-10-06 Thread Ranier Vilela
Em qui., 6 de out. de 2022 às 21:21, Tom Lane escreveu: > Ranier Vilela writes: > > My main concerns is this point: > > /* If already matched on earlier page, do no extra work */ > > - if (key->entryRes[j]) > > + if (key->entryRes[j] == GIN_TRUE) > > continue; > > > If GIN_MAYBE cases are

Re: Issue with pg_stat_subscription_stats

2022-10-06 Thread Masahiko Sawada
On Fri, Oct 7, 2022 at 9:27 AM Andres Freund wrote: > > On 2022-10-06 16:43:43 -0700, Andres Freund wrote: > > On 2022-10-06 14:10:56 +0900, Michael Paquier wrote: > > > On Tue, Jul 12, 2022 at 09:31:16AM +0530, Amit Kapila wrote: > > > > I am not against backpatching this but OTOH it doesn't

Re: Issue with pg_stat_subscription_stats

2022-10-06 Thread Andres Freund
On 2022-10-06 16:43:43 -0700, Andres Freund wrote: > On 2022-10-06 14:10:56 +0900, Michael Paquier wrote: > > On Tue, Jul 12, 2022 at 09:31:16AM +0530, Amit Kapila wrote: > > > I am not against backpatching this but OTOH it doesn't appear critical > > > enough to block one's work, so not

Re: meson: Add support for building with precompiled headers

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 09:06:42 +0200, Peter Eisentraut wrote: > On 05.10.22 21:08, Andres Freund wrote: > > This is a patch split off from the initial meson thread [1] as it's > > functionally largely independent (as suggested in [2]). > > > > Using precompiled headers substantially speeds up

Re: shadow variables - pg15 edition

2022-10-06 Thread David Rowley
On Thu, 6 Oct 2022 at 13:39, Andres Freund wrote: > I attached a patch to add -Wshadow=compatible-local to our set of warnings. Since I just committed the patch to fix the final warnings, I think we should go ahead and commit the patch you wrote to add -Wshadow=compatible-local to the standard

Re: Avoid mix char with bool type in comparisons

2022-10-06 Thread Tom Lane
Ranier Vilela writes: > My main concerns is this point: > /* If already matched on earlier page, do no extra work */ > - if (key->entryRes[j]) > + if (key->entryRes[j] == GIN_TRUE) > continue; > If GIN_MAYBE cases are erroneously ignored. So, if that's a bug, you should be able to produce a

Re: Avoid mix char with bool type in comparisons

2022-10-06 Thread Ranier Vilela
Em qui., 6 de out. de 2022 às 20:52, Tom Lane escreveu: > Ranier Vilela writes: > > So, any use of this GinTernaryValue are: > > > 1. if (key->entryRes[j]) be FALSE if GIN_FALSE > > 2. if (key->entryRes[j]) be TRUE if GIN_TRUE > > 3. if (key->entryRes[j]) be TRUE if GIN_MAYBE > > Yeah, that's

Re: Support logical replication of DDLs

2022-10-06 Thread Ajin Cherian
On Fri, Oct 7, 2022 at 8:30 AM Zheng Li wrote: > > > > Some tweaking is made in deparse_drop_command in order to make DROP > > > TRANSFORM deparsing work. This is because the objidentity captured in > > > currentEventTriggerState->SQLDropList contains the keyword 'on', for > > > example "for

Re: Avoid mix char with bool type in comparisons

2022-10-06 Thread Tom Lane
Ranier Vilela writes: > So, any use of this GinTernaryValue are: > 1. if (key->entryRes[j]) be FALSE if GIN_FALSE > 2. if (key->entryRes[j]) be TRUE if GIN_TRUE > 3. if (key->entryRes[j]) be TRUE if GIN_MAYBE Yeah, that's how it's designed. Unless you can point to a bug, I do not think we

Re: Issue with pg_stat_subscription_stats

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 14:10:56 +0900, Michael Paquier wrote: > On Tue, Jul 12, 2022 at 09:31:16AM +0530, Amit Kapila wrote: > > I am not against backpatching this but OTOH it doesn't appear critical > > enough to block one's work, so not backpatching should be fine. > > We are just talking about the

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
I wrote: > So I'm still inclined to leave 001 and 010 both unused, but the > reason why is different than I thought before. Which leaves me with the attached proposed wording. regards, tom lane diff --git a/src/backend/utils/mmgr/mcxt.c b/src/backend/utils/mmgr/mcxt.c

Refactor to introduce pg_strcoll().

2022-10-06 Thread Jeff Davis
Refactors to isolate strcoll, wcscoll, and ucol_strcoll into pg_locale.c which seems like a better place. Most of the buffer manipulation and equality optimizations are still left in varlena.c. Patch attached. I'm not able to easily test on windows, but it should be close to correct as I just

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
I wrote: > FreeBSD 13.0, arm64: Usually the low-order nibble is or , > but for some smaller values of N it sometimes comes up as 0010. > NetBSD 9.2, amd64: results similar to FreeBSD. I looked into NetBSD's malloc.c, and what I discovered is that their implementation doesn't have any

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 14:10:46 +0900, Kyotaro Horiguchi wrote: > +1. FWIW, the atttached is an example of what it looks like if we > avoid file format change. What about if we go the other direction - simply remove the name from the stats entry at all. I don't actually think we need it anymore.

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread David Rowley
On Fri, 7 Oct 2022 at 10:57, Tom Lane wrote: > I poked at this some more by creating a function that intentionally > does pfree(malloc(N)) for various values of N. > > RHEL8, x86_64: the low-order nibble of the header is consistently 0001. > > macOS 12.6, arm64: the low-order nibble is

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-10-06 Thread Melanie Plageman
v31 failed in CI, so I've attached v32 which has a few issues fixed: - addressed some compiler warnings I hadn't noticed locally - autovac launcher and worker do indeed use bulkread strategy if they end up starting before critical indexes have loaded and end up doing a sequential scan of some

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
I wrote: > I also avoided using 001: based on my work with converting guc.c to use > palloc [1], it seems that pfree'ing a malloc-provided pointer is likely > to see 001 a lot, at least on 64-bit glibc platforms. I poked at this some more by creating a function that intentionally does

Re: [Commitfest 2022-09] Date is Over.

2022-10-06 Thread Greg Stark
Fwiw I'm going through some patches looking for patches to review And I'm finding that the patches I'm seeing actually did get reviews, some of them months ago. If there was any substantial feedback since the last patch was posted I would say you should change the status to Waiting on Author

Avoid mix char with bool type in comparisons

2022-10-06 Thread Ranier Vilela
Hi, GIN Indexes: Defines a type char GinTernaryValue with 3 values: #define GIN_FALSE 0 /* item is not present / does not match */ #define GIN_TRUE 1 /* item is present / matches */ #define GIN_MAYBE 2 /* don't know if item is present / don't know * if matches */ So, any use of this

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
David Rowley writes: > However, maybe you've left it this way as you feel it's a decision > that must be made in the future, perhaps based on how difficult it > would be to free up another bit? Yeah, pretty much. I think it'll be a long time before we run out of memory context IDs, and it's

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread David Rowley
On Fri, 7 Oct 2022 at 09:05, Tom Lane wrote: > > Here's a v2 incorporating discussed changes. > > In reordering enum MemoryContextMethodID, I arranged to avoid using > 000 and 111 as valid IDs, since those bit patterns will appear in > zeroed and wipe_mem'd memory respectively. Those should

Re: shadow variables - pg15 edition

2022-10-06 Thread David Rowley
On Thu, 6 Oct 2022 at 20:32, Alvaro Herrera wrote: > > On 2022-Oct-06, David Rowley wrote: > > I didn't want to do it that way because all this code is in a while > > loop and the outer "now" will be reused after it's set by the code > > above. It's not really immediately obvious to me what

Re: [PATCH v1] [meson] fix some typo to make it more readable

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 11:06:06 +0800, Junwang Zhao wrote: > Seems there are some typo in file src/backend/meson.build comment, pls > have a look. Thanks! I editorilized the first sentence a bit more and pushed this. Regards, Andres

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
Here's a v2 incorporating discussed changes. In reordering enum MemoryContextMethodID, I arranged to avoid using 000 and 111 as valid IDs, since those bit patterns will appear in zeroed and wipe_mem'd memory respectively. Those should probably be more-or-less-permanent exclusions, so I added

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
Andres Freund writes: > On 2022-10-06 15:10:44 -0400, Tom Lane wrote: >> Andres Freund writes: >>> Maybe worth printing the method ID as well? >> I doubt it'd be useful. > I was thinking it could be useful to see whether the bits are likely to be the > result of wipe_mem(). But I guess for

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 15:10:44 -0400, Tom Lane wrote: > Andres Freund writes: > >> + elog(ERROR, "pfree called with invalid pointer %p", pointer); > > > Maybe worth printing the method ID as well? > > I doubt it'd be useful. I was thinking it could be useful to see whether the bits are likely to

Re: Lambda expressions (was Re: BUG #15471)

2022-10-06 Thread Paul Ramsey
On Tue, Oct 30, 2018 at 3:20 PM Andres Freund wrote: > > Hi, > > On 2018-10-30 16:54:45 -0400, Tom Lane wrote: > > Andres Freund writes: > > > On 2018-10-30 16:23:37 -0400, Tom Lane wrote: > > >> Well, a Lambda expression is not something that can be optimized away > > >> (unless perhaps you can

Re: meson PGXS compatibility

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 11:34:26 +0200, Peter Eisentraut wrote: > On 05.10.22 22:07, Andres Freund wrote: > > My colleague Bilal has set up testing and verified that a few extensions > > build > > with the pgxs compatibility layer, on linux at last. Currently pg_qualstats, > > pg_cron, hypopg, orafce,

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
Andres Freund writes: > Yea, that makes sense. I wouldn't get rid of the MAXALIGN Assert though - it's > not replaced by the the unused mcxt stuff afaics. OK. >> +elog(ERROR, "pfree called with invalid pointer %p", pointer); > Maybe worth printing the method ID as well? I doubt it'd be

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 14:19:21 -0400, Tom Lane wrote: > One more thing: based on what I saw in working with my pending guc.c > changes, the assertions in GetMemoryChunkMethodID are largely useless > for detecting bogus pointers. I think we should do something more > like the attached, which will

Re: list of acknowledgments for PG15

2022-10-06 Thread Tom Lane
Alvaro Herrera writes: > (Also: I think it would be nice to have people's names that are > originally in scripts other than Latin to appear in both scripts.) That'd move the goalposts for the docs toolchain rather a long way, I fear. As for the point originally made, I'm not sure whether Peter

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
One more thing: based on what I saw in working with my pending guc.c changes, the assertions in GetMemoryChunkMethodID are largely useless for detecting bogus pointers. I think we should do something more like the attached, which will result in a clean failure if the method ID bits are invalid.

[PATCH] Check system cache invalidations before each command in transaction

2022-10-06 Thread Vasya
Hello guys. In the previous discussion [1] we find out that while we are in transaction function definition is not invalidated if it was redefined in another session. Here is a patch to fix this. Also, I did a small perfomance impact measurement (test.sh in attachment) on my home PC with Intel(R)

Re: use has_privs_of_role() for pg_hba.conf

2022-10-06 Thread Nathan Bossart
On Thu, Oct 06, 2022 at 07:33:46AM -0400, Joe Conway wrote: > On 10/6/22 04:09, Michael Paquier wrote: >> This patch looks simple, but it is a very sensitive area so I think >> that we should be really careful. pg_hba.conf does not have a lot of >> test coverage, so I'd really prefer if we add

Re: list of acknowledgments for PG15

2022-10-06 Thread Alvaro Herrera
On 2022-Oct-07, Fujii Masao wrote: > On 2022/09/08 21:13, Peter Eisentraut wrote: > > > > Attached is the plain-text list of acknowledgments for the PG15 release > > notes, current through REL_15_BETA4.  Please check for problems such as > > wrong sorting, duplicate names in different

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-10-06 Thread Melanie Plageman
v31 attached I've also addressed failing test mentioned by Andres in [1] On Fri, Sep 30, 2022 at 7:18 PM Lukas Fittl wrote: > > On Tue, Sep 27, 2022 at 11:20 AM Melanie Plageman > wrote: > > First of all, I'm excited about this patch, and I think it will be a big help > to understand better

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
David Rowley writes: > I did see that PostGIS does use > MemoryContextContains(), though I didn't look at their code to figure > out if they're always passing it a pointer to an allocated chunk. As far as I can tell from a cursory look, they should be able to use the GetMemoryChunkContext

Re: Support logical replication of DDLs

2022-10-06 Thread Alvaro Herrera
On 2022-Oct-06, Zheng Li wrote: > Some tweaking is made in deparse_drop_command in order to make DROP > TRANSFORM deparsing work. This is because the objidentity captured in > currentEventTriggerState->SQLDropList contains the keyword 'on', for > example "for typename on language lang", but the

Re: pgsql: Avoid improbable PANIC during heap_update.

2022-10-06 Thread Alvaro Herrera
On 2022-Sep-29, Jaime Casanova wrote: > This doesn't look as improbable because I saw it at least 3 times with > v15beta4. To further the case of the not-so-low-probability, we have customers that are hitting this about once per day, with Postgres 14 ... so their systems are crashing all the

Re: list of acknowledgments for PG15

2022-10-06 Thread Fujii Masao
On 2022/09/08 21:13, Peter Eisentraut wrote: Attached is the plain-text list of acknowledgments for the PG15 release notes, current through REL_15_BETA4.  Please check for problems such as wrong sorting, duplicate names in different variants, or names in the wrong order etc.  (Note that

Re: Testing DDL Deparser

2022-10-06 Thread Alvaro Herrera
Hello Overall, many thanks for working on this. I hope that the objectives can be fulfilled, so that we can have dependable DDL replication soon. I haven't read the patch at all, so I can't comment on what you've done, but I have comments to some of your questions: On 2022-Oct-05, Runqi Tian

Re: [Commitfest 2022-09] Date is Over.

2022-10-06 Thread Ibrar Ahmed
On Wed, Oct 5, 2022 at 3:01 PM Julien Rouhaud wrote: > Hi, > > On Wed, Oct 05, 2022 at 02:50:58PM +0500, Ibrar Ahmed wrote: > > On Wed, 5 Oct 2022 at 1:43 PM, Alvaro Herrera > > wrote: > > > > > On 2022-Oct-03, Ibrar Ahmed wrote: > > > > > > > The date of the current commitfest is over, here is

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-10-06 Thread Bruce Momjian
On Thu, Oct 6, 2022 at 01:33:33PM +0530, Bharath Rupireddy wrote: > On Thu, Oct 6, 2022 at 2:30 AM Bruce Momjian wrote: > > > > As I highlighted above, by default you notify the administrator that a > > sychronous replica is not responding and then ignore it. If it becomes > > responsive again,

Re: Reducing the chunk header sizes on all memory context types

2022-10-06 Thread Tom Lane
David Rowley writes: > On Wed, 5 Oct 2022 at 04:55, Tom Lane wrote: >> After studying the existing usages of MemoryContextContains, I think >> there is a better answer, which is to just nuke them. > I was under the impression you wanted to keep that function around in > cassert builds for some

Re: Transparent column encryption

2022-10-06 Thread Andres Freund
Hi, On 2022-10-06 16:25:51 +0200, Peter Eisentraut wrote: > On 02.10.22 09:16, Andres Freund wrote: > > On 2022-09-27 15:51:25 +0200, Peter Eisentraut wrote: > > > Updated version with meson build system support added (for added files and > > > new tests). > > > > This fails on windows:

Re: request clarification on pg_restore documentation

2022-10-06 Thread Bruce Momjian
On Thu, Sep 29, 2022 at 02:30:13PM +, PG Doc comments form wrote: > The following documentation comment has been logged on the website: > > Page: https://www.postgresql.org/docs/14/app-pgrestore.html > Description: > > pg_restore seems to have two ways to restore data: > > --section=data >

Re: Transparent column encryption

2022-10-06 Thread Peter Eisentraut
On 02.10.22 09:16, Andres Freund wrote: On 2022-09-27 15:51:25 +0200, Peter Eisentraut wrote: Updated version with meson build system support added (for added files and new tests). This fails on windows: https://cirrus-ci.com/task/6151847080624128

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread houzj.f...@fujitsu.com
On Thursday, October 6, 2022 9:00 PM Kuroda, Hayato/黒田 隼人 wrote: > > Dear Hou, > > > Thanks for the suggestion. > > > > I tried to add a WaitLatch, but it seems affect the performance > > because the Latch might not be set when leader send some message to > > parallel apply worker which means

Re: START_REPLICATION SLOT causing a crash in an assert build

2022-10-06 Thread Jonathan S. Katz
On 10/6/22 1:10 AM, Kyotaro Horiguchi wrote: At Thu, 6 Oct 2022 13:44:43 +0900, Michael Paquier wrote in On Wed, Oct 05, 2022 at 11:24:57PM -0400, Jonathan S. Katz wrote: On 10/5/22 8:44 PM, Andres Freund wrote: I have two ideas how to fix it. As a design constraint, I'd be interested in

ps command does not show walsender's connected db

2022-10-06 Thread bt22nakamorit
Hi, When walsender process is evoked for logical replication, walsender is connected to a database of the subscriber. Naturally, ones would want the name of the connected database to show in the entry of ps command for walsender. In detail, running ps aux during the logical replication shows

Harmonize parameter names in Win32

2022-10-06 Thread Ranier Vilela
Hi, Like how commits series "harmonize parameter names": 20e69da and others. This tries to harmonize more parameter names, mainly in Win32 and some others files. regards, Ranier Vilela

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread kuroda.hay...@fujitsu.com
Dear Hou, > Thanks for the suggestion. > > I tried to add a WaitLatch, but it seems affect the performance > because the Latch might not be set when leader send some > message to parallel apply worker which means it will wait until > timeout. Yes, currently it leader does not notify anything.

Re: Allow foreign keys to reference a superset of unique columns

2022-10-06 Thread Peter Eisentraut
On 28.09.22 00:39, Kaiting Chen wrote: What other semantics and edge cases regarding this proposal should I consider? I'm not as pessimistic as others that it couldn't be made to work. But it's the job of this proposal to figure this out. Implementing it is probably not that hard in the

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread kuroda.hay...@fujitsu.com
Dear Hou, I put comments for v35-0001. 01. catalog.sgml ``` + Controls how to handle the streaming of in-progress transactions: + f = disallow streaming of in-progress transactions, + t = spill the changes of in-progress transactions to + disk and apply at once after the

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Drouvot, Bertrand
On 10/6/22 2:28 PM, Julien Rouhaud wrote: On Thu, Oct 06, 2022 at 02:19:32PM +0200, Drouvot, Bertrand wrote: On 10/6/22 1:18 PM, Julien Rouhaud wrote: so nothing should rely on how exactly someone spelled it. This is also the case for our core jumbling code, where we guarantee (or at

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Julien Rouhaud
On Thu, Oct 06, 2022 at 02:19:32PM +0200, Drouvot, Bertrand wrote: > > On 10/6/22 1:18 PM, Julien Rouhaud wrote: > > > so > > nothing should rely on how exactly someone spelled it. This is also the > > case > > for our core jumbling code, where we guarantee (or at least try to) that two > >

Re: Move backup-related code to xlogbackup.c/.h

2022-10-06 Thread Bharath Rupireddy
On Thu, Oct 6, 2022 at 4:50 AM Andres Freund wrote: > > I'm doubtful it's a good idea to expose these to outside of xlog.c - they are > very low level, and it's very easy to break stuff by using them wrongly. Hm. Here's the v3 patch set without exposing WAL insert lock related functions. Please

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Drouvot, Bertrand
Hi, On 10/6/22 1:18 PM, Julien Rouhaud wrote: Hi, On Thu, Oct 06, 2022 at 12:57:17PM +0200, Drouvot, Bertrand wrote: Hi hackers, "SET local" is currently recorded in VariableSetStmt (with the boolean is_local) but "SET session" is not. Please find attached a patch proposal to also record

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2022-10-06 Thread Aleksander Alekseev
Maxim, > Here is a rebased version of the patch set. This is the wrong thread / CF entry. Please see http://cfbot.cputube.org/ and https://commitfest.postgresql.org/ and the first email in the thread. -- Best regards, Aleksander Alekseev

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread houzj.f...@fujitsu.com
On Thursday, October 6, 2022 6:54 PM Kuroda, Hayato/黒田 隼人 wrote: > > Dear Amit, > > > Can't we use WaitLatch in the case of SHM_MQ_WOULD_BLOCK as we are > > using it for the same case at some other place in the code? We can use > > the same nap time as we are using in the leader apply worker.

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread houzj.f...@fujitsu.com
> -Original Message- > From: Masahiko Sawada > Sent: Thursday, October 6, 2022 4:07 PM > To: Hou, Zhijie/侯 志杰 > Cc: Amit Kapila ; Wang, Wei/王 威 > ; Peter Smith ; Dilip > Kumar ; Shi, Yu/侍 雨 ; > PostgreSQL Hackers > Subject: Re: Perform streaming logical transactions by background

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Amit Kapila
On Fri, Sep 30, 2022 at 1:56 PM Peter Smith wrote: > > Here are my review comments for the v35-0001 patch: > > == > > 3. GENERAL > > (this comment was written after I wrote all the other ones below so > there might be some unintended overlaps...) > > I found the mixed use of the same member

Re: use has_privs_of_role() for pg_hba.conf

2022-10-06 Thread Joe Conway
On 10/6/22 04:09, Michael Paquier wrote: On Mon, Apr 04, 2022 at 07:25:51AM -0700, Nathan Bossart wrote: On Mon, Apr 04, 2022 at 09:36:13AM -0400, Joshua Brindle wrote: Good catch, I think this is a logical followup to the previous has_privs_of_role patch. Reviewed and +1 Thanks! I created

Re: fix comment typo in xlogprefetcher.c

2022-10-06 Thread Michael Paquier
On Thu, Oct 06, 2022 at 08:12:37AM +, kato-...@fujitsu.com wrote: > I found a comment typo in xlogprefetcher.c. > Any thoughts? Fixed, thanks. -- Michael signature.asc Description: PGP signature

Re: Record SET session in VariableSetStmt

2022-10-06 Thread Julien Rouhaud
Hi, On Thu, Oct 06, 2022 at 12:57:17PM +0200, Drouvot, Bertrand wrote: > Hi hackers, > > "SET local" is currently recorded in VariableSetStmt (with the boolean > is_local) but "SET session" is not. > > Please find attached a patch proposal to also record "SET session" so that > VariableSetStmt

Record SET session in VariableSetStmt

2022-10-06 Thread Drouvot, Bertrand
Hi hackers, "SET local" is currently recorded in VariableSetStmt (with the boolean is_local) but "SET session" is not. Please find attached a patch proposal to also record "SET session" so that VariableSetStmt records all the cases. Remark: Recording "SET session" will also help for the

RE: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread kuroda.hay...@fujitsu.com
Dear Amit, > Can't we use WaitLatch in the case of SHM_MQ_WOULD_BLOCK as we are > using it for the same case at some other place in the code? We can use > the same nap time as we are using in the leader apply worker. I'm not sure whether such a short nap time is needed or not. Because unlike

Re: [PATCH] Compression dictionaries for JSONB

2022-10-06 Thread Aleksander Alekseev
Hi hackers, > For the record, Nikita and I agreed offlist that Nikita will join this > effort as a co-author in order to implement the suggested improvements > (and perhaps some improvements that were not suggested yet). Meanwhile > I'm going to keep the current version of the patch up to date

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Amit Kapila
On Thu, Sep 29, 2022 at 3:20 PM kuroda.hay...@fujitsu.com wrote: > > Dear Hou, > > Thanks for updating patch. I will review yours soon, but I reply to your > comment. > > > > 04. applyparallelworker.c - LogicalParallelApplyLoop() > > > > > > ``` > > > + shmq_res =

Re: meson PGXS compatibility

2022-10-06 Thread Peter Eisentraut
On 05.10.22 22:07, Andres Freund wrote: My colleague Bilal has set up testing and verified that a few extensions build with the pgxs compatibility layer, on linux at last. Currently pg_qualstats, pg_cron, hypopg, orafce, postgis, pg_partman work. He also tested pgbouncer, but for him that failed

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-10-06 Thread John Naylor
On Thu, Oct 6, 2022 at 2:53 PM Masahiko Sawada wrote: > > On Wed, Oct 5, 2022 at 6:40 PM John Naylor wrote: > > > > This wasn't the focus of your current email, but while experimenting with v6 I had another thought about local allocation: If we use the default slab block size of 8192 bytes, then

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Drouvot, Bertrand
Hi, On 10/6/22 8:39 AM, Michael Paquier wrote: On Mon, Sep 19, 2022 at 08:29:22AM +0200, Drouvot, Bertrand wrote: Please find attached v6 taking care of the remarks mentioned above. +case T_VariableSetStmt: +{ +VariableSetStmt *stmt = (VariableSetStmt *)

Testing DDL Deparser

2022-10-06 Thread Runqi Tian
Hello: I’m working on developing a testing harness for the DDL Deparser being worked on in [1], please apply the patches in [1] before apply this patch. I think the testing harness needs to achieve the following goals: 1. The deparsed JSON output is as expected. 2. The SQL commands re-formed

Re: Query Jumbling for CALL and SET utility statements

2022-10-06 Thread Drouvot, Bertrand
Hi, On 9/26/22 12:40 PM, Drouvot, Bertrand wrote: let's add it in V7 attached (that's safer should the code change later on). Attached a tiny rebase needed due to 249b0409b1. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services:

Re: Support logical replication of DDLs

2022-10-06 Thread Peter Smith
The patches here are quite large, so for this review post, I have only done a quick check for cosmetic stuff in the comments of patch v24-0001. ~ I did this mostly just by cutting/pasting the whole patch text into a grammar/spell-checker to see what it reported. Please use the same strategy

fix comment typo in xlogprefetcher.c

2022-10-06 Thread kato-...@fujitsu.com
Hello I found a comment typo in xlogprefetcher.c. Any thoughts? --- a/src/backend/access/transam/xlogprefetcher.c +++ b/src/backend/access/transam/xlogprefetcher.c @@ -19,7 +19,7 @@ * avoid a second buffer mapping table lookup. * * Currently, only the main fork is considered for

Re: use has_privs_of_role() for pg_hba.conf

2022-10-06 Thread Michael Paquier
On Mon, Apr 04, 2022 at 07:25:51AM -0700, Nathan Bossart wrote: > On Mon, Apr 04, 2022 at 09:36:13AM -0400, Joshua Brindle wrote: >> Good catch, I think this is a logical followup to the previous >> has_privs_of_role patch. >> >> Reviewed and +1 > > Thanks! I created a commitfest entry for

Re: Perform streaming logical transactions by background workers and parallel apply

2022-10-06 Thread Masahiko Sawada
On Tue, Sep 27, 2022 at 9:26 PM houzj.f...@fujitsu.com wrote: > > On Saturday, September 24, 2022 7:40 PM Amit Kapila > wrote: > > > > On Thu, Sep 22, 2022 at 3:41 PM Amit Kapila > > wrote: > > > > > > On Thu, Sep 22, 2022 at 8:59 AM wangw.f...@fujitsu.com > > > wrote: > > > > > > > > > > Few

Re: An attempt to avoid locally-committed-but-not-replicated-to-standby-transactions in synchronous replication

2022-10-06 Thread Bharath Rupireddy
On Thu, Oct 6, 2022 at 2:30 AM Bruce Momjian wrote: > > As I highlighted above, by default you notify the administrator that a > sychronous replica is not responding and then ignore it. If it becomes > responsive again, you notify the administrator again and add it back as > a sychronous

  1   2   >