Re: Could not run generate_unaccent_rules.py script when update unicode

2023-09-26 Thread Japin Li
On Wed, 27 Sep 2023 at 13:46, Michael Paquier wrote: > On Wed, Sep 27, 2023 at 09:15:00AM +0800, Japin Li wrote: >> On Wed, 27 Sep 2023 at 08:03, Michael Paquier wrote: >>> I am not sure that many people run this script frequently so that may >>> not be worth adding a check for a defined,

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-26 Thread vignesh C
On Wed, 27 Sept 2023 at 06:58, Peter Smith wrote: > > On Tue, Sep 26, 2023 at 11:57 PM vignesh C wrote: > > > > On Tue, 26 Sept 2023 at 13:03, Peter Smith wrote: > > > > > > Here are some comments for patch v2-0001. > > > > > > == > > > src/backend/replication/logical/worker.c > > > > > >

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Michael Paquier
On Wed, Sep 27, 2023 at 04:51:29AM +, Zhijie Hou (Fujitsu) wrote: > While searching the code, I noticed one postgres fork where the PGoutputData > is > used in other places, although it's a separate fork, but it seems better to > discuss the removal separately. > > [1] >

Re: Could not run generate_unaccent_rules.py script when update unicode

2023-09-26 Thread Michael Paquier
On Wed, Sep 27, 2023 at 09:15:00AM +0800, Japin Li wrote: > On Wed, 27 Sep 2023 at 08:03, Michael Paquier wrote: >> I am not sure that many people run this script frequently so that may >> not be worth adding a check for a defined, still empty or incorrect > > Yeah, not frequently, however, it

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-26 Thread vignesh C
On Tue, 26 Sept 2023 at 13:03, Peter Smith wrote: > > Here are some comments for patch v2-0001. > == > src/test/subscription/t/027_nosuperuser.pl > > 3. > # The apply worker should get restarted after the superuser prvileges are > # revoked for subscription owner alice. > > typo > >

Re: pg_upgrade --check fails to warn about abstime

2023-09-26 Thread Suraj Kharage
On Fri, Sep 22, 2023 at 4:44 PM Alvaro Herrera wrote: > On 2023-Sep-21, Tom Lane wrote: > > > Bruce Momjian writes: > > > > Wow, I never added code to pg_upgrade to check for that, and no one > > > complained either. > > > > Yeah, so most people had indeed listened to warnings and moved away >

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Amit Kapila
On Wed, Sep 27, 2023 at 10:26 AM Michael Paquier wrote: > > On Wed, Sep 27, 2023 at 10:15:24AM +0530, Amit Kapila wrote: > > It's like that from the beginning. Now, even if we want to move, your > > suggestion is not directly related to this patch as we are just > > changing one field, and that

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Michael Paquier
On Wed, Sep 27, 2023 at 10:15:24AM +0530, Amit Kapila wrote: > It's like that from the beginning. Now, even if we want to move, your > suggestion is not directly related to this patch as we are just > changing one field, and that too to fix a bug. We should start a > separate thread to gather a

RE: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Zhijie Hou (Fujitsu)
On Wednesday, September 27, 2023 12:45 PM Amit Kapila > > On Wed, Sep 27, 2023 at 9:46 AM Michael Paquier > wrote: > > > > On Wed, Sep 27, 2023 at 09:39:19AM +0530, Amit Kapila wrote: > > > On Wed, Sep 27, 2023 at 9:10 AM Michael Paquier > wrote: > > >> Err, actually, I am going to disagree

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Amit Kapila
On Wed, Sep 27, 2023 at 9:46 AM Michael Paquier wrote: > > On Wed, Sep 27, 2023 at 09:39:19AM +0530, Amit Kapila wrote: > > On Wed, Sep 27, 2023 at 9:10 AM Michael Paquier wrote: > >> Err, actually, I am going to disagree here for the patch of HEAD. It > >> seems to me that there is zero need

Re: Synchronizing slots from primary to standby

2023-09-26 Thread Peter Smith
Here are some more review comments for the patch v19-0002. This is a WIP these review comments are all for the file slotsync.c == src/backend/replication/logical/slotsync.c 1. wait_for_primary_slot_catchup + WalRcvExecResult *res; + TupleTableSlot *slot; + Oid slotRow[1] = {LSNOID}; +

