Re: RFC: Logging plan of the running query

2022-02-01 Thread Kyotaro Horiguchi
At Tue, 1 Feb 2022 23:11:03 +0900, Fujii Masao wrote in > >> One thing that really bothers me about commit e2c79e14 is that > >> LockPage() is called, not LockBuffer(). GIN had no LockPage() calls > >> before that commit, and is now the only code in the entire system that > >> calls

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-02-01 Thread Andy Fan
Hi Justin: Thanks for your attention. On Wed, Feb 2, 2022 at 1:13 AM Justin Pryzby wrote: > > Subject: [PATCH v1 1/6] Rebaee David's patch against the latest code. > > If you use git-am, then the author/commit information is preserved. > It's probably good to include a link to the patch in

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-01 Thread David G. Johnston
On Tue, Feb 1, 2022 at 11:55 PM Amit Kapila wrote: > On Wed, Feb 2, 2022 at 9:41 AM David G. Johnston > wrote: > > > > On Tue, Feb 1, 2022 at 8:07 PM Amit Kapila > wrote: > >> > >> On Tue, Feb 1, 2022 at 11:47 AM Masahiko Sawada > wrote: > >> > >> > > >> > I see that it's better to use a

Re: Pluggable toaster

2022-02-01 Thread Teodor Sigaev
I agree ... but I'm also worried about what happens when we have multiple table AMs. One can imagine a new table AM that is specifically optimized for TOAST which can be used with an existing heap table. One can imagine a new table AM for the main table that wants to use something different for

Re: Make mesage at end-of-recovery less scary.

2022-02-01 Thread Pavel Borisov
> > Thanks! The suggested change is done in the attached v11. > Thanks! v11 is a small refactoring of v10 that doesn't change behavior, so it is RfC as well. -- Best regards, Pavel Borisov Postgres Professional: http://postgrespro.com

Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-01 Thread Antonin Houska
Amit Kapila wrote: > On Tue, Feb 1, 2022 at 5:43 PM Antonin Houska wrote: > > > > Amit Kapila wrote: > > > > > On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska wrote: > > > > > > > > I got a syntax error when using the command according to the existing > > > > documentation. The output_plugin

Re: row filtering for logical replication

