Re: cfbot is listing committed patches?

2023-04-11 Thread Peter Smith
On Tue, Apr 11, 2023 at 4:36 PM Thomas Munro wrote: > > On Tue, Apr 11, 2023 at 6:16 PM Peter Smith wrote: > > cfbot [1] is listing some already committed patches under the "Needs > > Review" category. For example here are some of mine [1][2]. And > > because they are already committed, the 'appl

Re: When to drop src/tools/msvc support

2023-04-11 Thread Magnus Hagander
On Tue, Apr 11, 2023 at 12:27 AM Andres Freund wrote: > > Hi, > > On 2023-04-10 19:55:35 +0100, Dave Page wrote: > > Projects other than the EDB installers use the MSVC build system - e.g. > > pgAdmin uses it’s own builds of libpq and other tools (psql, pg_dump etc) > > that are pretty heavily bak

A minor adjustment to get_cheapest_path_for_pathkeys

2023-04-11 Thread Richard Guo
The check for parallel_safe should be even cheaper than cost comparison so I think it's better to do that first. The attached patch does this and also updates the comment to mention the requirement about being parallel-safe. Thanks Richard v1-0001-Adjustment-to-get_cheapest_path_for_pathkeys.pa

Re: Improve logging when using Huge Pages

2023-04-11 Thread Kyotaro Horiguchi
At Tue, 11 Apr 2023 15:17:46 +0900, Michael Paquier wrote in > On Thu, Mar 23, 2023 at 05:25:46PM +0900, Kyotaro Horiguchi wrote: > > Wouldn't storing the value in the shared memory itself work? Though, > > that space does become almost dead for the server's lifetime... > > Sure, it would work.

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

2023-04-11 Thread Peter Smith
Here are a few more review comments for patch v3-0001. == doc/src/sgml/ref/pgupgrade.sgml 1. + + --include-logical-replication-slots + + +Upgrade logical replication slots. Only permanent replication slots +included. Note that pg_upgrade does not check t

ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread David Rowley
Over in [1], Horiguchisan mentioned a few things about VACUUM's new BUFFER_USAGE_LIMIT option. 1) buffer_usage_limit in the ERROR messages should be consistently in uppercase. 2) defGetString() already checks for opt->args == NULL and raises an ERROR when it is. I suspect that Melanie might have

Re: When to drop src/tools/msvc support

2023-04-11 Thread Dave Page
On Tue, 11 Apr 2023 at 08:09, Magnus Hagander wrote: > On Tue, Apr 11, 2023 at 12:27 AM Andres Freund wrote: > > > > Hi, > > > > On 2023-04-10 19:55:35 +0100, Dave Page wrote: > > > Projects other than the EDB installers use the MSVC build system - e.g. > > > pgAdmin uses it’s own builds of libp

Re: Minimal logical decoding on standbys

2023-04-11 Thread Drouvot, Bertrand
Hi, On 4/11/23 7:36 AM, Noah Misch wrote: On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote: --- /dev/null +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -0,0 +1,720 @@ +# logical decoding on standby : test logical decoding, +# recovery conflict and standby promotion.

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