RE: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-26 Thread Hayato Kuroda (Fujitsu)
Dear Bharath, Thank you for reviewing! > Thanks for the new patch. Here's a comment on v46: > > 1. > +Datum > +binary_upgrade_validate_wal_logical_end(PG_FUNCTION_ARGS > +{ oid => '8046', descr => 'for use by pg_upgrade', > + proname => 'binary_upgrade_validate_wal_logical_end', proisstrict =>

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Michael Paquier
On Wed, Sep 27, 2023 at 09:39:19AM +0530, Amit Kapila wrote: > On Wed, Sep 27, 2023 at 9:10 AM Michael Paquier wrote: >> Err, actually, I am going to disagree here for the patch of HEAD. It >> seems to me that there is zero need for pgoutput.h and we don't need >> to show PGOutputData to the

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Amit Kapila
On Wed, Sep 27, 2023 at 9:10 AM Michael Paquier wrote: > > On Tue, Sep 26, 2023 at 01:55:10PM +, Zhijie Hou (Fujitsu) wrote: > > On Tuesday, September 26, 2023 4:40 PM Amit Kapila > > wrote: > >> Do we really need a new parameter in above structure? Can't we just use the > >> existing

Re: pg_upgrade and logical replication

2023-09-26 Thread Michael Paquier
On Tue, Sep 26, 2023 at 09:40:48AM +0530, Amit Kapila wrote: > On Mon, Sep 25, 2023 at 11:43 AM Michael Paquier wrote: >> Sure, that's assuming that the publisher side is upgraded. > > At some point, user needs to upgrade publisher and subscriber could > itself have some publications defined

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Michael Paquier
On Tue, Sep 26, 2023 at 01:55:10PM +, Zhijie Hou (Fujitsu) wrote: > On Tuesday, September 26, 2023 4:40 PM Amit Kapila > wrote: >> Do we really need a new parameter in above structure? Can't we just use the >> existing origin in the same structure? Please remember if this needs to be >>

Re: Index AmInsert Parameter Confused?

