Re: src/test/perl/PostgreSQL/Test/*.pm not installed

2022-10-10 Thread Michael Paquier
On Mon, Oct 10, 2022 at 11:34:15AM +0200, Alvaro Herrera wrote: > I noticed that the new Perl test modules are not installed, so if you > try to use PostgreSQL/Test/Cluster.pm in an external test from pgxs, it > fails with the modules not being found. > > I see no reason for this other than

Re: Remove an unnecessary LSN calculation while validating WAL page header

2022-10-10 Thread Kyotaro Horiguchi
At Mon, 10 Oct 2022 08:53:55 +0530, Bharath Rupireddy wrote in > It looks like we have an unnecessary XLogSegNoOffsetToRecPtr() in > XLogReaderValidatePageHeader(). We pass the start LSN of the WAL page > and check if it matches with the LSN that was stored in the WAL page > header

Re: PostgreSQL Logical decoding

2022-10-10 Thread Ashutosh Bapat
Hi Ankit, On Tue, Oct 11, 2022 at 9:32 AM Ankit Oza wrote: > > Hello, > > We are looking for an example on how to consume the changes of WAL produced > by logical decoding (streaming or SQL interface) in another postgres server. built-in logical replication is good example to start looking

Re: use has_privs_of_role() for pg_hba.conf

2022-10-10 Thread Michael Paquier
On Sun, Oct 09, 2022 at 02:13:48PM -0700, Nathan Bossart wrote: > Here you go. Thanks, applied. It took me a few minutes to note that regress_regression_* is required in the object names because we need to use the same name for the parent role and the database, with "regress_" being required for

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Bharath Rupireddy
On Tue, Oct 11, 2022 at 8:20 AM Nathan Bossart wrote: > > > AFICS, the aim of the patch isn't optimizing around > > GetCurrentTimestamp() calls and the patch does seem to change quite a > > bit of them which may cause a change of the behaviour. I think that > > the GetCurrentTimestamp()

PostgreSQL Logical decoding

2022-10-10 Thread Ankit Oza
Hello, We are looking for an example on how to consume the changes of WAL produced by logical decoding (streaming or SQL interface) in another postgres server. Basically, we are trying to create a replica/standby postgre server to a primary progre server. Between Logical replication and Logical

RE: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-10-10 Thread kuroda.hay...@fujitsu.com
Dear Önder, Thanks for updating the patch! I checked yours and almost good. Followings are just cosmetic comments. === 01. relation.c - GetCheapestReplicaIdentityFullPath ``` * The reason that the planner would not pick partial indexes and indexes * with only expressions

Re: create subscription - improved warning message

2022-10-10 Thread Amit Kapila
On Mon, Oct 10, 2022 at 8:14 PM Tom Lane wrote: > > Peter Smith writes: > > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > >> I think the below gives accurate information: > >> WARNING: subscription was created, but is not connected > >> HINT: You should create the slot manually, enable

Re: subtransaction performance

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 02:20:37PM -0400, Bruce Momjian wrote: > On Fri, Oct 7, 2022 at 03:23:27PM -0700, Zhihong Yu wrote: >> I wonder if SAVEPOINT / subtransaction performance has been boosted since the >> blog was written. > > No, I have not seen any changes in this area since then. Seems

Re: Non-decimal integer literals

2022-10-10 Thread Junwang Zhao
Hi Peter, /* process digits */ + if (ptr[0] == '0' && (ptr[1] == 'x' || ptr[1] == 'X')) + { + ptr += 2; + while (*ptr && isxdigit((unsigned char) *ptr)) + { + int8 digit = hexlookup[(unsigned char) *ptr]; + + if (unlikely(pg_mul_s16_overflow(tmp, 16, )) || + unlikely(pg_sub_s16_overflow(tmp,

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

2022-10-10 Thread John Naylor
On Tue, Oct 11, 2022 at 5:31 AM David Rowley wrote: > > The proposed patches in [1] do aim to make additional usages of the > slab allocator, and I have a feeling that we'll want to fix the > performance of slab.c before those. Perhaps the Asserts are a better > option if we're to get the

Re: Switching XLog source from archive to streaming when primary available

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 11:33:57AM +0530, Bharath Rupireddy wrote: > On Mon, Oct 10, 2022 at 3:17 AM Nathan Bossart > wrote: >> I wonder if it would be better to simply remove this extra polling of >> pg_wal as a prerequisite to your patch. The existing commentary leads me >> to think there

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Nathan Bossart
On Tue, Oct 11, 2022 at 11:52:03AM +0900, Michael Paquier wrote: > Okay. So, I have reviewed the whole thing, added a description of all > the fields of BeginCopyTo() in its top comment, tweaked a few things > and added in the module an extra NOTICE with the number of processed > rows. The

Re: Query Jumbling for CALL and SET utility statements

2022-10-10 Thread Michael Paquier
On Mon, Oct 10, 2022 at 09:16:47PM +0800, Julien Rouhaud wrote: > Unless I'm missing something both can be handled using pg_node_attr() > annotations that already exists? Indeed, that should work for the locators. -- Michael signature.asc Description: PGP signature

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Michael Paquier
On Mon, Oct 10, 2022 at 05:06:39PM -0700, Nathan Bossart wrote: > Yeah, I named it that way because I figured we might want a test for the > COPY FROM callback someday. Okay. So, I have reviewed the whole thing, added a description of all the fields of BeginCopyTo() in its top comment, tweaked a

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Nathan Bossart
On Tue, Oct 11, 2022 at 07:01:26AM +0530, Bharath Rupireddy wrote: > On Mon, Oct 10, 2022 at 11:21 PM Nathan Bossart >> Outside of the code snippet you pointed out, >> I think WalReceiverMain() has a similar problem. That being said, I'm >> generally skeptical that this sort of thing is

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Michael Paquier
On Wed, Sep 30, 2020 at 01:48:12PM +0500, Andrey V. Lepikhov wrote: > Your code almost exactly the same as proposed in [1] as part of 'Fast COPY > FROM' command. But it seems there are differences. > > [1] >

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Bharath Rupireddy
On Mon, Oct 10, 2022 at 11:21 PM Nathan Bossart wrote: > Thanks for the updated patches. > > 2. With the below change, the time walreceiver spends in > > XLogWalRcvSendReply() is also included for XLogWalRcvSendHSFeedback > > right? I think it's a problem given that XLogWalRcvSendReply() can >

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 11:10:14AM -0700, Nathan Bossart wrote: > On Mon, Oct 10, 2022 at 10:51:14AM -0700, Nathan Bossart wrote: >>> +/* Find the soonest wakeup time, to limit our nap. */ >>> +nextWakeup = INT64_MAX; >>> +for (int i = 0; i <

Re: autovacuum_freeze_max_age reloption seems broken

2022-10-10 Thread Peter Geoghegan
On Mon, Oct 10, 2022 at 4:46 PM Peter Geoghegan wrote: > There is no reason to think that the user will also (say) set the > autovacuum_freeze_table_age reloption separately (not to be confused > with the vacuum_freeze_table_age GUC!). We'll usually just work off > the GUC (I mean why wouldn't

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

2022-10-10 Thread Masahiko Sawada
On Fri, Oct 7, 2022 at 2:00 PM Amit Kapila wrote: > > 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

Re: shadow variables - pg15 edition

2022-10-10 Thread David Rowley
On Tue, 11 Oct 2022 at 06:02, Tom Lane wrote: > > Alvaro Herrera writes: > > On 2022-Oct-10, Andres Freund wrote: > >> We could, but is it really a useful thing for something fixed 6 years ago? > > > Well, for people purposefully installing using older installs of Perl > > (not me, admittedly),

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Nathan Bossart
On Tue, Oct 11, 2022 at 09:01:41AM +0900, Michael Paquier wrote: > I like these toy modules, they provide test coverage while acting as a > template for new developers. I am wondering whether it should have > something for the copy from callback, actually, as it is named > "test_copy_callbacks"

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Michael Paquier
On Mon, Oct 10, 2022 at 09:38:59AM -0700, Nathan Bossart wrote: > This new callback allows the use of COPY TO's machinery in extensions. A > couple of generic use-cases are listed upthread [0], and one concrete > use-case is the aws_s3 extension [1]. FWIW, I understand that the proposal is to

autovacuum_freeze_max_age reloption seems broken

2022-10-10 Thread Peter Geoghegan
The autovacuum_freeze_max_age reloption exists so that the DBA can optionally have antiwraparound autovacuums run against a table that requires more frequent antiwraparound autovacuums. This has problems because there are actually two types of VACUUM right now (aggressive and non-aggressive),

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

2022-10-10 Thread Maciek Sakrejda
Thanks for working on this! Like Lukas, I'm excited to see more visibility into important parts of the system like this. On Mon, Oct 10, 2022 at 11:49 AM Melanie Plageman wrote: > > I've gone ahead and implemented option 1 (commented below). No strong opinion on 1 versus 2, but I guess at least

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

2022-10-10 Thread Tom Lane
David Rowley writes: > The main reason I brought it up was that only yesterday I was looking > into fixing the slowness of the Slab allocator. It's currently quite > far behind the performance of both generation.c and aset.c and it > would be very nice to bring it up to at least be on-par with

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

2022-10-10 Thread David Rowley
On Tue, 11 Oct 2022 at 10:07, Tom Lane wrote: > Yeah, slab.c hasn't any distinction between large and small chunks, > so we have to just pick one policy or the other. I'd hoped to get > away with the more robust runtime test on the basis that slab allocation > is not used so much that this'd

Re: [PATCH] Fix build with LLVM 15 or above

2022-10-10 Thread Thomas Munro
On Tue, Oct 4, 2022 at 10:45 AM Zhihong Yu wrote: > On Mon, Oct 3, 2022 at 2:41 PM Andres Freund wrote: >> On 2022-10-03 12:16:12 -0700, Andres Freund wrote: >> > I haven't yet run through the whole regression test with an assert enabled >> > llvm because an assert-enabled llvm is *SLOW*, but it

Re: meson PGXS compatibility

2022-10-10 Thread Andres Freund
Hi, On 2022-10-05 13:07:10 -0700, Andres Freund wrote: > 0004: solaris: Check for -Wl,-E directly instead of checking for gnu LD > > This allows us to get rid of the nontrivial detection of with_gnu_ld, > simplifying meson PGXS compatibility. It's also nice to delete libtool.m4. > > I

Re: problems with making relfilenodes 56-bits

2022-10-10 Thread Andres Freund
Hi, On 2022-10-10 08:10:22 -0400, Robert Haas wrote: > On Mon, Oct 10, 2022 at 5:16 AM Dilip Kumar wrote: > > I have also executed my original test after applying these patches on > > top of the 56 bit relfilenode patch. So earlier we saw the WAL size > > increased by 11% (66199.09375 kB to

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

2022-10-10 Thread Tom Lane
David Rowley writes: > Looking at your changes to SlabFree(), I don't really think that > change is well aligned to the newly proposed policy. My understanding > of the rationale behind this policy is that large chunks get malloced > and will be slower anyway, so the elog(ERROR) is less overhead

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

2022-10-10 Thread David Rowley
On Tue, 11 Oct 2022 at 08:35, Tom Lane wrote: > Hearing no comments on that, I decided that a good policy would be > to use Asserts in the paths dealing with small chunks but test-and-elog > in the paths dealing with large chunks. This seems like a good policy. I think it's good to get at least

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

2022-10-10 Thread Tom Lane
I wrote: > What I am mainly wondering about at this point is whether Asserts > are good enough or we should use actual test-and-elog checks for > these things. Hearing no comments on that, I decided that a good policy would be to use Asserts in the paths dealing with small chunks but

Re: Simplifying our Trap/Assert infrastructure

2022-10-10 Thread Tom Lane
Nathan Bossart writes: > On Sun, Oct 09, 2022 at 05:08:39PM -0400, Tom Lane wrote: >> Something I thought about but forgot to mention in the initial email: >> is it worth sprinkling these macros with "unlikely()"? > I don't see why not. I experimented with that, and found something that

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

2022-10-10 Thread Melanie Plageman
I've gone ahead and implemented option 1 (commented below). On Thu, Oct 6, 2022 at 6:23 PM Melanie Plageman wrote: > > 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

Re: list of acknowledgments for PG15

2022-10-10 Thread Bruce Momjian
On Mon, Oct 10, 2022 at 02:44:22PM -0400, Tom Lane wrote: > Bruce Momjian writes: > > On Mon, Oct 10, 2022 at 02:41:06AM -0400, Tom Lane wrote: > >> As far as I've understood, the idea is to credit people based on the > >> time frame in which their patches were committed, not on the branch(es) >

Re: list of acknowledgments for PG15

2022-10-10 Thread Tom Lane
Bruce Momjian writes: > On Mon, Oct 10, 2022 at 02:41:06AM -0400, Tom Lane wrote: >> As far as I've understood, the idea is to credit people based on the >> time frame in which their patches were committed, not on the branch(es) >> that the patches were committed to. > Is the issue that we are

Re: list of acknowledgments for PG15

2022-10-10 Thread Bruce Momjian
On Mon, Oct 10, 2022 at 02:41:06AM -0400, Tom Lane wrote: > I don't wish to object to adding Nakamori-san here, but I feel like we > need a policy that doesn't require last-minute updates to release notes. > > As far as I've understood, the idea is to credit people based on the > time frame in

Re: subtransaction performance

2022-10-10 Thread Bruce Momjian
On Fri, Oct 7, 2022 at 03:23:27PM -0700, Zhihong Yu wrote: > Hi, > I stumbled over: > > https://about.gitlab.com/blog/2021/09/29/ > why-we-spent-the-last-month-eliminating-postgresql-subtransactions/ > > I wonder if SAVEPOINT / subtransaction performance has been boosted since the > blog was

Re: [patch] \g with multiple result sets and \watch with copy queries

2022-10-10 Thread Fabien COELHO
Bonjour Daniel, Good catch! Thanks for the quick fix! As usual, what is not tested does not:-( Attached a tap test to check for the expected behavior with multiple command \g. -- Fabien.diff --git a/src/bin/psql/t/001_basic.pl b/src/bin/psql/t/001_basic.pl index f447845717..c81feadd4e

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 10:51:14AM -0700, Nathan Bossart wrote: >> +/* Find the soonest wakeup time, to limit our nap. */ >> +nextWakeup = INT64_MAX; >> +for (int i = 0; i < NUM_WALRCV_WAKEUPS; ++i) >> +nextWakeup =

Re: [patch] \g with multiple result sets and \watch with copy queries

2022-10-10 Thread Corey Huinker
> > This is a bit more complicated than the usual tests, but not > that much. > Any opinions on this? +1 I think that because it is more complicated than usual psql, we may want to comment on the intention of the tests and some of the less-than-common psql elements (\set concatenation,

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 03:22:15PM +0530, Bharath Rupireddy wrote: > Some comments on v4-0002: Thanks for taking a look. > 1. You might want to use PG_INT64_MAX instead of INT64_MAX for portability? Yes, I used PG_INT64_MAX in v5. > 2. With the below change, the time walreceiver spends in >

Re: shadow variables - pg15 edition

2022-10-10 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Oct-10, Andres Freund wrote: >> We could, but is it really a useful thing for something fixed 6 years ago? > Well, for people purposefully installing using older installs of Perl > (not me, admittedly), it does seem useful, because you get the benefit > of

Re: src/test/perl/PostgreSQL/Test/*.pm not installed

2022-10-10 Thread Tom Lane
Alvaro Herrera writes: > Only 14 and back have this problem. Ah, cool. There's no freeze on those branches ... regards, tom lane

Re: Error-safe user functions

2022-10-10 Thread Corey Huinker
> > > The idea is simple -- introduce new "error-safe" calling mode of user > functions by passing special node through FunctCallInfo.context, in > which function should write error info and return instead of throwing > it. Also such functions should manually free resources before > returning an

Re: shadow variables - pg15 edition

2022-10-10 Thread Alvaro Herrera
On 2022-Oct-10, Andres Freund wrote: > On 2022-10-10 09:37:38 -0700, Andres Freund wrote: > > On 2022-10-10 18:33:11 +0200, Alvaro Herrera wrote: > > > On 2022-Oct-10, Andres Freund wrote: > > > > > > > Given the age of affected perl instances I suspect there'll not be a > > > > lot of > > > >

Re: shadow variables - pg15 edition

2022-10-10 Thread Andres Freund
On 2022-10-10 09:37:38 -0700, Andres Freund wrote: > On 2022-10-10 18:33:11 +0200, Alvaro Herrera wrote: > > On 2022-Oct-10, Andres Freund wrote: > > > > > Given the age of affected perl instances I suspect there'll not be a lot > > > of > > > developers affected, and the number of warnings is

Re: Add index scan progress to pg_stat_progress_vacuum

2022-10-10 Thread Imseih (AWS), Sami
> One idea would be to add a flag, say report_parallel_vacuum_progress, > to IndexVacuumInfo struct and expect index AM to check and update the > parallel index vacuum progress, say every 1GB blocks processed. The > flag is true only when the leader process is vacuuming an index. Sorry for the

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Nathan Bossart
On Mon, Oct 10, 2022 at 12:41:40PM +0530, Bharath Rupireddy wrote: > IIUC, COPY TO callback helps move a table's data out of postgres > server. Just wondering, how is it different from existing solutions > like COPY TO ... PROGRAM/FILE, logical replication, pg_dump etc. that > can move a table's

Re: shadow variables - pg15 edition

2022-10-10 Thread Andres Freund
Hi, On 2022-10-10 18:33:11 +0200, Alvaro Herrera wrote: > On 2022-Oct-10, Andres Freund wrote: > > > Given the age of affected perl instances I suspect there'll not be a lot of > > developers affected, and the number of warnings is reasonably small too. > > It'd > > likely hurt more developers

Re: shadow variables - pg15 edition

2022-10-10 Thread Alvaro Herrera
On 2022-Oct-10, Andres Freund wrote: > Given the age of affected perl instances I suspect there'll not be a lot of > developers affected, and the number of warnings is reasonably small too. It'd > likely hurt more developers to not see the warnings locally, given that such > shadowing often

Re: src/test/perl/PostgreSQL/Test/*.pm not installed

2022-10-10 Thread Alvaro Herrera
On 2022-Oct-10, Tom Lane wrote: > +1, but I suppose you need some adjustment in the meson.build files > now too. Oh, right, I forgot ... > (Also, please wait for the v15 release freeze to lift.) ... and now that I look, it turns out that 15 and master need no changes: both the Makefile and the

Re: shadow variables - pg15 edition

2022-10-10 Thread Andres Freund
Hi, On 2022-10-10 12:06:22 -0400, Tom Lane wrote: > Scraping the configure logs also shows that only half of the buildfarm > (exactly 50 out of 100 reporting animals) knows -Wshadow=compatible-local, > which suggests that we might see more of these if they all did. I think it's not just newness

Re: shadow variables - pg15 edition

2022-10-10 Thread Tom Lane
David Rowley writes: > 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. >

Re: Turn TransactionIdRetreat/Advance into inline functions

2022-10-10 Thread Tom Lane
Maxim Orlov writes: >> -1. Having to touch all the call sites like this outweighs >> any claimed advantage: it makes them uglier and it will greatly >> complicate any back-patching we might have to do in those areas. > Ok, got it. But what if we change the semantics of these calls to > xid =

Re: Turn TransactionIdRetreat/Advance into inline functions

2022-10-10 Thread Maxim Orlov
> -1. Having to touch all the call sites like this outweighs > any claimed advantage: it makes them uglier and it will greatly > complicate any back-patching we might have to do in those areas. > > regards, tom lane > Ok, got it. But what if we change the semantics of

Re: Turn TransactionIdRetreat/Advance into inline functions

2022-10-10 Thread Tom Lane
Maxim Orlov writes: > I've notice recent activity to convert macros into inline functions. We > should make TransactionIdRetreat/Advance functions > Instead of a macro, should we? -1. Having to touch all the call sites like this outweighs any claimed advantage: it makes them uglier and it will

Re: create subscription - improved warning message

2022-10-10 Thread Tom Lane
Peter Smith writes: > On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: >> I think the below gives accurate information: >> WARNING: subscription was created, but is not connected >> HINT: You should create the slot manually, enable the subscription, >> and run %s to initiate replication. > +1

Re: src/test/perl/PostgreSQL/Test/*.pm not installed

2022-10-10 Thread Tom Lane
Alvaro Herrera writes: > I noticed that the new Perl test modules are not installed, so if you > try to use PostgreSQL/Test/Cluster.pm in an external test from pgxs, it > fails with the modules not being found. > I see no reason for this other than having overseen it in b235d41d9646, > so I

Turn TransactionIdRetreat/Advance into inline functions

2022-10-10 Thread Maxim Orlov
Hi! This patch is inspired by [0] and many others. I've notice recent activity to convert macros into inline functions. We should make TransactionIdRetreat/Advance functions Instead of a macro, should we? I also think about NormalTransactionIdPrecedes and NormalTransactionIdFollows, but maybe,

Re: kerberos/001_auth test fails on arm CPU darwin

2022-10-10 Thread Nazir Bilal Yavuz
Hi, Thanks for the review! On 10/1/22 14:12, Peter Eisentraut wrote: This patch could use some more in-code comments.  For example, this +# get prefix for kerberos executables and try to find them at this path +sub test_krb5_paths is not helpful.  What does it "get", where does it put it,

RE: Fix some newly modified tab-complete changes

2022-10-10 Thread shiy.f...@fujitsu.com
On Mon, Oct 10, 2022 2:12 PM shiy.f...@fujitsu.com wrote: > > On Tue, Oct 4, 2022 4:17 PM Peter Smith wrote: > > > > But, while testing I noticed another different quirk > > > > It seems that neither the GRANT nor the REVOKE auto-complete > > recognises the optional PRIVILEGE keyword > > > >

Re: Non-decimal integer literals

2022-10-10 Thread Peter Eisentraut
On 16.02.22 11:11, Peter Eisentraut wrote: The remaining patches are material for PG16 at this point, and I will set the commit fest item to returned with feedback in the meantime. Time to continue with this. Attached is a rebased and cleaned up patch for non-decimal integer literals. (I

PostgreSQL 15 GA - Oct 13, 2022

2022-10-10 Thread Jonathan S. Katz
Hi, The PostgreSQL 15 GA will be Oct 13, 2022. Thanks, Jonathan OpenPGP_signature Description: OpenPGP digital signature

Re: Add common function ReplicationOriginName.

2022-10-10 Thread Amit Kapila
On Tue, Sep 27, 2022 at 5:04 PM Aleksander Alekseev wrote: > > Hi Peter, > > > PSA patch v3 to combine the different replication origin name > > formatting in a single function ReplicationOriginNameForLogicalRep as > > suggested. > > LGTM except for minor issues with the formatting; fixed. >

doc: add entry for pg_get_partkeydef()

2022-10-10 Thread Ian Lawrence Barwick
Hi Small patch for $subject, as the other pg_get_XXXdef() functions are documented and I was looking for this one but couldn't remember what it was called. Regards Ian Barwick commit 1ab855e72e077abad247cc40619b6fc7f7758983 Author: Ian Barwick Date: Mon Oct 10 22:32:31 2022 +0900 doc:

Re: Query Jumbling for CALL and SET utility statements

2022-10-10 Thread Julien Rouhaud
Hi, On Mon, Oct 10, 2022 at 03:04:57PM +0200, Drouvot, Bertrand wrote: > > On 10/7/22 6:13 AM, Michael Paquier wrote: > > > > Probably. One part that may be tricky though is the location of the > > constants we'd like to make generic, but perhaps this could be handled > > by using a dedicated

Re: Query Jumbling for CALL and SET utility statements

2022-10-10 Thread Drouvot, Bertrand
Hi, On 10/7/22 6:13 AM, Michael Paquier wrote: 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

Re: create subscription - improved warning message

2022-10-10 Thread Robert Haas
On Mon, Oct 10, 2022 at 12:41 AM Tom Lane wrote: > I'm beginning to question the entire premise here. That is, > rather than tweaking this message until it's within hailing > distance of sanity, why do we allow the no-connect case at all? That sounds pretty nuts to me, because of the pg_dump

Re: Startup process on a hot standby crashes with an error "invalid memory alloc request size 1073741824" while replaying "Standby/LOCK" records

2022-10-10 Thread Simon Riggs
On Wed, 5 Oct 2022 at 16:30, Tom Lane wrote: > > Kyotaro Horiguchi writes: > > At Tue, 4 Oct 2022 17:15:31 -0700, Nathan Bossart > > wrote in > >> On Tue, Oct 04, 2022 at 07:53:11PM -0400, Tom Lane wrote: > >>> After further thought, maybe it'd be better to do it as attached, > >>> with one

Re: problems with making relfilenodes 56-bits

2022-10-10 Thread Robert Haas
On Mon, Oct 10, 2022 at 5:16 AM Dilip Kumar wrote: > I have also executed my original test after applying these patches on > top of the 56 bit relfilenode patch. So earlier we saw the WAL size > increased by 11% (66199.09375 kB to 73906.984375 kB) and after this > patch now the WAL generated is

Re: [BUG] Logical replica crash if there was an error in a function.

2022-10-10 Thread Alvaro Herrera
On 2022-Sep-24, Tom Lane wrote: > "Anton A. Melnikov" writes: > > [ v4-0001-Fix-logical-replica-assert-on-func-error.patch ] > > I took a quick look at this. I think you're solving the > problem in the wrong place. The real issue is why are > we not setting up ActivePortal correctly when

Re: make_ctags: use -I option to ignore pg_node_attr macro

2022-10-10 Thread Alvaro Herrera
Hello On 2022-Oct-07, Yugo NAGATA wrote: > I found that tag files generated by src/tools/make_ctags > doesn't include some keywords, that were field names of node > structs, for example norm_select in RestrictInfo. Such fields > are defined with pg_node_attr macro that was introduced > recently,

Re[2]: Possible solution for masking chosen columns when using pg_dump

2022-10-10 Thread Олег Целебровский
Hi, I applied most of suggestions: used separate files for most of added code, fixed typos/mistakes, got rid of that pesky TODO that was already implemented, just not deleted. Added tests (and functionality) for cases when you need to mask columns in tables with the same name in different

Re: Suppressing useless wakeups in walreceiver

2022-10-10 Thread Bharath Rupireddy
On Wed, Oct 5, 2022 at 11:38 PM Nathan Bossart wrote: > > I moved as much as I could to 0001 in v4. Some comments on v4-0002: 1. You might want to use PG_INT64_MAX instead of INT64_MAX for portability? 2. With the below change, the time walreceiver spends in XLogWalRcvSendReply() is also

src/test/perl/PostgreSQL/Test/*.pm not installed

2022-10-10 Thread Alvaro Herrera
I noticed that the new Perl test modules are not installed, so if you try to use PostgreSQL/Test/Cluster.pm in an external test from pgxs, it fails with the modules not being found. I see no reason for this other than having overseen it in b235d41d9646, so I propose the attached (for all

Re: create subscription - improved warning message

2022-10-10 Thread Peter Smith
On Mon, Oct 10, 2022 at 4:04 PM Amit Kapila wrote: > > On Mon, Oct 10, 2022 at 10:10 AM Tom Lane wrote: > > > > Amit Kapila writes: ... > The docs say [1]: "When creating a subscription, the remote host is > not reachable or in an unclear state. In that case, the subscription > can be created

Re: problems with making relfilenodes 56-bits

2022-10-10 Thread Dilip Kumar
On Wed, Oct 5, 2022 at 5:19 AM Andres Freund wrote: > > I light dusted off my old varint implementation from [1] and converted the > RelFileLocator and BlockNumber from fixed width integers to varint ones. This > isn't meant as a serious patch, but an experiment to see if this is a path > worth

clean up pid_t printing and get rid of pgpid_t

2022-10-10 Thread Peter Eisentraut
On 04.10.22 10:15, Peter Eisentraut wrote: I wanted to propose the attached patch to get rid of the custom pgpid_t typedef in pg_ctl.  Since we liberally use pid_t elsewhere, this seemed plausible. However, this patch fails the CompilerWarnings job on Cirrus, because apparently under mingw,

Re: Remove unnecessary commas for goto labels

2022-10-10 Thread Japin Li
On Mon, 10 Oct 2022 at 16:18, John Naylor wrote: > Interestingly, I did find that in C, some statement is needed after a > label, even an empty one, otherwise it won't compile. Yeah, this is required by ISO C [1]. > That's not the case here, though, so pushed. Thank you! [1]

Re: Remove unnecessary commas for goto labels

2022-10-10 Thread John Naylor
On Sun, Oct 9, 2022 at 10:08 AM Julien Rouhaud wrote: > > Hi, > > On Sun, Oct 09, 2022 at 07:42:58AM +0800, Japin Li wrote: > > > > Hi hackers, > > > > I find there are some unnecessary commas for goto lables, > > attached a patch to remove them. > > You mean semi-colon? +1, and a quick regex

Re: archive modules

2022-10-10 Thread Peter Eisentraut
On 05.10.22 20:57, Nathan Bossart wrote: On Wed, Oct 05, 2022 at 07:55:58PM +0200, Peter Eisentraut wrote: Leaving archive_command empty is an intentional configuration choice. What we are talking about here is, arguably, a misconfiguration, so it should result in an error. Okay. What do

Re: ps command does not show walsender's connected db

2022-10-10 Thread Bharath Rupireddy
On Mon, Oct 10, 2022 at 12:20 PM bt22nakamorit wrote: > > 2022-10-10 12:27 Bharath Rupireddy wrote: > > if (port->database_name != NULL && port->database_name[0] != '\0') > > appendStringInfo(_data, "%s ", port->database_name); > > > > The above works better. > > Thank you for the suggestion.

Re: Adding Support for Copy callback functionality on COPY TO api

2022-10-10 Thread Bharath Rupireddy
On Sun, Oct 9, 2022 at 2:44 AM Nathan Bossart wrote: > > Sorry for the noise. There was an extra #include in v4 that I've removed > in v5. IIUC, COPY TO callback helps move a table's data out of postgres server. Just wondering, how is it different from existing solutions like COPY TO ...

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-10 Thread Drouvot, Bertrand
Hi, On 10/6/22 2:53 AM, Michael Paquier wrote: On Wed, Oct 05, 2022 at 03:32:20PM +0200, Drouvot, Bertrand wrote: On 10/5/22 9:24 AM, Michael Paquier wrote: - test_role() -> test_conn() to be able to pass down a database name. - reset_pg_hba() to control the host, db and user parts. The host

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-10-10 Thread Drouvot, Bertrand
Hi, On 10/5/22 9:24 AM, Michael Paquier wrote: On Tue, Sep 20, 2022 at 01:33:09PM +0200, Drouvot, Bertrand wrote: Anyway, I have looked at the patch. + List *roles_re; + List *databases_re; + regex_thostname_re; I am surprised by the approach of using separate lists for

Re: ps command does not show walsender's connected db

2022-10-10 Thread bt22nakamorit
2022-10-10 12:27 Bharath Rupireddy wrote: if (port->database_name != NULL && port->database_name[0] != '\0') appendStringInfo(_data, "%s ", port->database_name); The above works better. Thank you for the suggestion. I have edited the patch to reflect your idea. Best, Tatsuhiro

Re: list of acknowledgments for PG15

2022-10-10 Thread Tom Lane
Peter Eisentraut writes: > On 06.10.22 18:26, Fujii Masao wrote: >> I'd propose to add "Tatsuhiro Nakamori" whose patch was back-patched to >> v15 last week, into the list. Thought? > They were added with the last update. I don't wish to object to adding Nakamori-san here, but I feel like we

Re: list of acknowledgments for PG15

2022-10-10 Thread Peter Eisentraut
On 06.10.22 18:26, 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 variants, or names in

RE: Fix some newly modified tab-complete changes

2022-10-10 Thread shiy.f...@fujitsu.com
On Tue, Oct 4, 2022 4:17 PM Peter Smith wrote: > > On Thu, Sep 29, 2022 at 12:50 PM shiy.f...@fujitsu.com > wrote: > > > > On Wed, Sep 28, 2022 1:49 PM Kyotaro Horiguchi > wrote: > > > > > > At Wed, 28 Sep 2022 14:14:01 +1000, Peter Smith > > > wrote in > ... > > > > > > > > 2. tab complete

Re: Switching XLog source from archive to streaming when primary available

2022-10-10 Thread Bharath Rupireddy
On Mon, Oct 10, 2022 at 3:17 AM Nathan Bossart wrote: > > > Instead, the simplest would be to just pass XLOG_FROM_WAL to > > XLogFileReadAnyTLI() when we're about to switch the source to stream > > mode. This doesn't change the existing behaviour. > > It might be more consistent with existing