2023-04-11 Thread Peter Smith
On Sat, Apr 8, 2023 at 12:00 AM Hayato Kuroda (Fujitsu) wrote: > ... > > 17. main > > > > + /* > > + * Create replication slots if requested. > > + * > > + * XXX This must be done after doing pg_resetwal command because the > > + * command will remove required WALs. > > + */ > > + if (user_opts.in

Re: Minimal logical decoding on standbys

2023-04-11 Thread Drouvot, Bertrand
Hi, On 4/11/23 10:20 AM, Drouvot, Bertrand wrote: Hi, On 4/11/23 7:36 AM, Noah Misch wrote: On Fri, Apr 07, 2023 at 11:12:26AM -0700, Andres Freund wrote: --- /dev/null +++ b/src/test/recovery/t/035_standby_logical_decoding.pl @@ -0,0 +1,720 @@ +# logical decoding on standby : test logical de

Re: Support logical replication of DDLs

2023-04-11 Thread Amit Kapila
On Mon, Apr 10, 2023 at 3:16 PM Zhijie Hou (Fujitsu) wrote: > > On Friday, April 7, 2023 11:23 amhouzj.f...@fujitsu.com > wrote: > > > > On Friday, April 7, 2023 11:13 AM houzj.f...@fujitsu.com > > > > > > > > On Tuesday, April 4, 2023 7:35 PM shveta malik > > > > > > wrote: > > > > > > > > On

Re: Minimal logical decoding on standbys

2023-04-11 Thread Drouvot, Bertrand
Hi, On 4/11/23 10:55 AM, Drouvot, Bertrand wrote: Hi, I think we might want to add: $node_primary->wait_for_replay_catchup($node_standby); before calling the slot creation. It's done in the attached, would it be possible to give it a try please? Actually, let's also wait for the cascading

Re: proposal: psql: show current user in prompt

2023-04-11 Thread Pavel Stehule
st 5. 4. 2023 v 18:40 odesílatel Pavel Stehule napsal: > > > st 5. 4. 2023 v 17:47 odesílatel Robert Haas > napsal: > >> On Wed, Apr 5, 2023 at 11:34 AM Pavel Stehule >> wrote: >> > If the GUC_REPORT should not be used, then only one possibility is >> enhancing the protocol, about the possibil

Re: Non-superuser subscription owners

2023-04-11 Thread Amit Kapila
On Mon, Apr 10, 2023 at 9:15 PM Robert Haas wrote: > > On Sat, Apr 8, 2023 at 1:35 AM Amit Kapila wrote: > > Do we need to have a check for this new option "password_required" in > > maybe_reread_subscription() where we "Exit if any parameter that > > affects the remote connection was changed."?

Re: User functions for building SCRAM secrets

2023-04-11 Thread Magnus Hagander
On Fri, Mar 24, 2023 at 4:48 PM Daniel Gustafsson wrote: > > > On 22 Mar 2023, at 15:06, Jonathan S. Katz wrote: > > On 3/22/23 2:48 AM, Michael Paquier wrote: > > >> I was reading this thread again, and pondered on this particular > >> point: > >> https://www.postgresql.org/message-id/caawbhmhjc

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

2023-04-11 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for giving comments! PSA new version. > == > doc/src/sgml/ref/pgupgrade.sgml > > 1. > + > + --include-logical-replication-slots > + > + > +Upgrade logical replication slots. Only permanent replication slots > +included. Note that p

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

2023-04-11 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thank you for giving explanation. > > Hopefully, someone will correct me if this explanation is wrong, but > my understanding of the different prefixes is like this -- > > "XXX" is used as a marker for future developers to consider maybe > revisiting/improving something that the com

Missing wait_for_replay_catchup in 035_standby_logical_decoding.pl

2023-04-11 Thread Drouvot, Bertrand
hi hackers, while working on the issue reported by Noah in [1], I realized that there is an issue in 035_standby_logical_decoding.pl. The issue is here: " $node_standby->reload; $node_primary->psql('postgres', q[CREATE DATABASE testdb]); $node_primary->safe_psql('testdb', qq[CREATE TABLE decod

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

2023-04-11 Thread Hayato Kuroda (Fujitsu)
Dear hackers, My PoC does not read and copy logical mappings files to new node, but I did not analyzed in detail whether it is correct. Now I have done this and considered that they do not have to be copied because transactions which executed at the same time as rewriting are no longer decoded. H

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andrew Dunstan
On 2023-04-11 Tu 04:05, Dave Page wrote: On Tue, 11 Apr 2023 at 08:09, Magnus Hagander wrote: On Tue, Apr 11, 2023 at 12:27 AM Andres Freund wrote: > > Hi, > > On 2023-04-10 19:55:35 +0100, Dave Page wrote: > > Projects other than the EDB installers use the MSVC

Re: fairywren exiting in ecpg

2023-04-11 Thread Andrew Dunstan
On 2023-04-04 Tu 08:22, Andrew Dunstan wrote: On 2023-04-03 Mo 21:15, Andres Freund wrote: Hi, Looks like fairywren is possibly seeing something I saw before and spent many days looking into: https://postgr.es/m/20220909235836.lz3igxtkcjb5w7zb%40awork3.anarazel.de which led me to add the fol

Re: When to drop src/tools/msvc support

2023-04-11 Thread Dave Page
On Tue, 11 Apr 2023 at 11:58, Andrew Dunstan wrote: > > On 2023-04-11 Tu 04:05, Dave Page wrote: > > > > On Tue, 11 Apr 2023 at 08:09, Magnus Hagander wrote: > >> On Tue, Apr 11, 2023 at 12:27 AM Andres Freund >> wrote: >> > >> > Hi, >> > >> > On 2023-04-10 19:55:35 +0100, Dave Page wrote: >> >

Re: When to drop src/tools/msvc support

2023-04-11 Thread Jonathan S. Katz
On 4/11/23 7:54 AM, Dave Page wrote: On Tue, 11 Apr 2023 at 11:58, Andrew Dunstan > wrote: For meson you just need to to "pip install meson ninja" in your python distro and you should be good to go (they will be installed in python's Scripts directory).

Re: Unnecessary confirm work on logical replication

2023-04-11 Thread Emre Hasegeli
> In fact, the WAL sender always starts reading WAL from restart_lsn, > which in turn is always <= confirmed_flush_lsn. While reading WAL, WAL > sender may read XLOG_RUNNING_XACTS WAL record with lsn <= > confirmed_flush_lsn. While processing XLOG_RUNNING_XACTS record it may > update its restart_ls

Re: An oversight in ExecInitAgg for grouping sets

2023-04-11 Thread David Rowley
On Mon, 9 Jan 2023 at 22:21, David Rowley wrote: > One extra thing I noticed was that I had to add a new > VALGRIND_MAKE_MEM_DEFINED in AllocSetAlloc when grabbing an item off > the freelist. I didn't quite manage to figure out why that's needed as > when we do AllocSetFree() we don't mark the pfr

Re: When to drop src/tools/msvc support

2023-04-11 Thread Dave Page
On Tue, 11 Apr 2023 at 13:52, Jonathan S. Katz wrote: > On 4/11/23 7:54 AM, Dave Page wrote: > > > > > > On Tue, 11 Apr 2023 at 11:58, Andrew Dunstan > > wrote: > > > > For meson you just need to to "pip install meson ninja" in your > > python distro and you s

Protecting allocator headers with Valgrind

2023-04-11 Thread David Rowley
Over on [1], Tom mentioned that we might want to rethink the decision to not protect chunk headers with Valgrind. That thread fixed a bug that was accessing array element -1, which effectively was reading the MemoryChunk at the start of the allocated chunk as an array element. I wrote a patch to

Re: is_superuser is not documented

2023-04-11 Thread Fujii Masao
On 2023/04/08 23:53, Joseph Koshakow wrote: On Mon, Apr 3, 2023 at 10:47 AM Fujii Masao mailto:masao.fu...@oss.nttdata.com>> wrote: >    Yes, the patch has not been committed yet because of lack of review comments. >    Do you have any review comments on this patch? >    Or you think it'

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
Dave Page writes: > On Tue, 11 Apr 2023 at 13:52, Jonathan S. Katz wrote: >> Do you think we'll have enough info by end of this week to make a >> decision on whether we can drop MSVC in v16? > There's no way I can test anything this week - I'm on leave for most of it > and AFK. > But, my point w

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Tom Lane
David Rowley writes: > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > BUFFER_USAGE_LIMIT option. > 1) buffer_usage_limit in the ERROR messages should be consistently in > uppercase. FWIW, I think this is exactly backward, and so is whatever code you based this on. Our us

Re: When to drop src/tools/msvc support

2023-04-11 Thread Jonathan S. Katz
On 4/11/23 9:49 AM, Tom Lane wrote: Dave Page writes: On Tue, 11 Apr 2023 at 13:52, Jonathan S. Katz wrote: Do you think we'll have enough info by end of this week to make a decision on whether we can drop MSVC in v16? There's no way I can test anything this week - I'm on leave for most of

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
"Jonathan S. Katz" writes: > On 4/11/23 9:49 AM, Tom Lane wrote: >> Sadly, I think we really have to ship both build systems in v16. > But maybe we can make it clear in the release notes + docs that this is > slated for deprecation and will be removed from v17? That way we can say > "we provide

v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-11 Thread Justin Pryzby
Reduced from sqlsmith, this query fails under debug_parallel_query=1. The elog was added at: 55416b26a98fcf354af88cdd27fc2e045453b68a But (I'm not sure) the faulty commit may be 8edd0e7946 (Suppress Append and MergeAppend plan nodes that have a single child). postgres=# SET force_parallel_mode =1

Various typo fixes

2023-04-11 Thread Thom Brown
Hi, I've attached a patch with a few typo and grammatical fixes. Regards Thom various_typos_and_grammar_fixes.patch Description: Binary data

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > I've attached a patch with a few typo and grammatical fixes. I think you actually sent the "git-diff" manpage :( -- Justin

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Melanie Plageman
Hi, static void infobits_desc(StringInfo buf, uint8 infobits, const char *keyname) { appendStringInfo(buf, "%s: [", keyname); Why can we assume that there will be no space at the end here? I know we need to be able to avoid doing the comma overwriting if no flags were set. In general, we exp

Re: Various typo fixes

2023-04-11 Thread Thom Brown
On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > I've attached a patch with a few typo and grammatical fixes. > > I think you actually sent the "git-diff" manpage :( Oh dear, well that's a first. Thanks for pointing out. Re-a

Re: When to drop src/tools/msvc support

2023-04-11 Thread Jonathan S. Katz
On 4/11/23 10:12 AM, Tom Lane wrote: "Jonathan S. Katz" writes: On 4/11/23 9:49 AM, Tom Lane wrote: Sadly, I think we really have to ship both build systems in v16. But maybe we can make it clear in the release notes + docs that this is slated for deprecation and will be removed from v17? T

Re: Non-superuser subscription owners

2023-04-11 Thread Robert Haas
On Tue, Apr 11, 2023 at 5:53 AM Amit Kapila wrote: > I think additionally, we should check that the new owner of the > subscription is not a superuser, otherwise, anyway, this parameter is > ignored. Please find the attached to add this check. I don't see why we should check that. It makes this d

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 03:43:12PM +0100, Thom Brown wrote: > On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > > I've attached a patch with a few typo and grammatical fixes. > > > > I think you actually sent the "git-diff" m

Re: Should vacuum process config file reload more often

2023-04-11 Thread Masahiko Sawada
On Fri, Apr 7, 2023 at 10:23 PM Daniel Gustafsson wrote: > > > On 7 Apr 2023, at 15:07, Melanie Plageman wrote: > > On Fri, Apr 7, 2023 at 2:53 AM Masahiko Sawada > > wrote: > > >> + /* Only log updates to cost-related variables */ > >> + if (vacuum_cost_delay == original_cost_delay

Re: running logical replication as the subscription owner

2023-04-11 Thread Robert Haas
On Mon, Apr 10, 2023 at 10:09 PM Shinoda, Noriyoshi (PN Japan FSIP) wrote: > Hi hackers, > Thank you for developing a great feature. > The following commit added a column to the pg_subscription catalog. > > https://git.postgresql.org/gitweb/?p=postgresql.git;a=commit;h=482675987bcdffb390ae735cfd

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Melanie Plageman
On Tue, Apr 11, 2023 at 4:00 AM David Rowley wrote: > > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > BUFFER_USAGE_LIMIT option. > > 1) buffer_usage_limit in the ERROR messages should be consistently in > uppercase. I did notice that all the other VACUUM options don't do

[BUG #17888] Incorrect memory access in gist__int_ops for an input array with many elements

2023-04-11 Thread Ankit Kumar Pandey
Hi, I was looking at this issue: https://www.postgresql.org/message-id/flat/17888-f72930e6b5ce8c14%40postgresql.org pfree call on contrib/intarray/_int_gist.c:345 ```     if (in != (ArrayType *) DatumGetPointer(entry->key))    pfree(in); ``` leads to BogusFree function call and server

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 09:05:31 +0100, Dave Page wrote: > Probably my main concern is that the Meson build can use the same version > of the VC++ compiler that we use (v14), which is carefully matched for > compatibility with all the various components, just in case anything passes > CRT pointers aroun

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-11 Thread Justin Pryzby
On Wed, Mar 22, 2023 at 10:00:48AM -0700, Andres Freund wrote: > I don't know whether others think we should apply it this release, given the > "late submission", but I tend to think it's not worth caring the complication > of vacuum_defer_cleanup_age forward. I don't see any utility in waiting; i

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 10:44:09 -0400, Jonathan S. Katz wrote: > On 4/11/23 10:12 AM, Tom Lane wrote: > > "Jonathan S. Katz" writes: > > > On 4/11/23 9:49 AM, Tom Lane wrote: > > > > Sadly, I think we really have to ship both build systems in v16. > > > > > But maybe we can make it clear in the relea

Re: Memory leak from ExecutorState context?

2023-04-11 Thread Jehan-Guillaume de Rorthais
On Sat, 8 Apr 2023 02:01:19 +0200 Jehan-Guillaume de Rorthais wrote: > On Fri, 31 Mar 2023 14:06:11 +0200 > Jehan-Guillaume de Rorthais wrote: > > [...] > > After rebasing Tomas' memory balancing patch, I did some memory measures > to answer some of my questions. Please, find in attachment

Re: Documentation for building with meson

2023-04-11 Thread Andres Freund
Hi, On 2023-03-28 12:27:26 -0700, samay sharma wrote: > Subject: [PATCH v9 1/5] Make minor additions and corrections to meson docs > > This commit makes a few corrections to the meson docs > and adds a few instructions and links for better clarity. > --- > doc/src/sgml/installation.sgml | 24 +++

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
Andres Freund writes: > Here's a draft docs change. > I added the in two places in install-windows.sgml so it's visible > on both the generated pages in the chunked output. That does mean it's visible > twice nearby in the single-page output, but I don't think that's commonly > used. I don't ag

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 7:40 AM Melanie Plageman wrote: > static void > infobits_desc(StringInfo buf, uint8 infobits, const char *keyname) > { > appendStringInfo(buf, "%s: [", keyname); > > Why can we assume that there will be no space at the end here? I don't think that anybody is going to t

Re: Fix the miss consideration of tuple_fraction during add_paths_to_append_rel

2023-04-11 Thread Andy Fan
On Mon, Apr 10, 2023 at 9:56 PM Zhang Mingli wrote: > > There is spare indent at else if. > > - if (childrel->pathlist != NIL && > + if (cheapest_startup_path && cheapest_startup_path->param_info == NULL) > + accumulate_append_subpath(cheapest_startup_path, > + &subpaths, NULL); > + else if (ch

Re: Direct I/O

2023-04-11 Thread Andres Freund
Hi, On 2023-04-09 16:40:54 -0700, Noah Misch wrote: > On Sun, Apr 09, 2023 at 02:45:16PM -0700, Andres Freund wrote: > > It's not *just* that scenario. With a few concurrent connections you can get > > into problematic territory even with halfway reasonable shared buffers. > > I am not familiar wi

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:30:15 -0400, Tom Lane wrote: > Andres Freund writes: > > Here's a draft docs change. > > > I added the in two places in install-windows.sgml so it's visible > > on both the generated pages in the chunked output. That does mean it's > > visible > > twice nearby in the singl

Re: Should we remove vacuum_defer_cleanup_age?

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 11:33:01 -0500, Justin Pryzby wrote: > On Wed, Mar 22, 2023 at 10:00:48AM -0700, Andres Freund wrote: > > I don't know whether others think we should apply it this release, given the > > "late submission", but I tend to think it's not worth caring the > > complication > > of vac

[PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Aleksander Alekseev
Hi, While playing with a new single board computer (VisionFive 2) I discovered that postgresql:unsafe_tests suite fails like this: ``` --- /home/user/projects/postgresql/src/test/modules/unsafe_tests/expected/rolenames.out 2023-04-11 14:58:57.844550612 + +++ /home/user/projects/postgresql/b

Issue in postgres_fdw causing unnecessary wait for cancel request reply

2023-04-11 Thread Fujii Masao
Hi, When using postgres_fdw, in the event of a local transaction being aborted while a query is running on a remote server, postgres_fdw sends a cancel request to the remote server. However, if PQgetCancel() returned NULL and no cancel request was issued, I found that postgres_fdw could still wai

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Sandro Santilli
On Mon, Apr 10, 2023 at 11:09:40PM -0400, Regina Obe wrote: > > On Mon, Apr 03, 2023 at 09:26:25AM +0700, Yurii Rashkovskii wrote: > > > I want to chime in on the issue of lower-number releases that are > > > released after higher-number releases. The way I see this particular > > > problem is that

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 10:34 AM Peter Geoghegan wrote: > > description | off: 119, xmax: 1105, flags: 0x00, old_infobits: > > [], new off: 100, xmax 0 > > That doesn't seem great to me either. I don't like this ambiguity, > because it seems like it makes the description hard to parse in a wa

Assertion being hit during WAL replay

2023-04-11 Thread Tom Lane
I have seen this failure a couple of times recently while testing code that caused crashes and restarts: #2 0x009987e3 in ExceptionalCondition ( conditionName=conditionName@entry=0xb31bc8 "mode == RBM_NORMAL || mode == RBM_ZERO_ON_ERROR || mode == RBM_ZERO_AND_LOCK", fileName=fi

Re: When to drop src/tools/msvc support

2023-04-11 Thread Tom Lane
Andres Freund writes: > Except that we're planning to remove it anyway, the structure of the docs here > seems a bit off... Indeed. We'll have to migrate some of that info elsewhere when the time comes. regards, tom lane

Re: fairywren exiting in ecpg

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 07:10:20 -0400, Andrew Dunstan wrote: > The error hasn't been seen since I set this about a week ago. This issue really bothers me, but I am at my wits end how to debug it, given that we get a segfault only if we *disable* getting crash reports / core dumps in some form. There's

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-11 Thread Alexander Lakhin
Hi Andres, 07.04.2023 11:39, Andres Freund wrote: Hi, On 2023-04-06 18:15:14 -0700, Andres Freund wrote: I think it might be worth having a C test for some of the bufmgr.c API. Things like testing that retrying a failed relation extension works the second time round. A few hours after this I

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Andrew Dunstan
On 2023-04-11 Tu 14:25, Aleksander Alekseev wrote: Hi, While playing with a new single board computer (VisionFive 2) I discovered that postgresql:unsafe_tests suite fails like this: ``` --- /home/user/projects/postgresql/src/test/modules/unsafe_tests/expected/rolenames.out 2023-04-11 14:58:57

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Aleksander Alekseev
Hi Andrew, > I don't think we can protect against all possible user names. Wouldn't it be > better to run the tests under an OS user with a different name, like > "marmaduke"? ("user" is a truly terrible default user name). 100% agree. The point is not to protect against all possible user names

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 11:48 AM Peter Geoghegan wrote: > Attached revision deals with this by spelling out the names in full > (e.g., "old_xmax" and "new_xmax"). It also reorders the output fields > to match the order from the physical UPDATE, HOT_UPDATE, and LOCK WAL > record types, on the theor

v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Justin Pryzby
Yes, $SUBJECT is correct. On an old centos6 VM which I'd forgotten about and never removed from monitoring, I noticed that a process had recently crashed... Maybe this is an issue which was already fixed, but I looked and find no bug report nor patch about it. Feel free to dismiss the problem re

Re: Assertion being hit during WAL replay

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 14:48:44 -0400, Tom Lane wrote: > I have seen this failure a couple of times recently while > testing code that caused crashes and restarts: Do you have a quick repro recipe? > #2 0x009987e3 in ExceptionalCondition ( > conditionName=conditionName@entry=0xb31bc8 "m

Re: v12: ERROR: subplan "InitPlan 2 (returns $4)" was not initialized

2023-04-11 Thread Tom Lane
Justin Pryzby writes: > postgres=# SET force_parallel_mode =1; CREATE TABLE x (i int) PARTITION BY > RANGE (i); CREATE TABLE x1 PARTITION OF x DEFAULT ; > select * from pg_class, > lateral (select pg_catalog.bit_and(1) > from pg_class as sample_1 > where case when EXISTS ( >

Re: [PATCH] Use role name "system_user" instead of "user" for unsafe_tests

2023-04-11 Thread Tom Lane
Aleksander Alekseev writes: >> I don't think we can protect against all possible user names. Wouldn't it be >> better to run the tests under an OS user with a different name, like >> "marmaduke"? ("user" is a truly terrible default user name). > 100% agree. The point is not to protect against a

Re: Minimal logical decoding on standbys

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 11:04:50 +0200, Drouvot, Bertrand wrote: > On 4/11/23 10:55 AM, Drouvot, Bertrand wrote: > > Hi, > > > > I think we might want to add: > > > > $node_primary->wait_for_replay_catchup($node_standby); > > > > before calling the slot creation. > > > > It's done in the attached, w

infobits_set WAL record struct field is int8

2023-04-11 Thread Peter Geoghegan
Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added infobits_set fields to certain WAL records. However, in the case of xl_heap_lock, it made the data type int8 rather than uint8. I believe that this was a minor oversight. Attached patch fixes the issue. -- Peter Geoghegan v

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 14:46:23 -0500, Justin Pryzby wrote: > Yes, $SUBJECT is correct. > > On an old centos6 VM which I'd forgotten about and never removed from > monitoring, I noticed that a process had recently crashed... > > Maybe this is an issue which was already fixed, but I looked and find no >

RE: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Regina Obe
> Packager might actually know better in that they could ONLY consider the > packages ever packaged by them. > I'm a special case packager cause I'm on the PostGIS project and I only package postgis related extensions, but even I find this painful. But for most packagers, I think they are juggli

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:35:38 -0700, Andres Freund wrote: > On 2023-04-11 14:46:23 -0500, Justin Pryzby wrote: > > Yes, $SUBJECT is correct. > > > > On an old centos6 VM which I'd forgotten about and never removed from > > monitoring, I noticed that a process had recently crashed... > > > > Maybe thi

Re: Minimal logical decoding on standbys

2023-04-11 Thread Tom Lane
Andres Freund writes: > I think we should lower the log level, but perhaps wait for a few more cycles > in case there are random failures? Removing -log_min_messages = 'debug2' -log_error_verbosity = verbose not only reduces 035's log output volume from 1.6MB to 260kB, but also speeds it up non

Re: is_superuser is not documented

2023-04-11 Thread Joseph Koshakow
On Tue, Apr 11, 2023 at 9:37 AM Fujii Masao wrote: >> > Yes, this patch moves the descriptions of is_superuser to config.sgml >> > and changes its group to PRESET_OPTIONS. >> >> is_superuser feels a little out of place in this file. All of >> the options here apply to the en

Re: infobits_set WAL record struct field is int8

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 13:13:49 -0700, Peter Geoghegan wrote: > Commit 0ac5ad5134 ("Improve concurrency of foreign key locking") added > infobits_set fields to certain WAL records. However, in the case of > xl_heap_lock, it made the data type int8 rather than uint8. > > I believe that this was a minor

Re: Assertion being hit during WAL replay

2023-04-11 Thread Tom Lane
Andres Freund writes: > On 2023-04-11 14:48:44 -0400, Tom Lane wrote: >> I have seen this failure a couple of times recently while >> testing code that caused crashes and restarts: > Do you have a quick repro recipe? Here's something related to what I hit that time: diff --git a/src/backend/opt

Re: infobits_set WAL record struct field is int8

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 1:48 PM Andres Freund wrote: > Makes sense. Looks like there never was a flag defined for the sign bit, > luckily. I assume you're just going to apply this for HEAD? Yes. I'm also going to rename the TransactionId field to "xmax", for consistency with nearby very similar

Re: Various typo fixes

2023-04-11 Thread Daniel Gustafsson
> On 11 Apr 2023, at 16:53, Justin Pryzby wrote: > I think "logical" should be a here. Agree, it should in order to be consistent. -- Daniel Gustafsson

Re: When to drop src/tools/msvc support

2023-04-11 Thread Alvaro Herrera
On 2023-Apr-11, Michael Paquier wrote: > Getting a CI job able to do some validation for MSVC would be indeed > nice. What's the plan in the buildfarm with this coverage? Would all > the animals switch to meson (Chocolatey + StrawberryPerl, I assume) > for the job or will there still be some cov

Re: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Sandro Santilli
On Tue, Apr 11, 2023 at 04:36:04PM -0400, Regina Obe wrote: > > > Hey, best would be having support for wildcard wouldn't it ? > > I'm a woman of compromise. Sure 1 file would be ideal, but > I'd rather live with a big file listing all version upgrades > than 1000 files with the same information

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Melanie Plageman
On Tue, Apr 11, 2023 at 1:35 PM Peter Geoghegan wrote: > > On Tue, Apr 11, 2023 at 7:40 AM Melanie Plageman > wrote: > > Not the fault of this patch, but I also noticed that heap UPDATE and > > HOT_UPDATE records have xmax twice and don't differentiate between new > > and old. I think that was p

Re: Documentation for building with meson

2023-04-11 Thread samay sharma
Hi, On Tue, Apr 11, 2023 at 10:18 AM Andres Freund wrote: > Hi, > > On 2023-03-28 12:27:26 -0700, samay sharma wrote: > > Subject: [PATCH v9 1/5] Make minor additions and corrections to meson > docs > > > > This commit makes a few corrections to the meson docs > > and adds a few instructions and

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread David Rowley
On Thu, 16 Feb 2023 at 00:05, David Rowley wrote: > I pushed the rename patch earlier. > > How should we go about making contact with the owners? After a quick round of making direct contact with the few remaining buildfarm machine owners which are still using force_parallel_mode, we're now down

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread Tom Lane
David Rowley writes: > In preparation for when that's ticked off, I'd like to gather people's > thoughts about if we should remove force_parallel_mode from v16? To clarify, you just mean removing that alias, right? +1. I don't see a reason to wait longer once the buildfarm is on board.

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread David Rowley
(On Wed, 12 Apr 2023 at 01:58, Tom Lane wrote: > > David Rowley writes: > > Over in [1], Horiguchisan mentioned a few things about VACUUM's new > > BUFFER_USAGE_LIMIT option. > > > 1) buffer_usage_limit in the ERROR messages should be consistently in > > uppercase. > > FWIW, I think this is exac

Re: Can we do something to help stop users mistakenly using force_parallel_mode?

2023-04-11 Thread David Rowley
On Wed, 12 Apr 2023 at 09:53, Tom Lane wrote: > > David Rowley writes: > > In preparation for when that's ticked off, I'd like to gather people's > > thoughts about if we should remove force_parallel_mode from v16? > > To clarify, you just mean removing that alias, right? +1. > I don't see a rea

Re: Assertion being hit during WAL replay

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 16:54:53 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2023-04-11 14:48:44 -0400, Tom Lane wrote: > >> I have seen this failure a couple of times recently while > >> testing code that caused crashes and restarts: > > > Do you have a quick repro recipe? > > Here's somet

Re: Various typo fixes

2023-04-11 Thread Justin Pryzby
On Tue, Apr 11, 2023 at 09:53:00AM -0500, Justin Pryzby wrote: > On Tue, Apr 11, 2023 at 03:43:12PM +0100, Thom Brown wrote: > > On Tue, 11 Apr 2023 at 15:39, Justin Pryzby wrote: > > > > > > On Tue, Apr 11, 2023 at 03:36:02PM +0100, Thom Brown wrote: > > > > I've attached a patch with a few typo

Re: ERROR messages in VACUUM's PARALLEL option

2023-04-11 Thread Tom Lane
David Rowley writes: > Thanks for chipping in on this. Can you confirm if you think this > should apply to VACUUM options? We're not talking GUCs here. My druthers would be to treat them similarly to GUCs. I recognize that I might be in the minority, and that doing so would entail touching a lot

RE: [PATCH] Support % wildcard in extension upgrade filenames

2023-04-11 Thread Regina Obe
> Personally I don't see the benefit of 1 big file vs. many 0-length files to justify > the cost (time and complexity) of a PostgreSQL change, with the > corresponding cost of making use of this new functionality based on > PostgreSQL version. > >From a packaging stand-point 1 big file is better

Re: When to drop src/tools/msvc support

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 19:44:20 +0200, Alvaro Herrera wrote: > On 2023-Apr-11, Michael Paquier wrote: > > > Getting a CI job able to do some validation for MSVC would be indeed > > nice. What's the plan in the buildfarm with this coverage? Would all > > the animals switch to meson (Chocolatey + Straw

Re: Show various offset arrays for heap WAL records

2023-04-11 Thread Peter Geoghegan
On Tue, Apr 11, 2023 at 2:29 PM Melanie Plageman wrote: > > That doesn't seem great to me either. I don't like this ambiguity, > > because it seems like it makes the description hard to parse in a way > > that flies in the face of what we're trying to do here, in general. > > So it seems like it m

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 7:46 AM Justin Pryzby wrote: > Unfortunately: > (gdb) p area->control->handle > $3 = 0 > (gdb) p segment_map->header->magic > value has been optimized out > (gdb) p index > $4 = Hmm, well index I can find from parameters: > #2 0x00991470 in ExceptionalCondition

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-04-11 Thread Andres Freund
Hi, On 2023-04-11 22:00:00 +0300, Alexander Lakhin wrote: > A few days later I've found a new defect introduced with 31966b151. That's the same issue that Tom also just reported, at https://postgr.es/m/392271.1681238924%40sss.pgh.pa.us Attached is my WIP fix, including a test. Greetings, Andre

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Justin Pryzby
On Wed, Apr 12, 2023 at 11:18:36AM +1200, Thomas Munro wrote: > Can you print *area->control? (gdb) p *area->control $1 = {segment_header = {magic = 216163848, usable_pages = 62, size = 1048576, prev = 1, next = 18446744073709551615, bin = 4, freed = false}, handle = 0, segment_handles = {0, 369

Re: v15b1: FailedAssertion("segment_map->header->magic == (DSA_SEGMENT_HEADER_MAGIC ^ area->control->handle ^ index)", File: "dsa.c", ..)

2023-04-11 Thread Thomas Munro
On Wed, Apr 12, 2023 at 11:37 AM Justin Pryzby wrote: > $ ls /dev/shm/ |grep 3696856876 || echo not found > not found Oh, of course it would have restarted after it crashed and unlinked that... So the remaining traces of that memory *might* be in the core file, depending (IIRC) on the core filte

Re: Add LZ4 compression in pg_dump

2023-04-11 Thread Justin Pryzby
On Mon, Feb 27, 2023 at 02:33:04PM +, gkokola...@pm.me wrote: > > > - Finally, the "Nothing to do in the default case" comment comes from > > > Michael's commit 5e73a6048: > > > > > > + /* > > > + * Custom and directory formats are compressed by default with gzip when > > > + * available, not

  1   2   >