2023-09-26 Thread jacktby jacktby
> 2023年9月27日 00:45,Matthias van de Meent 写道: > > On Tue, 26 Sept 2023 at 18:38, jacktby jacktby wrote: >> >> typedef bool (*aminsert_function) (Relation indexRelation, >> Datum *values, >> bool *isnull, >> ItemPointer heap_tid, >> Relation heapRelation, >> IndexUniqueCheck checkUnique,

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-26 Thread Peter Smith
On Tue, Sep 26, 2023 at 11:57 PM vignesh C wrote: > > On Tue, 26 Sept 2023 at 13:03, Peter Smith wrote: > > > > Here are some comments for patch v2-0001. > > > > == > > src/backend/replication/logical/worker.c > > > > 1. maybe_reread_subscription > > > > ereport(LOG, > >

Re: Fail hard if xlogreader.c fails on out-of-memory

2023-09-26 Thread Noah Misch
On Wed, Sep 27, 2023 at 11:06:37AM +1300, Thomas Munro wrote: > On Tue, Sep 26, 2023 at 8:38 PM Michael Paquier wrote: > > Thoughts and/or comments are welcome. > > I don't have an opinion yet on your other thread about making this > stuff configurable for replicas, but for the simple crash

Re: Could not run generate_unaccent_rules.py script when update unicode

2023-09-26 Thread Japin Li
On Wed, 27 Sep 2023 at 08:03, Michael Paquier wrote: > On Tue, Sep 26, 2023 at 10:43:40AM +0800, Japin Li wrote: >> # Allow running this even without --with-python >> PYTHON ?= python >> >> $(srcdir)/unaccent.rules: generate_unaccent_rules.py >> ../../src/common/unicode/UnicodeData.txt

Re: Annoying build warnings from latest Apple toolchain

2023-09-26 Thread Tom Lane
I wrote: > Since updating to Xcode 15.0, my macOS machines have been > spitting a bunch of linker-generated warnings. There > seems to be one instance of > ld: warning: -multiply_defined is obsolete > for each loadable module we link ... I poked into this a little more. We started using

Re: Could not run generate_unaccent_rules.py script when update unicode

2023-09-26 Thread Michael Paquier
On Tue, Sep 26, 2023 at 10:43:40AM +0800, Japin Li wrote: > # Allow running this even without --with-python > PYTHON ?= python > > $(srcdir)/unaccent.rules: generate_unaccent_rules.py > ../../src/common/unicode/UnicodeData.txt Latin-ASCII.xml > $(PYTHON) $< --unicode-data-file $(word

Re: XLog size reductions: Reduced XLog record header size for PG17

2023-09-26 Thread Michael Paquier
On Mon, Sep 25, 2023 at 07:40:00PM +0200, Matthias van de Meent wrote: > On Wed, 20 Sept 2023 at 07:06, Michael Paquier wrote: >> #define COPY_HEADER_FIELD(_dst, _size)\ >> do {\ >> -if (remaining < _size)\ >> +

Re: Correct the documentation for work_mem

2023-09-26 Thread Bruce Momjian
On Wed, Sep 27, 2023 at 02:05:44AM +1300, David Rowley wrote: > On Tue, 12 Sept 2023 at 03:03, Bruce Momjian wrote: > > > > On Mon, Sep 11, 2023 at 10:02:55PM +1200, David Rowley wrote: > > > It's certainly not a show-stopper. I do believe the patch makes some > > > improvements. The reason I'd

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-09-26 Thread Jeff Davis
On Mon, 2023-09-25 at 00:31 -0700, Gurjeet Singh wrote: > Please see attached v4 of the patch. The patch takes care of rebase > to > the master/17-devel branch, and includes some changes, too. FWIW I got some failures applying. I didn't investigate much, and instead I looked at your git branch

Re: pg_rewind with cascade standby doesn't work well

2023-09-26 Thread Michael Paquier
On Tue, Sep 26, 2023 at 06:44:50PM +0300, Aleksander Alekseev wrote: >> And also, I'm afraid that I'm not sure what kind of tests I have to make >> for fix this behavior. Would you mind giving me some advice? > > Personally I would prefer not to increase the scope of work. Your TAP > test added

Re: Fail hard if xlogreader.c fails on out-of-memory

2023-09-26 Thread Michael Paquier
On Wed, Sep 27, 2023 at 11:06:37AM +1300, Thomas Munro wrote: > I don't have an opinion yet on your other thread about making this > stuff configurable for replicas, but for the simple crash recovery > case shown here, hard failure makes sense to me. Also, if we conclude that we're OK with just

Re: Is this a problem in GenericXLogFinish()?

2023-09-26 Thread Jeff Davis
On Wed, 2023-09-27 at 00:14 +0300, Heikki Linnakangas wrote: > Looks correct. You now loop through all the block IDs three times, > however. I wonder if that is measurably slower, but even if it's not, > was there a reason you wanted to move the XLogRegisterBuffer() calls > to > a separate loop?

Re: Document that server will start even if it's unable to open some TCP/IP ports

2023-09-26 Thread Bruce Momjian
On Tue, Sep 12, 2023 at 05:25:44PM -0700, Gurjeet Singh wrote: > On Fri, Sep 8, 2023 at 7:52 AM Bruce Momjian wrote: > > > > On Thu, Sep 7, 2023 at 09:21:07PM -0700, Nathan Bossart wrote: > > > On Thu, Sep 07, 2023 at 07:13:44PM -0400, Bruce Momjian wrote: > > > > On Thu, Sep 7, 2023 at

Re: pg_upgrade instructions involving "rsync --size-only" might lead to standby corruption?

2023-09-26 Thread Bruce Momjian
On Thu, Sep 7, 2023 at 01:52:45PM -0400, Bruce Momjian wrote: > On Mon, Jul 10, 2023 at 02:37:24PM -0700, Nikolay Samokhvalov wrote: > > Maybe. It will require changes in other parts of this doc. > > Thinking (here:  > > https://gitlab.com/postgres/postgres/-/merge_requests/18/diffs) > > > >

Annoying build warnings from latest Apple toolchain

2023-09-26 Thread Tom Lane
Since updating to Xcode 15.0, my macOS machines have been spitting a bunch of linker-generated warnings. There seems to be one instance of ld: warning: -multiply_defined is obsolete for each loadable module we link, and some program links complain ld: warning: ignoring duplicate libraries:

Re: Fail hard if xlogreader.c fails on out-of-memory

2023-09-26 Thread Thomas Munro
On Tue, Sep 26, 2023 at 8:38 PM Michael Paquier wrote: > Thoughts and/or comments are welcome. I don't have an opinion yet on your other thread about making this stuff configurable for replicas, but for the simple crash recovery case shown here, hard failure makes sense to me. Here are some

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-26 Thread Tom Lane
Tomas Vondra writes: > Hmmm, I got to install BETA2 yesterday, but I still se the tcl failure: Huh. I'm baffled as to what's up there. Is it possible that this is actually a hardware-based difference? I didn't think there was much difference between Pi 3B and Pi 4, but we're running out of

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-26 Thread Karl O. Pinc
Sep 26, 2023 1:10:55 PM Tom Lane : > "Karl O. Pinc" writes: >> For the last hunk you'd change around "anything".  Write: >> "... it will be truncated to less than NAMEDATALEN characters and >> the bytes of the string which are not printable ASCII characters ...". > >> Notice that I have also

Re: [PATCH] pgrowlocks: Make mode names consistent with docs

2023-09-26 Thread Bruce Momjian
On Thu, Sep 7, 2023 at 12:58:29PM -0400, Bruce Momjian wrote: > You are right something is wrong. However, I looked at your patch and I > am thinking we need to go the other way and add "For" in the upper > block, rather than removing it in the lower one. I have two reasons. > Looking at the

Re: Better help output for pgbench -I init_steps

2023-09-26 Thread Peter Eisentraut
On 22.09.23 22:01, Tristen Raab wrote: The following review has been posted through the commitfest application: make installcheck-world: not tested Implements feature: tested, passed Spec compliant: not tested Documentation:not tested Hello, I've reviewed all 4 of

Re: Is this a problem in GenericXLogFinish()?

2023-09-26 Thread Heikki Linnakangas
On 26/09/2023 22:32, Jeff Davis wrote: On Mon, 2023-09-25 at 13:04 +0300, Heikki Linnakangas wrote: Yes, that's a problem. Patch attached. I rearranged the code a bit to follow the expected pattern of: write, mark dirty, WAL, set LSN. I think computing the deltas could also be moved earlier,

Re: Obsolete reference to pg_relation in comment

2023-09-26 Thread Bruce Momjian
On Thu, Sep 7, 2023 at 10:44:25AM +0200, Daniel Gustafsson wrote: > > On 6 Sep 2023, at 21:13, Bruce Momjian wrote: > > On Wed, Jul 26, 2023 at 05:14:08PM -0400, Tom Lane wrote: > > >> I think we should reword this to just generically claim that holding > >> the Relation reference open for the

Re: Add const qualifiers

2023-09-26 Thread David Steele
On 9/26/23 06:34, Peter Eisentraut wrote: On 09.09.23 21:03, David Steele wrote: On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c

Re: Is this a problem in GenericXLogFinish()?

2023-09-26 Thread Jeff Davis
On Mon, 2023-09-25 at 13:04 +0300, Heikki Linnakangas wrote: > Yes, that's a problem. Patch attached. I rearranged the code a bit to follow the expected pattern of: write, mark dirty, WAL, set LSN. I think computing the deltas could also be moved earlier, outside of the critical section, but I'm

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-26 Thread Jim Jones
Hi! On 26.09.23 15:19, Peter Eisentraut wrote: On 04.09.23 11:54, Jim Jones wrote: This patch proposes the column "comment" to the pg_hba_file_rules view. It basically parses the inline comment (if any) of a valid pg_hba.conf entry and displays it in the new column. For such pg_hba entries

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-26 Thread Tom Lane
"Karl O. Pinc" writes: > For the last hunk you'd change around "anything". Write: > "... it will be truncated to less than NAMEDATALEN characters and > the bytes of the string which are not printable ASCII characters ...". > Notice that I have also changed "that" to "which" just above. > I

Re: Questions about the new subscription parameter: password_required

2023-09-26 Thread Robert Haas
On Tue, Sep 26, 2023 at 1:00 PM Jeff Davis wrote: > As I said earlier, I think the best thing to do is to just have a > section that describes when to use password_required, what specific > things you should do to satisfy that case, and what caveats you should > avoid. Something like: > > "If

Re: Eager page freeze criteria clarification

2023-09-26 Thread Robert Haas
On Tue, Sep 26, 2023 at 11:11 AM Andres Freund wrote: > That I'd like you to expand on "using the RedoRecPtr of the latest checkpoint > rather than the LSN of the previou vacuum." - I can think of ways of doing so > that could end up with quite different behaviour... Yeah, me too. I'm not sure

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-26 Thread Karl O. Pinc
On Tue, 26 Sep 2023 13:40:26 + "Hayato Kuroda (Fujitsu)" wrote: > Your effort is quite helpful for me. You're welcome. > Before replying your comments, I thought I should show the difference > between versions. Regarding old versions (here PG15 was used), > non-ASCIIs (like Japanese) are

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-26 Thread Ranier Vilela
Em ter., 26 de set. de 2023 às 09:30, Ranier Vilela escreveu: > Em ter., 26 de set. de 2023 às 07:34, Ashutosh Bapat < > ashutosh.bapat@gmail.com> escreveu: > >> On Tue, Sep 26, 2023 at 3:32 PM David Rowley >> wrote: >> > >> > find_base_rel() could be made more robust for free by just

Re: Questions about the new subscription parameter: password_required

2023-09-26 Thread Jeff Davis
On Tue, 2023-09-26 at 18:21 +0200, Benoit Lobréau wrote: > On 9/26/23 16:27, Benoit Lobréau wrote: > > I will try to come up with a documentation patch. > > This is my attempt at a documentation patch. > + If the ownership of a subscription with password_required=true + is transferred

Re: Index AmInsert Parameter Confused?

2023-09-26 Thread Matthias van de Meent
On Tue, 26 Sept 2023 at 18:38, jacktby jacktby wrote: > > typedef bool (*aminsert_function) (Relation indexRelation, > Datum *values, > bool *isnull, > ItemPointer heap_tid, > Relation heapRelation, > IndexUniqueCheck checkUnique, > bool indexUnchanged, > struct IndexInfo

Re: False "pg_serial": apparent wraparound” in logs

2023-09-26 Thread Heikki Linnakangas
On 25/08/2023 07:29, Imseih (AWS), Sami wrote: diff --git a/src/backend/storage/lmgr/predicate.c b/src/backend/storage/lmgr/predicate.c index 1af41213b4..7e7be3b885 100644 --- a/src/backend/storage/lmgr/predicate.c +++ b/src/backend/storage/lmgr/predicate.c @@ -992,6 +992,13 @@

Re: Questions about the new subscription parameter: password_required

2023-09-26 Thread Benoit Lobréau
On 9/26/23 16:27, Benoit Lobréau wrote: I will try to come up with a documentation patch. This is my attempt at a documentation patch. -- Benoit Lobréau Consultant http://dalibo.comFrom a73baa91032fff37ef039168c276508553830f86 Mon Sep 17 00:00:00 2001 From: benoit Date: Tue, 26 Sep 2023

Re: Remove MSVC scripts from the tree

2023-09-26 Thread Andrew Dunstan
On 2023-09-26 Tu 01:25, NINGWEI CHEN wrote: On Fri, 22 Sep 2023 10:12:29 +0900 Michael Paquier wrote: As of today, I can see that the only buildfarm members relying on these scripts are bowerbird and hamerkop, so these two would fail if the patch attached were to be applied today. I am

Re: Eager page freeze criteria clarification

2023-09-26 Thread Peter Geoghegan
On Tue, Sep 26, 2023 at 8:19 AM Andres Freund wrote: > However, I'm not at all convinced doing this on a system wide level is a good > idea. Databases do often contain multiple types of workloads at the same > time. E.g., we want to freeze aggressively in a database that has the bulk of > its

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-26 Thread Greg Sabino Mullane
Also a reluctant -1, as the comment-at-EOL style is very rare in my experience over the years of seeing many a pg_hba file.

Re: pg_rewind with cascade standby doesn't work well

2023-09-26 Thread Aleksander Alekseev
Hi, > >> IMO a test is needed that makes sure no one is going to break this in > >> the future. > > > > You definitely need more complex test scenarios for that. If you can > > come up with new ways to make the TAP tests of pg_rewind mode modular > > in handling more complicated node setups,

Re: XLog size reductions: smaller XLRec block header for PG17

2023-09-26 Thread Aleksander Alekseev
Hi, > This scheme is reused later for the XLogRecord xl_tot_len field over > at [0], and FWIW is thus being reused. Sure, it's tailored to this WAL > use case, but IMO we're getting good value from it. We don't use > protobuf or JSON for WAL, we use our own serialization format. Having > some

Re: SET ROLE documentation improvement

2023-09-26 Thread Yurii Rashkovskii
On Mon, Sep 25, 2023 at 3:09 PM Nathan Bossart wrote: > On Fri, Sep 15, 2023 at 02:36:16PM -0700, Yurii Rashkovskii wrote: > > On Fri, Sep 15, 2023 at 1:47 PM Nathan Bossart > > > wrote: > >> I think another issue is that the aforementioned note doesn't mention > the > >> new SET option added

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-09-26 Thread Robert Haas
On Mon, Sep 25, 2023 at 1:56 PM Jeff Davis wrote: > Do users like Bob do that today? If not, what causes you to expect them > to do so in the future? What I would say is that if there's a reasonable way of securing your stuff and you don't make use of it, that's your problem. If securing your

Re: Eager page freeze criteria clarification

2023-09-26 Thread Andres Freund
Hi, On 2023-09-25 14:16:46 -0700, Peter Geoghegan wrote: > On Mon, Sep 25, 2023 at 11:45 AM Robert Haas wrote: > I'm surprised that there hasn't been any discussion of the absolute > amount of system-wide freeze debt on this thread. If 90% of the pages > in the entire database are frozen, it'll

Re: pg_resetwal tests, logging, and docs update

2023-09-26 Thread Aleksander Alekseev
Hi, > Hmm, I think I like "where" better. OK. > Attached is an updated patch set where I have split the changes into > smaller pieces. The last two patches still have some open questions > about what certain constants mean etc. The other patches should be settled. The patches 0001..0005 seem

Re: Eager page freeze criteria clarification

2023-09-26 Thread Andres Freund
Hi, On 2023-09-25 14:45:07 -0400, Robert Haas wrote: > On Fri, Sep 8, 2023 at 12:07 AM Andres Freund wrote: > > > Downthread, I proposed using the RedoRecPtr of the latest checkpoint > > > rather than the LSN of the previou vacuum. I still like that idea. > > > > Assuming that "downthread"

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2023-09-26 Thread Nazir Bilal Yavuz
Hi, On Tue, 26 Sept 2023 at 13:48, Peter Eisentraut wrote: > > On 25.09.23 12:56, Nazir Bilal Yavuz wrote: > > + # Only run if a specific OS is not requested and if there are changes in > > docs > > + # or in the CI files. > > + skip: > > > +$CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:.*'

Index AmInsert Parameter Confused?

2023-09-26 Thread jacktby jacktby
typedef bool (*aminsert_function) (Relation indexRelation, Datum *values, bool *isnull,

Re: Questions about the new subscription parameter: password_required

2023-09-26 Thread Benoit Lobréau
On 9/22/23 21:58, Robert Haas wrote I think that there normally shouldn't be any problem here, because if form->subpasswordrequired is true, we expect that the connection string should contain a password which the remote side actually uses, or we expect the subscription to be owned by the

Re: Partial aggregates pushdown

2023-09-26 Thread Bruce Momjian
On Tue, Sep 26, 2023 at 06:26:25AM +, fujii.y...@df.mitsubishielectric.co.jp wrote: > Hi Mr.Bruce. > > I think this needs to be explained in the docs. I am ready to adjust the > > patch to improve the wording whenever you are > > ready. Should I do it now and post an updated version for

What's the ItemPointer's meaning here?

2023-09-26 Thread jacktby jacktby
/* Typedef for callback function for table_index_build_scan */ typedef void (*IndexBuildCallback) (Relation index, ItemPointer tid, Datum *values,

Re: dikkop seems unhappy because of openssl stuff (FreeBSD 14-BETA1)

2023-09-26 Thread Tomas Vondra
On 9/20/23 20:09, Tomas Vondra wrote: > On 9/20/23 19:59, Tomas Vondra wrote: >> >> >> On 9/20/23 01:24, Tom Lane wrote: >>> Tomas Vondra writes: bsd@freebsd:~ $ tclsh8.6 % clock scan "1/26/2010" time value too large/small to represent >>> >>> In hopes of replicating this, I

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-26 Thread vignesh C
On Tue, 26 Sept 2023 at 13:03, Peter Smith wrote: > > Here are some comments for patch v2-0001. > > == > src/backend/replication/logical/worker.c > > 1. maybe_reread_subscription > > ereport(LOG, > (errmsg("logical replication worker for subscription \"%s\" > will restart because of a

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-26 Thread Daniel Gustafsson
> On 26 Sep 2023, at 15:19, Peter Eisentraut wrote: > > On 04.09.23 11:54, Jim Jones wrote: >> This patch proposes the column "comment" to the pg_hba_file_rules view. It >> basically parses the inline comment (if any) of a valid pg_hba.conf entry >> and displays it in the new column. >> For

RE: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Zhijie Hou (Fujitsu)
On Tuesday, September 26, 2023 4:40 PM Amit Kapila wrote: > > On Tue, Sep 19, 2023 at 12:48 PM Zhijie Hou (Fujitsu) > wrote: > > > > - static bool publish_no_origin; > > > > This flag is also local to pgoutput instance, and we didn't reset the > > flag in output shutdown callback, so if we

RE: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Zhijie Hou (Fujitsu)
On Tuesday, September 19, 2023 1:44 PM Michael Paquier wrote: > > On Tue, Sep 19, 2023 at 04:10:39AM +, Zhijie Hou (Fujitsu) wrote: > > Currently we have serval global variables in pgoutput, but each of > > them is inherently local to an individual pgoutput instance. This > > could cause

RE: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-26 Thread Hayato Kuroda (Fujitsu)
Dear Karl, Thank you for reviewing! PSA new version. > I see a few problems with the English and style of the patches > and am commenting below and have signed up as a reviewer. Your effort is quite helpful for me. > At > commitfest.postgresql.org I have marked the thread > as needing author

Re: [PATCH] Add inline comments to the pg_hba_file_rules view

2023-09-26 Thread Peter Eisentraut
On 04.09.23 11:54, Jim Jones wrote: This patch proposes the column "comment" to the pg_hba_file_rules view. It basically parses the inline comment (if any) of a valid pg_hba.conf entry and displays it in the new column. For such pg_hba entries ... host db jim 127.0.0.1/32 md5 # foo host db

Re: Partial aggregates pushdown

2023-09-26 Thread Alexander Pyhalov
fujii.y...@df.mitsubishielectric.co.jp писал 2023-09-25 06:18: Hi Mr.Bruce, Mr.Pyhalov, Mr.Finnerty, hackers. Thank you for your valuable comments. I sincerely apologize for the very late reply. Here is a response to your comments or a fix to the patch. Tuesday, August 8, 2023 at 3:31 Bruce

Re: Correct the documentation for work_mem

2023-09-26 Thread David Rowley
On Tue, 12 Sept 2023 at 03:03, Bruce Momjian wrote: > > On Mon, Sep 11, 2023 at 10:02:55PM +1200, David Rowley wrote: > > It's certainly not a show-stopper. I do believe the patch makes some > > improvements. The reason I'd prefer to see either "and" or "and/or" > > in place of "or" is because

[Code Cleanup] : Small code cleanup in twophase.sql

2023-09-26 Thread Nishant Sharma
Hi, PFA small code cleanup in twophase.sql. Which contains a drop table statement for 'test_prepared_savepoint'. Which, to me, appears to be missing in the cleanup section of that file. To support it I have below points:- 1) Grepping this table 'test_prepared_savepoint' shows occurrences only

Re: Add test module for Table Access Method

2023-09-26 Thread Fabrízio de Royes Mello
On Mon, Jun 5, 2023 at 1:24 PM Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > On Sat, Jun 3, 2023 at 7:42 PM Fabrízio de Royes Mello < fabriziome...@gmail.com> wrote: > > > > > > Hi all, > > > > During the PGCon Unconference session about Table Access Method one missing item pointed

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-26 Thread David Rowley
On Wed, 27 Sept 2023 at 01:31, Ranier Vilela wrote: > It seems to me that it adds a LEA instruction. > https://godbolt.org/z/b4jK3PErE There's a fairly significant difference in the optimisability of a comparison with a compile-time constant vs a variable. For example, would you expect the

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-26 Thread Ranier Vilela
Em ter., 26 de set. de 2023 às 07:34, Ashutosh Bapat < ashutosh.bapat@gmail.com> escreveu: > On Tue, Sep 26, 2023 at 3:32 PM David Rowley wrote: > > > > find_base_rel() could be made more robust for free by just casting the > > relid and simple_rel_array_size to uint32 while checking that

Re: Opportunistically pruning page before update

2023-09-26 Thread James Coleman
On Tue, Sep 5, 2023 at 1:40 PM Melanie Plageman wrote: > > On Wed, Jun 21, 2023 at 8:51 AM James Coleman wrote: > > While at PGCon I was chatting with Andres (and I think Peter G. and a > > few others who I can't remember at the moment, apologies) and Andres > > noted that while we

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-09-26 Thread Bharath Rupireddy
On Tue, Sep 26, 2023 at 10:51 AM Hayato Kuroda (Fujitsu) wrote: > > Again, thank you for reviewing! PSA a new version. Thanks for the new patch. Here's a comment on v46: 1. +Datum +binary_upgrade_validate_wal_logical_end(PG_FUNCTION_ARGS +{ oid => '8046', descr => 'for use by pg_upgrade', +

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2023-09-26 Thread Peter Eisentraut
On 25.09.23 12:56, Nazir Bilal Yavuz wrote: + # Only run if a specific OS is not requested and if there are changes in docs + # or in the CI files. + skip: > +$CIRRUS_CHANGE_MESSAGE =~ '.*\nci-os-only:.*' || +!changesInclude('doc/**', +'.cirrus.yml', +

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-26 Thread Ashutosh Bapat
On Tue, Sep 26, 2023 at 3:32 PM David Rowley wrote: > > find_base_rel() could be made more robust for free by just casting the > relid and simple_rel_array_size to uint32 while checking that relid < > root->simple_rel_array_size. The 0th element should be NULL anyway, > so "if (rel)" should let

Re: Add const qualifiers

2023-09-26 Thread Peter Eisentraut
On 09.09.23 21:03, David Steele wrote: On 9/1/23 11:39, David Steele wrote: Hackers, I noticed that there was a mismatch between the const qualifiers for excludeDirContents in src/backend/backup/backup/basebackup.c and src/bin/pg_rewind/file_map.c and that led me to use ^static const.*\*.*=

Re: Avoid a possible out-of-bounds access (src/backend/optimizer/util/relnode.c)

2023-09-26 Thread David Rowley
On Tue, 26 Sept 2023 at 21:45, Ashutosh Bapat wrote: > However, I agree that changing find_base_rel() the way you have done > in your patch is fine and mildly future-proof. +1 to that idea > irrespective of what bitmapset functions do. I'm not a fan of adding additional run-time overhead for

Re: POC, WIP: OR-clause support for indexes

2023-09-26 Thread a.rybakina
Sorry for the duplicates, I received a letter that my letter did not reach the addressee, I thought the design was incorrect. On 26.09.2023 12:21, a.rybakina wrote: I'm sorry I didn't write for a long time, but I really had a very difficult month, now I'm fully back to work. *I was able to

Re: OpenSSL v3 performance regressions

2023-09-26 Thread Daniel Gustafsson
> On 26 Sep 2023, at 10:36, Adrien Nayrat wrote: > Should Postgres support alternative SSL libraries has HAProxy? PostgreSQL can be built with LibreSSL instead of OpenSSL, which may or may not be a better option performance wise for a particular application. Benchmarking your workload is key

Re: Move global variables of pgoutput to plugin private scope.

2023-09-26 Thread Amit Kapila
On Tue, Sep 19, 2023 at 12:48 PM Zhijie Hou (Fujitsu) wrote: > > - static bool publish_no_origin; > > This flag is also local to pgoutput instance, and we didn't reset the flag in > output shutdown callback, so if we consume changes from different slots, then > the second call would reuse the

OpenSSL v3 performance regressions

2023-09-26 Thread Adrien Nayrat
Hello, I read this article from Haproxy, they noticed OpenSSL v3 has huge performance regressions : https://github.com/haproxy/wiki/wiki/SSL-Libraries-Support-Status#openssl This is a known issue : https://github.com/openssl/openssl/issues/17627#issuecomment-1060123659 Unfortunately, v3

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-26 Thread Laurenz Albe
Here is an improved version of the patch with regression tests. Yours, Laurenz Albe From 71744ada1e2c8cfdbb57e03018572a1af623b09e Mon Sep 17 00:00:00 2001 From: Laurenz Albe Date: Tue, 26 Sep 2023 10:09:49 +0200 Subject: [PATCH] Evaluate defaults in COPY FROM only if necessary Since commit

Re: logfmt and application_context

2023-09-26 Thread Étienne BERSAC
Hi Daniel, Thanks for the feedback. Le mardi 05 septembre 2023 à 11:35 +0200, Daniel Gustafsson a écrit : > > On 30 Aug 2023, at 14:36, Étienne BERSAC wrote: > > > ..what do you think of having logfmt output along json and CSV ? > > Less ideal is > that there is no official formal definition

Fail hard if xlogreader.c fails on out-of-memory

2023-09-26 Thread Michael Paquier
Hi all, (Thomas in CC.) Now that becfbdd6c1c9 has improved the situation to detect the difference between out-of-memory and invalid WAL data in WAL, I guess that it is time to tackle the problem of what we should do when reading WAL records bit fail on out-of-memory. To summarize, currently the

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-09-26 Thread Peter Smith
Here are some comments for patch v2-0001. == src/backend/replication/logical/worker.c 1. maybe_reread_subscription ereport(LOG, (errmsg("logical replication worker for subscription \"%s\" will restart because of a parameter change", MySubscription->name))); Is this

Re: Regression in COPY FROM caused by 9f8377f7a2

2023-09-26 Thread Laurenz Albe
On Mon, 2023-09-25 at 17:49 -0400, Tom Lane wrote: > Andrew Dunstan writes: > > On 2023-09-25 Mo 11:06, Andrew Dunstan wrote: > > > On 2023-09-25 Mo 04:59, Laurenz Albe wrote: > > > > CREATE TABLE boom (t character varying(5) DEFAULT 'a long string'); > > > Thinking about this a little more,

Re: Incorrect handling of OOM in WAL replay leading to data loss

2023-09-26 Thread Michael Paquier
On Thu, Aug 10, 2023 at 02:59:07PM +0900, Michael Paquier wrote: > My apologies if I sounded unclear here. It seems to me that we should > wrap the patch on [1] first, and get it backpatched. At least that > makes for less conflicts when 0001 gets merged for HEAD when we are > able to set a

Re: Improve the log message output of basic_archive when basic_archive.archive_directory parameter is not set

2023-09-26 Thread Daniel Gustafsson
> On 26 Sep 2023, at 00:20, Nathan Bossart wrote: > > On Thu, Sep 21, 2023 at 11:18:00AM +0900, bt23nguyent wrote: >> -basic_archive_configured(ArchiveModuleState *state) >> +basic_archive_configured(ArchiveModuleState *state, char **logdetail) > > Could we do something more like

Re: [PGdocs] fix description for handling pf non-ASCII characters

2023-09-26 Thread Karl O. Pinc
Hello Hayato and Jian, On Tue, 4 Jul 2023 01:30:56 + "Hayato Kuroda (Fujitsu)" wrote: > Dear Jian, > > looks fine. Do you need to add to commitfest? > > Thank you for your confirmation. ! I registered to following: > > https://commitfest.postgresql.org/44/4437/ The way the Postgres