2022-02-01 Thread Amit Kapila
On Tue, Feb 1, 2022 at 4:51 PM Amit Kapila wrote: > > Review Comments: > === > 1. > + else if (IsA(node, OpExpr)) > + { > + /* OK, except user-defined operators are not allowed. */ > + if (((OpExpr *) node)->opno >= FirstNormalObjectId) > + errdetail_msg = _("User-defined operators

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-01 Thread Amit Kapila
On Wed, Feb 2, 2022 at 9:41 AM David G. Johnston wrote: > > On Tue, Feb 1, 2022 at 8:07 PM Amit Kapila wrote: >> >> On Tue, Feb 1, 2022 at 11:47 AM Masahiko Sawada >> wrote: >> >> > >> > I see that it's better to use a better IPC for ALTER SUBSCRIPTION SKIP >> > feature to pass error-XID or

Re: warn if GUC set to an invalid shared library

2022-02-01 Thread Maciek Sakrejda
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: not tested Documentation:not tested I tried the latest version of the patch, and it works as discussed.

Re: XLogReadRecord() error in XlogReadTwoPhaseData()

2022-02-01 Thread Noah Misch
On Mon, Jan 24, 2022 at 12:02:43AM -0800, Noah Misch wrote: > For 003_cic_2pc.pl, I'm > fine using $TODO so we continue to run all test commands and quietly log their > results. For 027_stream_regress.pl, which would need deep changes to use > $TODO, it works to use any of todo_skip, skip, or

Re: Make mesage at end-of-recovery less scary.

2022-02-01 Thread Kyotaro Horiguchi
At Tue, 1 Feb 2022 12:38:01 +0400, Pavel Borisov wrote in > Maybe it can be written little bit shorter: > pe = (char *) record + XLOG_BLCKSZ - (RecPtr & (XLOG_BLCKSZ - 1)); > as > pe = p + XLOG_BLCKSZ - (RecPtr & (XLOG_BLCKSZ - 1)); > ? That difference would be a matter of taste, but I found

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-01 Thread David G. Johnston
On Tue, Feb 1, 2022 at 8:07 PM Amit Kapila wrote: > On Tue, Feb 1, 2022 at 11:47 AM Masahiko Sawada > wrote: > > > > > I see that it's better to use a better IPC for ALTER SUBSCRIPTION SKIP > > feature to pass error-XID or error-LSN information to the worker > > whereas I'm also not sure of the

Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-01 Thread Amit Kapila
On Tue, Feb 1, 2022 at 5:43 PM Antonin Houska wrote: > > Amit Kapila wrote: > > > On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska wrote: > > > > > > I got a syntax error when using the command according to the existing > > > documentation. The output_plugin parameter needs to be passed too. > > >

Re: A test for replay of regression tests

2022-02-01 Thread Thomas Munro
On Wed, Feb 2, 2022 at 3:43 PM Tom Lane wrote: > Thomas Munro writes: > > Seen again today on prairiedog. Erm, scratch that idea, HS feedback > > interferes with test results. I guess max_standby_streaming_delay > > should be increased to 'forever', like in the attached, since pg_dump > > runs

Re: Design of pg_stat_subscription_workers vs pgstats

2022-02-01 Thread Amit Kapila
On Tue, Feb 1, 2022 at 11:47 AM Masahiko Sawada wrote: > > On Fri, Jan 28, 2022 at 2:59 PM Amit Kapila wrote: > > > > On Fri, Jan 28, 2022 at 1:49 AM David G. Johnston > > wrote: > > > > > > > > > In short, it was convenient to use the statistics collector here even if > > > doing so resulted

[WIP] Allow pg_upgrade to copy segments of the same relfilenode in parallel

2022-02-01 Thread Jaime Casanova
Hi, This patch adds a new option (-J num, --jobs-per-disk=num) in pg_upgrade to speed up copy mode. This generates upto ${num} processes per tablespace to copy segments of the same relfilenode in parallel. This can help when you have many multi gigabyte tables (each segment is 1GB by

Re: A test for replay of regression tests

2022-02-01 Thread Tom Lane
Thomas Munro writes: > Seen again today on prairiedog. Erm, scratch that idea, HS feedback > interferes with test results. I guess max_standby_streaming_delay > should be increased to 'forever', like in the attached, since pg_dump > runs for a very long time on prairiedog: FWIW, I'd vote for

Re: A test for replay of regression tests

2022-02-01 Thread Tom Lane
Andres Freund writes: > It's not surprising that pg_dump takes 30s on that old a machine. But more > than 2min still surprised me. Is that really do be expected? In the previous buildfarm run, that dump took just under 31s: 2022-01-31 14:21:10.358 EST [19325:1] [unknown] LOG: connection

Re: A test for replay of regression tests

2022-02-01 Thread Andres Freund
Hi, On February 1, 2022 6:11:24 PM PST, Tom Lane wrote: >Thomas Munro writes: >> It looks like it's processing statements fairly consistently slowly >> through the whole period. Each non-trivial statement takes a bit >> under ~10ms, so it would make sense if by the time we've processed >>

Re: A test for replay of regression tests

2022-02-01 Thread Tom Lane
Thomas Munro writes: > It looks like it's processing statements fairly consistently slowly > through the whole period. Each non-trivial statement takes a bit > under ~10ms, so it would make sense if by the time we've processed > ~2.5k lines we've clocked up 30 seconds and a VACUUM replay whacks

Re: A test for replay of regression tests

2022-02-01 Thread Thomas Munro
On Wed, Feb 2, 2022 at 2:14 PM Andres Freund wrote: > On 2022-02-02 13:59:56 +1300, Thomas Munro wrote: > > 2022-02-01 04:47:59.294 EST [3670:15] 027_stream_regress.pl LOG: > > statement: SET TRANSACTION ISOLATION LEVEL REPEATABLE READ, READ ONLY > > ... > > 2022-02-01 04:49:09.881 EST

Re: A test for replay of regression tests

2022-02-01 Thread Andres Freund
Hi, On 2022-02-02 13:59:56 +1300, Thomas Munro wrote: > Seen again today on prairiedog. Erm, scratch that idea, HS feedback > interferes with test results. It'd not be sufficient anyway, I think. E.g. autovacuum truncating a table would not be prevented by hs_f I think? > I guess

Re: A test for replay of regression tests

2022-02-01 Thread Thomas Munro
On Sat, Jan 22, 2022 at 6:00 PM Thomas Munro wrote: > On Sat, Jan 22, 2022 at 8:48 AM Andres Freund wrote: > > Unfortunately we don't quite seem there yet: > > And another way to fail: > > pg_dump: error: query failed: ERROR: canceling statement due to > conflict with recovery > >

Re: Feature Proposal: Connection Pool Optimization - Change the Connection User

2022-02-01 Thread Todd Hubers
Hi Everyone, Benchmarking work has commenced, and is ongoing. - *OPTIONS 5/6/7* - `SET SESSION AUTHORIZATION` takes double the time of a single separate SimpleQuery. This is to be expected, because double the amount of SimpleQuery messages are being sent, and that requires a full

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-02-01 Thread Nathan Bossart
On Mon, Jan 31, 2022 at 10:42:54AM +0530, Bharath Rupireddy wrote: > After an off-list discussion with Andreas, proposing here a patch that > basically replaces ReadDir call with ReadDirExtended and gets rid of > lstat entirely. With this chance, the checkpoint will only care about > the snapshot

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-02-01 Thread Andres Freund
On 2022-02-01 18:37:02 -0500, Tom Lane wrote: > So I'm going to go ahead with patching; but does anyone want > to change their vote? (We can always "git revert".) +1 for going ahead

Re: CREATEROLE and role ownership hierarchies

2022-02-01 Thread Andrew Dunstan
On 2/1/22 17:27, Mark Dilger wrote: > >> On Feb 1, 2022, at 1:10 PM, Andrew Dunstan wrote: >> >> The whole 'NOFOO WITH ADMIN OPTION' >> thing seems to me a bit like a POLA violation. Nevertheless I can >> probably live with it as long as it's *really* well documented. Even so >> I suspect it

Re: Extensible Rmgr for Table AMs

2022-02-01 Thread Jeff Davis
On Tue, 2022-02-01 at 20:45 +0800, Julien Rouhaud wrote: > On Tue, Feb 01, 2022 at 12:39:38PM +0800, Julien Rouhaud wrote: > > > > Other than that the patch looks good to me, as you said we just > > need a decision > > on whether custom rmgrs are wanted or not. > > One last thing, did you do

Re: Replace uses of deprecated Python module distutils.sysconfig

2022-02-01 Thread Tom Lane
Noah Misch writes: > On Mon, Jan 31, 2022 at 05:18:47PM -0500, Tom Lane wrote: >> If nobody else has weighed in by tomorrow, I'll backpatch to v10. > Works for me. I agree wanting Python 3.12 w/ PG10.latest is far more likely > than wanting Python 2.6 or 3.1. If someone lodges a non-academic

Re: XTS cipher mode for cluster file encryption

2022-02-01 Thread Michael Banck
Hi, On Tue, Feb 01, 2022 at 01:07:36PM -0500, Stephen Frost wrote: > On Tue, Feb 1, 2022 at 12:50 Bruce Momjian wrote: > > On Tue, Feb 1, 2022 at 07:45:06AM +0100, Antonin Houska wrote: > > > > With pg_upgrade modified to preserve the relfilenode, tablespace > > > > oid, and database oid, we

Re: make MaxBackends available in _PG_init

2022-02-01 Thread Nathan Bossart
On Mon, Jan 31, 2022 at 09:32:21AM -0500, Robert Haas wrote: > The main reason why this doesn't work for MaxBackends is that > MaxBackends depends on the values of multiple GUCs. There is a further > wrinkle too, which is that none of those GUCs can change, and > therefore code does things with

Re: CREATEROLE and role ownership hierarchies

2022-02-01 Thread Mark Dilger
> On Feb 1, 2022, at 1:10 PM, Andrew Dunstan wrote: > > The whole 'NOFOO WITH ADMIN OPTION' > thing seems to me a bit like a POLA violation. Nevertheless I can > probably live with it as long as it's *really* well documented. Even so > I suspect it would be too complex for many, and they will

Re: Windows crash / abort handling

2022-02-01 Thread Thomas Munro
On Sun, Jan 30, 2022 at 10:02 AM Andres Freund wrote: > On 2022-01-09 16:57:04 -0800, Andres Freund wrote: > > I've attached a patch implementing these changes. > > Unless somebody is planning to look at this soon, I'm planning to push it to > master. It's too annoying to have these hangs and not

Re: Support tab completion for upper character inputs in psql

2022-02-01 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Tom Lane writes: >>> We could do something hacky like matching case only when there's >>> no longer any matching object names, but that might be too magic. >> I experimented with that, and it actually doesn't seem as weird >> as I feared. See

Re: Support for NSS as a libpq TLS backend

2022-02-01 Thread Andres Freund
Hi, On 2022-02-01 15:12:28 -0500, Stephen Frost wrote: > The concern about the documentation not being easily available is > certainly something to consider. I remember in prior reviews not having > that much difficulty looking up documentation for functions I've definitely several times in the

Re: do only critical work during single-user vacuum?

2022-02-01 Thread John Naylor
On Thu, Jan 27, 2022 at 8:28 PM Justin Pryzby wrote: > I'm sure you meant "&" here (fixed in attached patch to appease the cfbot): > + if (options | VACOPT_MINIMAL) Thanks for catching that! That copy-pasto was also masking my failure to process the option properly -- fixed in the

psql tab completion versus Debian's libedit

2022-02-01 Thread Tom Lane
I chased down the failure that kittiwake has been showing since 02b8048ba [1]. It's not hard to reproduce if you have an older Debian release and you build --with-libedit-preferred. Manual experimentation shows that when these versions of libedit complete a string containing double quotes, they

Re: CREATEROLE and role ownership hierarchies

2022-02-01 Thread Andrew Dunstan
On 1/31/22 12:18, Mark Dilger wrote: > >> On Jan 31, 2022, at 12:43 AM, Michael Banck >> wrote: >> Ok, sure. I think this topic is hugely important and as I read the >> patch anyway, I added some comments, but yeah, we need to figure out >> the fundamentals first. > Right. > > Perhaps some

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-01 Thread Stephen Frost
Greetings, * Fujii Masao (masao.fu...@oss.nttdata.com) wrote: > On 2022/02/01 22:03, Bharath Rupireddy wrote: > >On Tue, Feb 1, 2022 at 11:58 AM Kyotaro Horiguchi > > wrote: > >>>Modified in v8. > >> > >>0001 looks good to me. > > I found that CreateRestartPoint() already reported the redo lsn

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-02-01 Thread Thomas Munro
On Wed, Feb 2, 2022 at 6:38 AM Andres Freund wrote: > On 2022-02-01 18:02:34 +1300, Thomas Munro wrote: > > 1. "pgsocket" could become a pointer to a heap-allocated wrapper > > object containing { socket, event, flags } on Windows, or something > > like that, but that seems a bit invasive and

Re: Support for NSS as a libpq TLS backend

2022-02-01 Thread Stephen Frost
Greetings, * Daniel Gustafsson (dan...@yesql.se) wrote: > > On 31 Jan 2022, at 22:48, Daniel Gustafsson wrote: > >> On 31 Jan 2022, at 17:24, Stephen Frost wrote: > > >> I agree that it's concerning to hear that OpenLDAP dropped support for > >> NSS... though I don't seem to be able to find

Re: Why is INSERT-driven autovacuuming based on pg_class.reltuples?

2022-02-01 Thread David Rowley
On Mon, 31 Jan 2022 at 17:28, David Rowley wrote: > If ANALYZE runs and sets pg_class.reltuples to 1 million, then we > insert 500k tuples, assuming a 0 vacuum_ins_threshold and a > vacuum_ins_scale_factor of 0.2, then we'll want to perform a vacuum as > "vac_ins_base_thresh +

Re: Latest LLVM breaks our code again

2022-02-01 Thread Andres Freund
Hi, On 2022-01-30 21:38:16 -0500, Tom Lane wrote: > Speaking of buildfarm breakage, seawasp has been failing for the > past several days. It looks like bleeding-edge LLVM has again > changed some APIs we depend on. First failure is here: I'm doubtful that tracking development branches of LLVM

Re: Deparsing rewritten query

2022-02-01 Thread Pavel Stehule
út 1. 2. 2022 v 4:38 odesílatel Julien Rouhaud napsal: > Hi, > > On Mon, Jan 31, 2022 at 10:05:44PM +0100, Pavel Stehule wrote: > > > > I don't feel good about forcing an alias. relname doesn't ensure > > uniqueness. You can have two views with the same name from different > > schemas. Moreover

Re: Latest LLVM breaks our code again

2022-02-01 Thread Fabien COELHO
Speaking of buildfarm breakage, seawasp has been failing for the past several days. It looks like bleeding-edge LLVM has again changed some APIs we depend on. First failure is here: https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=seawasp=2022-01-28%2000%3A17%3A48 Indeed. I'm

Re: XTS cipher mode for cluster file encryption

2022-02-01 Thread Andres Freund
Hi, On 2022-02-01 13:27:03 -0500, Bruce Momjian wrote: > On Tue, Feb 1, 2022 at 01:07:36PM -0500, Stephen Frost wrote: > > Well, I sent an email a week ago asking if people want to advance this > > feature forward, and so far you are the only person to reply, which I > > think means

Re: XTS cipher mode for cluster file encryption

2022-02-01 Thread Bruce Momjian
On Tue, Feb 1, 2022 at 01:07:36PM -0500, Stephen Frost wrote: > Well, I sent an email a week ago asking if people want to advance this > feature forward, and so far you are the only person to reply, which I > think means there isn't enough interest in this feature to advance it. > >

Re: XTS cipher mode for cluster file encryption

2022-02-01 Thread Stephen Frost
Greetings, On Tue, Feb 1, 2022 at 12:50 Bruce Momjian wrote: > On Tue, Feb 1, 2022 at 07:45:06AM +0100, Antonin Houska wrote: > > > With pg_upgrade modified to preserve the relfilenode, tablespace oid, > and > > > database oid, we are now closer to implementing cluster file encryption > > >

Re: XTS cipher mode for cluster file encryption

2022-02-01 Thread Bruce Momjian
On Tue, Feb 1, 2022 at 07:45:06AM +0100, Antonin Houska wrote: > > With pg_upgrade modified to preserve the relfilenode, tablespace oid, and > > database oid, we are now closer to implementing cluster file encryption > > using XTS. I think we have a few steps left: > > > > 1. modify temporary

Re: Why is src/test/modules/committs/t/002_standby.pl flaky?

2022-02-01 Thread Andres Freund
Hi, On 2022-02-01 18:02:34 +1300, Thomas Munro wrote: > 1. It sounds like no one really loves the WSAPoll() kludge, even > though it apparently works for simple cases. Yea, at least I don't :) > 2. The long-lived-WaitEventSets-everywhere concept was initially > appealling to me and solves

Re: autovacuum prioritization

2022-02-01 Thread Robert Treat
On Wed, Jan 26, 2022 at 6:56 PM Greg Stark wrote: > > On Wed, 26 Jan 2022 at 18:46, Greg Stark wrote: > > > > On Thu, 20 Jan 2022 at 14:31, Robert Haas wrote: > > > > > > In my view, previous efforts in this area have been too simplistic. > > > > > > > One thing I've been wanting to do

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-02-01 Thread Justin Pryzby
> Subject: [PATCH v1 1/6] Rebaee David's patch against the latest code. If you use git-am, then the author/commit information is preserved. It's probably good to include a link to the patch in any case. > Subject: [PATCH v1 4/6] remove duplicated qual executing.

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-01 Thread Fujii Masao
On 2022/02/01 22:03, Bharath Rupireddy wrote: On Tue, Feb 1, 2022 at 11:58 AM Kyotaro Horiguchi wrote: Modified in v8. 0001 looks good to me. I found that CreateRestartPoint() already reported the redo lsn as follows after emitting the restartpoint log message. To avoid duplicated

Database-level collation version tracking

2022-02-01 Thread Peter Eisentraut
This patch adds to database objects the same version tracking that collation objects have. There is a new pg_database column datcollversion that stores the version, a new function pg_database_collation_actual_version() to get the version from the operating system, and a new subcommand ALTER

Re: Condition pushdown: why (=) is pushed down into join, but BETWEEN or >= is not?

2022-02-01 Thread Andy Fan
On Fri, May 14, 2021 at 12:22 PM David Rowley wrote: > On Fri, 14 May 2021 at 11:22, Tom Lane wrote: > > I recall somebody (David Rowley, maybe? Too lazy to check archives.) > > working on this idea awhile ago, but he didn't get to the point of > > a committable patch. > > Yeah. Me. The

Re: [Proposal] Add foreign-server health checks infrastructure

2022-02-01 Thread Fujii Masao
On 2022/02/01 13:37, kuroda.hay...@fujitsu.com wrote: Dear Fujii-san, Thank you for reviewing! I attached the latest version. Thanks! Indeed and it should be avoided. I added a counter to CheckingRemoteServersCallbackItem. The register function returns the registered item, and it must

Re: dynamic result sets support in extended query protocol

2022-02-01 Thread Peter Eisentraut
On 12.01.22 11:20, Julien Rouhaud wrote: Since you mentioned that this patch depends on the SHOW_ALL_RESULTS psql patch which is still being worked on, I'm not expecting much activity here until the prerequirements are done. It also seems better to mark this patch as Waiting on Author as

Re: fix crash with Python 3.11

2022-02-01 Thread Peter Eisentraut
On 25.01.22 16:54, Tom Lane wrote: Peter Eisentraut writes: On 16.01.22 23:53, Tom Lane wrote: I think a possible fix is: 1. Before entering the PG_TRY block, check for active subtransaction(s) and immediately throw a Python error if there is one. (This corresponds to the existing errors

Re: Plug minor memleak in pg_dump

2022-02-01 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 7:06 PM wrote: > > Hi, > > I noticed a minor memleak in pg_dump. ReadStr() returns a malloc'ed pointer > which > should then be freed. While reading the Table of Contents, it was called as > an argument > within a function call, leading to a memleak. > > Please accept the

Re: RFC: Logging plan of the running query

2022-02-01 Thread Fujii Masao
On 2022/02/01 17:27, Kyotaro Horiguchi wrote: * Similar to relation extension, page locks are also held for a short * duration, so imposing such a restriction won't hurt. I don't believe a path involving vacuum_delay_point() calls is short-duration'ed. Yes. One thing that really

Plug minor memleak in pg_dump

2022-02-01 Thread gkokolatos
Hi, I noticed a minor memleak in pg_dump. ReadStr() returns a malloc'ed pointer which should then be freed. While reading the Table of Contents, it was called as an argument within a function call, leading to a memleak. Please accept the attached as a proposed fix. Cheers, //GeorgiosFrom

Re: Support tab completion for upper character inputs in psql

2022-02-01 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > I wrote: >> =?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: >>> First, as noted in the test, it doesn't preserve the case of the input >>> for keywords appended to the query result. This is easily fixed by >>> using `pg_strdup_keyword_case()`, per the first attached patch.

Re: Add checkpoint and redo LSN to LogCheckpointEnd log message

2022-02-01 Thread Bharath Rupireddy
On Tue, Feb 1, 2022 at 11:58 AM Kyotaro Horiguchi wrote: > > Modified in v8. > > 0001 looks good to me. > > I tend to agree to 0002. Thanks. > FWIW, I collected other user-facing usage of "location" as LSN. > > xlog.c:11298, 11300: (in backup-label) > appendStringInfo(labelfile, "START WAL

Re: Extensible Rmgr for Table AMs

2022-02-01 Thread Julien Rouhaud
On Tue, Feb 01, 2022 at 12:39:38PM +0800, Julien Rouhaud wrote: > > Other than that the patch looks good to me, as you said we just need a > decision > on whether custom rmgrs are wanted or not. One last thing, did you do some benchmark with a couple custom rmgr to see how much the O(n) access

Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-01 Thread Antonin Houska
Amit Kapila wrote: > On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska wrote: > > > > I got a syntax error when using the command according to the existing > > documentation. The output_plugin parameter needs to be passed too. > > > > Why do we need it for physical slots? Sure we don't, the

Re: Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-01 Thread Amit Kapila
On Tue, Feb 1, 2022 at 3:44 PM Antonin Houska wrote: > > I got a syntax error when using the command according to the existing > documentation. The output_plugin parameter needs to be passed too. > Why do we need it for physical slots? The syntax in repl_gram.y is as follows: /*

Re: row filtering for logical replication

2022-02-01 Thread Amit Kapila
On Tue, Feb 1, 2022 at 9:15 AM houzj.f...@fujitsu.com wrote: > > On Monday, January 31, 2022 9:02 PM Amit Kapila > > Review Comments: === 1. + else if (IsA(node, OpExpr)) + { + /* OK, except user-defined operators are not allowed. */ + if (((OpExpr *) node)->opno >=

Doc: CREATE_REPLICATION_SLOT command requires the plugin name

2022-02-01 Thread Antonin Houska
I got a syntax error when using the command according to the existing documentation. The output_plugin parameter needs to be passed too. -- Antonin Houska Web: https://www.cybertec-postgresql.com diff --git a/doc/src/sgml/protocol.sgml b/doc/src/sgml/protocol.sgml index 24e93f9b28..6065c18fdf

Re: Support for NSS as a libpq TLS backend

2022-02-01 Thread Daniel Gustafsson
> On 31 Jan 2022, at 22:48, Daniel Gustafsson wrote: >> On 31 Jan 2022, at 17:24, Stephen Frost wrote: >> I agree that it's concerning to hear that OpenLDAP dropped support for >> NSS... though I don't seem to be able to find any information as to why >> they decided to do so. > > I was also

Re: POC: GROUP BY optimization

2022-02-01 Thread Andrey V. Lepikhov
On 7/22/21 3:58 AM, Tomas Vondra wrote: I've simplified the costing a bit, and the attached version actually undoes all the "suspicious" plan changes in postgres_fdw. It changes one new plan, but that seems somewhat reasonable, as it pushes sort to the remote side. I tried to justify heap-sort

Re: Make mesage at end-of-recovery less scary.

2022-02-01 Thread Pavel Borisov
> > This version 10 is changed in the following points. > > - Rewrited the comment in ValidXLogRecordHeader. > - ValidXLogRecordHeader > Thanks! Maybe it can be written little bit shorter: pe = (char *) record + XLOG_BLCKSZ - (RecPtr & (XLOG_BLCKSZ - 1)); as pe = p + XLOG_BLCKSZ - (RecPtr &

Re: RFC: Logging plan of the running query

2022-02-01 Thread Kyotaro Horiguchi
At Tue, 1 Feb 2022 01:51:11 +0900, Fujii Masao wrote in > > > On 2022/01/28 17:45, torikoshia wrote: > >> There is the case where the request to log a query plan is skipped > >> even while the target backend is running a query. If this happens, > >> users can just retry pg_log_query_plan().