Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-04-03 Thread Bharath Rupireddy
On Thu, Apr 4, 2024 at 10:48 AM Amit Kapila wrote: > > The v33-0001 looks good to me. I have made minor changes in the > comments/commit message and removed one part of the test which was a > bit confusing and didn't seem to add much value. Let me know what you > think of the attached? Thanks

Re: Slow catchup of 2PC (twophase) transactions on replica in LR

2024-04-03 Thread Amit Kapila
On Thu, Apr 4, 2024 at 10:53 AM Ajin Cherian wrote: > > On Wed, Mar 6, 2024 at 1:29 AM Давыдов Виталий > wrote: >> >> In usual work, the subscription has two_phase = on. I have to change this >> option at catchup stage only, but this parameter can not be altered. There >> was a patch proposal

Re: Fix for timestamp lag issue from emit_log_hook when GUC log_line_prefix has '%m'

2024-04-03 Thread Michael Paquier
On Wed, Apr 03, 2024 at 03:13:13PM +0900, Michael Paquier wrote: > While looking again at that. there were two more comments that missed > a refresh about JSON in get_formatted_log_time() and > get_formatted_start_time(). It's been a few weeks since the last > update, but I'll be able to wrap

Re: Slow catchup of 2PC (twophase) transactions on replica in LR

2024-04-03 Thread Ajin Cherian
On Wed, Mar 6, 2024 at 1:29 AM Давыдов Виталий wrote: > In usual work, the subscription has two_phase = on. I have to change this > option at catchup stage only, but this parameter can not be altered. There > was a patch proposal in past to implement altering of two_phase option, but > it was

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-04-03 Thread Amit Kapila
On Wed, Apr 3, 2024 at 8:28 PM Bharath Rupireddy wrote: > > On Wed, Apr 3, 2024 at 6:46 PM Bertrand Drouvot > wrote: > > > > Just one comment on v32-0001: > > > > +# Synced slot on the standby must get its own inactive_since. > > +is( $standby1->safe_psql( > > + 'postgres', > > +

Re: Improve eviction algorithm in ReorderBuffer

2024-04-03 Thread Jeff Davis
On Thu, 2024-04-04 at 09:31 +0900, Masahiko Sawada wrote: > IIUC, with your suggestion, sift_{up|down} needs to update the > heap_index field as well. Does it mean that the caller needs to pass > the address of heap_index down to sift_{up|down}? I'm not sure quite how binaryheap should be

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-04-03 Thread Erik Wienhold
On 2024-04-04 03:29 +0200, David G. Johnston wrote: > On Thu, Mar 28, 2024 at 8:02 PM Erik Wienhold wrote: > > > Thanks, that sounds better. I incorporated that with some minor edits > > in the attached v3. > > > > You added my missing ( but dropped the comma after "i.e." Thanks, fixed in v4.

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-04-03 Thread Bharath Rupireddy
On Thu, Apr 4, 2024 at 9:42 AM Masahiko Sawada wrote: > > @@ -1368,6 +1416,7 @@ ShutDownSlotSync(void) > if (SlotSyncCtx->pid == InvalidPid) > { > SpinLockRelease(>mutex); > + update_synced_slots_inactive_since(); > return; > } > SpinLockRelease(>mutex); > @@

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-04-03 Thread Masahiko Sawada
On Wed, Apr 3, 2024 at 11:58 PM Bharath Rupireddy wrote: > > > Please find the attached v33 patches. @@ -1368,6 +1416,7 @@ ShutDownSlotSync(void) if (SlotSyncCtx->pid == InvalidPid) { SpinLockRelease(>mutex); + update_synced_slots_inactive_since(); return; }

Re: Streaming read-ready sequential scan code

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 14:38, Melanie Plageman wrote: > Looking at it in the code, I am wondering if we should call > heap_page_prep() heap_scan_page_prep(). Just wondering if it is clear > that it is prepping a page to be scanned. You choose whatever you > think is best. I ended up calling it

Re: Popcount optimization using AVX512

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 11:50, Nathan Bossart wrote: > If we can verify this approach won't cause segfaults and can stomach the > regression between 8 and 16 bytes, I'd happily pivot to this approach so > that we can avoid the function call dance that I have in v25. > > Thoughts? If we're worried

Re: Extension Enhancement: Buffer Invalidation in pg_buffercache

2024-04-03 Thread Thomas Munro
On Fri, Mar 8, 2024 at 6:20 AM Maxim Orlov wrote: > Quite an interesting patch, in my opinion. I've decided to work on it a bit, > did some refactoring (sorry) and add > basic tests. Also, I try to take into account as much as possible notes on > the patch, mentioned by Cédric Villemain.

Re: Is it safe to cache data by GiST consistent function

2024-04-03 Thread Michał Kłeczek
> On 3 Apr 2024, at 19:02, Tom Lane wrote: > > =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: > >> pg_trgm consistent caches tigrams but it has some logic to make sure cached >> values are recalculated: > >> cache = (gtrgm_consistent_cache *) fcinfo->flinfo->fn_extra; >> if (cache

Re: On disable_cost

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 10:15, David Rowley wrote: > In short, I don't find it strange that disabling one node type results > in considering another type that we'd otherwise not consider in cases > where we assume that the disabled node type is always superior and > should always be used when it is

Re: Using the %m printf format more

2024-04-03 Thread Michael Paquier
On Fri, Mar 22, 2024 at 01:58:24PM +, Dagfinn Ilmari Mannsåker wrote: > Here's an updated patch that adds such a comment. I'll add it to the > commitfest later today unless someone commits it before then. I see no problem to do that now rather than later. So, done to make pg_regress able to

Re: PostgreSQL 17 Release Management Team & Feature Freeze

2024-04-03 Thread David Rowley
On Mon, 18 Mar 2024 at 15:50, Michael Paquier wrote: > Additionally, the RMT has set the feature freeze to be **April 8, 2024 > at 0:00 AoE** (see [1]). This is the last time to commit features for > PostgreSQL 17. In other words, no new PostgreSQL 17 feature can be > committed after April 8,

Re: Refactoring of pg_resetwal/t/001_basic.pl

2024-04-03 Thread Michael Paquier
On Tue, Mar 26, 2024 at 02:53:35PM +0300, Svetlana Derevyanko wrote: > What do you think? > > +use constant SLRU_PAGES_PER_SEGMENT => 32; Well, I disagree with what you are doing here, adding a hardcoded dependency between the test code and the backend code. I would suggest to use a more dynamic

Re: Parent/child context relation in pg_get_backend_memory_contexts()

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 12:34, Michael Paquier wrote: > I've been re-reading the patch again to remember what this is about, > and I'm OK with having this "path" column in the catalog. However, > I'm somewhat confused by the choice of having a temporary number that > shows up in the catalog

Re: Add new error_action COPY ON_ERROR "log"

2024-04-03 Thread Michael Paquier
On Tue, Apr 02, 2024 at 09:53:57AM +0900, Masahiko Sawada wrote: > Pushed. Thanks for following up with this thread. -- Michael signature.asc Description: PGP signature

Re: Streaming read-ready sequential scan code

2024-04-03 Thread Melanie Plageman
On Wed, Apr 3, 2024 at 9:08 PM David Rowley wrote: > > On Thu, 4 Apr 2024 at 06:03, Melanie Plageman > wrote: > > Attached v8 is rebased over current master (which now has the > > streaming read API). > > I've looked at the v8-0001 patch. Thanks for taking a look! > I wasn't too keen on

Re: CREATE TABLE creates a composite type corresponding to the table row, which is and is not there

2024-04-03 Thread David G. Johnston
On Thu, Mar 28, 2024 at 8:02 PM Erik Wienhold wrote: > Thanks, that sounds better. I incorporated that with some minor edits > in the attached v3. > Looks good. You added my missing ( but dropped the comma after "i.e." diff --git a/doc/src/sgml/ref/create_table.sgml

Re: Statistics Import and Export

2024-04-03 Thread Michael Paquier
On Mon, Apr 01, 2024 at 01:21:53PM -0400, Tom Lane wrote: > I'm not sure. I think if we put our heads down we could finish > the changes I'm suggesting and resolve the other issues this week. > However, it is starting to feel like the sort of large, barely-ready > patch that we often regret

Re: Streaming read-ready sequential scan code

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 06:03, Melanie Plageman wrote: > Attached v8 is rebased over current master (which now has the > streaming read API). I've looked at the v8-0001 patch. I wasn't too keen on heapbuildvis() as a function name for an external function. Since it also does pruning work, it

Re: Allow non-superuser to cancel superuser tasks.

2024-04-03 Thread Michael Paquier
On Tue, Apr 02, 2024 at 04:35:28PM +0500, Andrey M. Borodin wrote: > We can add tests just like [0] with injection points. > I mean replace that "sleep 1" with something like > "$node->wait_for_event('autovacuum worker', 'autocauum-runing');". > Currently we have no infrastructure to wait for

Re: Reports on obsolete Postgres versions

2024-04-03 Thread David G. Johnston
On Tue, Apr 2, 2024 at 1:47 PM Bruce Momjian wrote: > On Tue, Apr 2, 2024 at 11:34:46AM +0200, Magnus Hagander wrote: > > Okay, I changed "superseded" to "old", and changed "latest" to > "current", patch attached. > > I took a pass at this and found a few items of note. Changes on top of

Re: Silence Meson warning on HEAD

2024-04-03 Thread Michael Paquier
On Mon, Apr 01, 2024 at 06:46:01PM -0500, Tristan Partin wrote: > 1. version-check.diff > > Wrap the offending line in a Meson version check. > > 2. perl-string.diff > > Pass the perl program as a string via its .path() method. > > 3. meson-bump.diff > > Bump the minimum meson version from

Re: Allow non-superuser to cancel superuser tasks.

2024-04-03 Thread Leung, Anthony
Update - the condition should be && if (pgstat_get_backend_type(proc->backendId) == B_AUTOVAC_WORKER) { if (!has_privs_of_role(GetUserId(), ROLE_PG_SIGNAL_AUTOVACUUM) && !superuser()) return SIGNAL_BACKEND_NOAUTOVACUUM; } Thanks

Re: Improve eviction algorithm in ReorderBuffer

2024-04-03 Thread Masahiko Sawada
Hi, On Thu, Apr 4, 2024 at 2:32 AM Jeff Davis wrote: > > On Wed, 2024-04-03 at 01:45 -0700, Jeff Davis wrote: > > I suggest that you add a "heap_index" field to ReorderBufferTXN that > > would point to the index into the heap's array (the same as > > bh_nodeidx_entry.index in your patch). Each

Re: Allow non-superuser to cancel superuser tasks.

2024-04-03 Thread Leung, Anthony
> I don't think we should rely on !OidIsValid(proc->roleId) for signaling > autovacuum workers. That might not always be true, and I don't see any > need to rely on that otherwise. IMHO we should just add a few lines before > the existing code, which doesn't need to be changed at all: > >

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Thomas Munro
On Thu, Apr 4, 2024 at 11:51 AM Peter Eisentraut wrote: > On 30.03.24 22:27, Thomas Munro wrote: > > Hmm, OK so it doesn't have 3 available in parallel from base repos. > > But it's also about to reach end of "full support" in 2 months[1], so > > if we applied the policies we discussed in the

Re: Parent/child context relation in pg_get_backend_memory_contexts()

2024-04-03 Thread Michael Paquier
On Wed, Apr 03, 2024 at 04:20:39PM +0300, Melih Mutlu wrote: > Michael Paquier , 14 Şub 2024 Çar, 10:23 tarihinde > şunu yazdı: >> I was reading the patch, and using int[] as a representation of the >> path of context IDs up to the top-most parent looks a bit strange to >> me, with the

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Michael Paquier
On Wed, Apr 03, 2024 at 01:38:50PM -0400, Tom Lane wrote: > The discussion we had last year concluded that we were OK with > dropping 1.0.1 support when RHEL6 goes out of extended support > (June 2024 per this thread, I didn't check it). Seems like we > should have the same policy for RHEL7.

Re: Built-in CTYPE provider

2024-04-03 Thread Jeff Davis
On Tue, 2024-03-26 at 08:14 +0100, Peter Eisentraut wrote: > > Full vs. simple case mapping is more of a legacy compatibility > question, > in my mind.  There is some expectation/precedent that C.UTF-8 uses > simple case mapping, but beyond that, I don't see a reason why > someone > would want

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Peter Eisentraut
On 03.04.24 23:19, Magnus Hagander wrote: When the code is this simple, we should definitely consider carrying it ourselves. At least if we don't expect to need *other* functionality from the same library in the future, which I doubt we will from libsystemd. Well, I've long had it on my list

Re: pg_combinebackup --copy-file-range

2024-04-03 Thread Tomas Vondra
Hi, Here's a much more polished and cleaned up version of the patches, fixing all the issues I've been aware of, and with various parts merged into much more cohesive parts (instead of keeping them separate to make the changes/evolution more obvious). I decided to reorder the changes like this:

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Peter Eisentraut
On 30.03.24 22:27, Thomas Munro wrote: On Sun, Mar 31, 2024 at 9:59 AM Tom Lane wrote: Thomas Munro writes: I was reminded of this thread by ambient security paranoia. As it stands, we require 1.0.2 (but we very much hope that package maintainers and others in control of builds don't decide

Re: Popcount optimization using AVX512

2024-04-03 Thread Nathan Bossart
On Tue, Apr 02, 2024 at 11:30:39PM +0300, Ants Aasma wrote: > On Tue, 2 Apr 2024 at 00:31, Nathan Bossart wrote: >> On Tue, Apr 02, 2024 at 12:11:59AM +0300, Ants Aasma wrote: >> > What about using the masking capabilities of AVX-512 to handle the >> > tail in the same code path? Masked out

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Daniel Gustafsson
> On 4 Apr 2024, at 00:06, Tom Lane wrote: > > Daniel Gustafsson writes: >> On 3 Apr 2024, at 19:38, Tom Lane wrote: >>> Bottom line for me is that pulling 1.0.1 support now is OK, >>> but I think pulling 1.0.2 is premature. > >> Is Red Hat building and and shipping v17 packages for RHEL7 ELS

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Daniel Gustafsson
> On 3 Apr 2024, at 21:48, Andrew Dunstan wrote: > On 2024-04-03 We 15:12, Daniel Gustafsson wrote: >> The >> fact that very few animals run the ssl tests is a pet peeve of mine, it would >> be nice if we could get broader coverage there. > > Well, the only reason for that is that the SSL

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Andres Freund
Hi, On 2024-04-03 17:58:55 -0400, Tom Lane wrote: > Magnus Hagander writes: > > On Wed, Apr 3, 2024 at 7:57 PM Andres Freund wrote: > >> Openssh has now integrated [1] a patch to remove the dependency on > >> libsystemd > >> for triggering service manager readyness notifications, by inlining

Re: Streaming read-ready sequential scan code

2024-04-03 Thread Andres Freund
Hi, On 2024-04-04 09:27:35 +1300, Thomas Munro wrote: > Anecdotally by all reports I've seen so far, all-in-cache seems to be > consistently a touch faster than master if anything, for streaming seq > scan and streaming ANALYZE. That's great!, but it doesn't seem to be > due to intentional

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Tom Lane
Daniel Gustafsson writes: > On 3 Apr 2024, at 19:38, Tom Lane wrote: >> Bottom line for me is that pulling 1.0.1 support now is OK, >> but I think pulling 1.0.2 is premature. > Is Red Hat building and and shipping v17 packages for RHEL7 ELS customers? If > not then it seems mostly academical

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Tom Lane
Magnus Hagander writes: > On Wed, Apr 3, 2024 at 7:57 PM Andres Freund wrote: >> Openssh has now integrated [1] a patch to remove the dependency on >> libsystemd >> for triggering service manager readyness notifications, by inlining the >> necessary function. That's not hard, the protocol is

Re: Detoasting optionally to make Explain-Analyze less misleading

2024-04-03 Thread Tom Lane
Matthias van de Meent writes: > On Tue, 2 Apr 2024 at 17:47, Tom Lane wrote: >> IIUC, it's not possible to use the SERIALIZE option when explaining >> CREATE TABLE AS, because you can't install the instrumentation tuple >> receiver when the IntoRel one is needed. I think that's fine because >>

Re: Streaming read-ready sequential scan code

2024-04-03 Thread Melanie Plageman
On Wed, Apr 3, 2024 at 4:28 PM Thomas Munro wrote: > > On Thu, Apr 4, 2024 at 6:03 AM Melanie Plageman > wrote: > > On the topic of BAS_BULKREAD buffer access strategy, I think the least > > we could do is add an assert like this to read_stream_begin_relation() > > after calculating

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-04-03 Thread Alexander Korotkov
On Wed, Apr 3, 2024 at 10:04 PM Pavel Borisov wrote: > On Wed, 3 Apr 2024 at 22:18, Alexander Korotkov wrote: >> >> On Wed, Apr 3, 2024 at 7:55 PM Alvaro Herrera >> wrote: >> > >> > On 2024-Apr-03, Alexander Korotkov wrote: >> > >> > > Regarding the shmem data structure for LSN waiters. I

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-04-03 Thread Tom Lane
Alvaro Herrera writes: > Great, thanks for looking. Pushed now, I'll be closing the commitfest > entry shortly. On my machine, headerscheck does not like this: $ src/tools/pginclude/headerscheck --cplusplus In file included from /tmp/headerscheck.4gTaW5/test.cpp:3:

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Magnus Hagander
On Wed, Apr 3, 2024 at 7:57 PM Andres Freund wrote: > Hi, > > As most will know by now, the way xz debacle was able to make sshd > vulnerable > was through a dependency from sshd to libsystemd and then from libsystemd > to > liblzma. One lesson from this is that unnecessary dependencies can

Re: On disable_cost

2024-04-03 Thread David Rowley
On Thu, 4 Apr 2024 at 08:21, Robert Haas wrote: > I wanted to further explore the idea of just not generating plans of > types that are currently disabled. I looked into doing this for > enable_indexscan and enable_indexonlyscan. As a first step, I > investigated how those settings work now, and

Re: Use streaming read API in ANALYZE

2024-04-03 Thread Melanie Plageman
On Wed, Apr 03, 2024 at 10:25:01PM +0300, Nazir Bilal Yavuz wrote: > > I realized the same error while working on Jakub's benchmarking results. > > Cause: I was using the nblocks variable to check how many blocks will > be returned from the streaming API. But I realized that sometimes the >

RE: Can't compile PG 17 (master) from git under Msys2 autoconf

2024-04-03 Thread Regina Obe
> Hi Regina, > > On 2024-Mar-27, Regina Obe wrote: > > > The error is > > > > rm -f '../../src/include/storage/lwlocknames.h' > > cp -pR ../../backend/storage/lmgr/lwlocknames.h > > '../../src/include/storage/lwlocknames.h' > > cp: cannot stat '../../backend/storage/lmgr/lwlocknames.h': No such

Re: Streaming read-ready sequential scan code

2024-04-03 Thread Thomas Munro
On Thu, Apr 4, 2024 at 6:03 AM Melanie Plageman wrote: > On Tue, Apr 2, 2024 at 1:10 PM Heikki Linnakangas wrote: > > On 01/04/2024 22:58, Melanie Plageman wrote: > > > Attached v7 has version 14 of the streaming read API as well as a few > > > small tweaks to comments and code. > > > > I saw

Re: LogwrtResult contended spinlock

2024-04-03 Thread Jeff Davis
On Wed, 2024-04-03 at 13:19 +0200, Alvaro Herrera wrote: > So what I do in the attached 0001 is stop using the XLogwrtResult > struct > in XLogCtl and replace it with separate Write and Flush values, and > add > the macro XLogUpdateLocalLogwrtResult() that copies the values of > Write > and Flush

Re: Popcount optimization using AVX512

2024-04-03 Thread Nathan Bossart
On Wed, Apr 03, 2024 at 12:41:27PM -0500, Nathan Bossart wrote: > I committed v23-0001. Here is a rebased version of the remaining patches. > I intend to test the masking idea from Ants next. 0002 was missing a cast that is needed for the 32-bit builds. I've fixed that in v25. -- Nathan

Re: Opportunistically pruning page before update

2024-04-03 Thread Melanie Plageman
On Fri, Jan 26, 2024 at 8:33 PM James Coleman wrote: > > On Tue, Jan 23, 2024 at 2:46 AM Dilip Kumar wrote: > > > > On Tue, Jan 23, 2024 at 7:18 AM James Coleman wrote: > > > > > > On Mon, Jan 22, 2024 at 8:21 PM James Coleman wrote: > > > > > > > > See rebased patch attached. > > > > > > I

Re: On disable_cost

2024-04-03 Thread Greg Sabino Mullane
On Wed, Apr 3, 2024 at 3:21 PM Robert Haas wrote: > It's also pretty clear to me that the fact that enable_indexscan > and enable_indexonlyscan work completely differently from each other > is surprising at best, wrong at worst, but here again, what this patch > does about that is not above

Re: Statistics Import and Export

2024-04-03 Thread Tom Lane
Corey Huinker writes: >> As far as that goes, it shouldn't be that hard to deal with, at least >> not for "soft" errors which hopefully cover most input-function >> failures these days. You should be invoking array_in via >> InputFunctionCallSafe and passing a suitably-set-up ErrorSaveContext.

Re: psql not responding to SIGINT upon db reconnection

2024-04-03 Thread Robert Haas
On Wed, Apr 3, 2024 at 11:17 AM Tristan Partin wrote: > I think patch 2 makes it worse. The value in -Wswitch is that when new > enum variants are added, the developer knows the locations to update. > Adding a default case makes -Wswitch pointless. > > Patch 1 is still good. The comment change in

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Andrew Dunstan
On 2024-04-03 We 15:12, Daniel Gustafsson wrote: The fact that very few animals run the ssl tests is a pet peeve of mine, it would be nice if we could get broader coverage there. Well, the only reason for that is that the SSL tests need to be listed in PG_TEST_EXTRA, and the only reason for

Re: Security lessons from liblzma

2024-04-03 Thread Daniel Gustafsson
> On 3 Apr 2024, at 20:09, Peter Eisentraut wrote: > > On 30.03.24 00:14, Daniel Gustafsson wrote: >> One take-away for me is how important it is to ship recipes for regenerating >> any testdata which is included in generated/compiled/binary format. Kind of >> how we in our tree ship the config

Re: Use streaming read API in ANALYZE

2024-04-03 Thread Nazir Bilal Yavuz
Hi, Thank you for looking into this! On Wed, 3 Apr 2024 at 20:17, Heikki Linnakangas wrote: > > On 03/04/2024 13:31, Nazir Bilal Yavuz wrote: > > Streaming API has been committed but the committed version has a minor > > change, the read_stream_begin_relation function takes Relation instead > >

Re: On disable_cost

2024-04-03 Thread Robert Haas
On Tue, Apr 2, 2024 at 12:58 PM Tom Lane wrote: > Not really. But if you had, say, a join of a promoted path to a > disabled path, that would be treated as on-par with a join of two > regular paths, which seems like it'd lead to odd choices. Maybe > it'd be fine, but my gut says it'd likely not

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Daniel Gustafsson
> On 3 Apr 2024, at 17:29, Tom Lane wrote: > > Jacob Champion writes: >> As far as I can tell, no versions of LibreSSL so far provide >> X509_get_signature_info(), so this patch is probably a bit too >> aggressive. > > Another problem with cutting support is how many buildfarm members > will

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Daniel Gustafsson
> On 3 Apr 2024, at 19:38, Tom Lane wrote: > > Jacob Champion writes: >> The RHEL7-alikes are the biggest set, but that's already discussed >> above. Looks like SUSE 12 goes EOL later this year (October 2024), and >> it ships OpenSSL 1.1.1 as an option. Already-dead distros are Ubuntu >> 16.04

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-04-03 Thread Pavel Borisov
Hi, Alexander! On Wed, 3 Apr 2024 at 22:18, Alexander Korotkov wrote: > On Wed, Apr 3, 2024 at 7:55 PM Alvaro Herrera > wrote: > > > > On 2024-Apr-03, Alexander Korotkov wrote: > > > > > Regarding the shmem data structure for LSN waiters. I didn't pick > > > LWLock or ConditionVariable,

Re: Use streaming read API in ANALYZE

2024-04-03 Thread Nazir Bilal Yavuz
Hi Jakub, Thank you for looking into this and doing a performance analysis. On Wed, 3 Apr 2024 at 11:42, Jakub Wartak wrote: > > On Tue, Apr 2, 2024 at 9:24 AM Nazir Bilal Yavuz wrote: > [..] > > v4 is rebased on top of v14 streaming read API changes. > > Hi Nazir, so with streaming API

Re: Combine Prune and Freeze records emitted by vacuum

2024-04-03 Thread Peter Geoghegan
On Wed, Apr 3, 2024 at 1:04 PM Melanie Plageman wrote: > Thanks! And thanks for updating the commitfest entry! Nice work! -- Peter Geoghegan

Re: Parent/child context relation in pg_get_backend_memory_contexts()

2024-04-03 Thread Andres Freund
Hi, On 2024-02-14 16:23:38 +0900, Michael Paquier wrote: > It is possible to retrieve this information some WITH RECURSIVE as well, as > mentioned upthread. Perhaps we could consider documenting these tricks? I think it's sufficiently hard that it's not a reasonable way to do this. Greetings,

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Jacob Champion
On Wed, Apr 3, 2024 at 11:13 AM Tom Lane wrote: > wikipedia says that RHEL7 ends ELS as of June 2026 [1]. I may have misunderstood something in here then: https://www.redhat.com/en/blog/announcing-4-years-extended-life-cycle-support-els-red-hat-enterprise-linux-7 > ELS for RHEL 7 is now

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-04-03 Thread Alexander Korotkov
On Wed, Apr 3, 2024 at 7:55 PM Alvaro Herrera wrote: > > On 2024-Apr-03, Alexander Korotkov wrote: > > > Regarding the shmem data structure for LSN waiters. I didn't pick > > LWLock or ConditionVariable, because I needed the ability to wake up > > only those waiters whose LSN is already

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Tom Lane
Jacob Champion writes: > On Wed, Apr 3, 2024 at 10:38 AM Tom Lane wrote: >> Bottom line for me is that pulling 1.0.1 support now is OK, >> but I think pulling 1.0.2 is premature. > Okay, but IIUC, waiting for it to drop out of extended support means > we deal with it for four more years. That

Re: Statistics Import and Export

2024-04-03 Thread Corey Huinker
> > > As far as that goes, it shouldn't be that hard to deal with, at least > not for "soft" errors which hopefully cover most input-function > failures these days. You should be invoking array_in via > InputFunctionCallSafe and passing a suitably-set-up ErrorSaveContext. > (Look at

Re: Security lessons from liblzma

2024-04-03 Thread Peter Eisentraut
On 30.03.24 00:14, Daniel Gustafsson wrote: One take-away for me is how important it is to ship recipes for regenerating any testdata which is included in generated/compiled/binary format. Kind of how we in our tree ship the config for test TLS certificates and keys which can be manually

Re: LogwrtResult contended spinlock

2024-04-03 Thread Alvaro Herrera
On 2024-Apr-03, Bharath Rupireddy wrote: > On Wed, Apr 3, 2024 at 4:49 PM Alvaro Herrera wrote: > > So what I do in the attached 0001 is stop using the XLogwrtResult struct > > in XLogCtl and replace it with separate Write and Flush values, and add > > the macro XLogUpdateLocalLogwrtResult()

Re: Security lessons from liblzma - libsystemd

2024-04-03 Thread Andres Freund
Hi, As most will know by now, the way xz debacle was able to make sshd vulnerable was through a dependency from sshd to libsystemd and then from libsystemd to liblzma. One lesson from this is that unnecessary dependencies can still increase risk. It's worth noting that we have an optional

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Jacob Champion
On Wed, Apr 3, 2024 at 10:38 AM Tom Lane wrote: > Also, calling Photon 3 > dead because it went EOL three days ago seems over-hasty. Well, March 1, but either way I thought "dead" for the purposes of this thread meant "you can't build the very latest version of Postgres on it", not "we've

Re: Can't compile PG 17 (master) from git under Msys2 autoconf

2024-04-03 Thread Alvaro Herrera
Hi Regina, On 2024-Mar-27, Regina Obe wrote: > The error is > > rm -f '../../src/include/storage/lwlocknames.h' > cp -pR ../../backend/storage/lmgr/lwlocknames.h > '../../src/include/storage/lwlocknames.h' > cp: cannot stat '../../backend/storage/lmgr/lwlocknames.h': No such file or >

Re: Popcount optimization using AVX512

2024-04-03 Thread Nathan Bossart
I committed v23-0001. Here is a rebased version of the remaining patches. I intend to test the masking idea from Ants next. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 295b03530de5f42fe876b4489191da2f8dc83194 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 27

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Tom Lane
Jacob Champion writes: > The RHEL7-alikes are the biggest set, but that's already discussed > above. Looks like SUSE 12 goes EOL later this year (October 2024), and > it ships OpenSSL 1.1.1 as an option. Already-dead distros are Ubuntu > 16.04 (April 2021), Photon 2 (January 2023), and Photon 3

Re: Psql meta-command conninfo+

2024-04-03 Thread Imseih (AWS), Sami
Building the docs fail for v26. The error is: ref/psql-ref.sgml:1042: element member: validity error : Element term is not declared in member list of possible children ^ I am able to build up to v24 before the was replaced with I tested building with a

Re: Improve eviction algorithm in ReorderBuffer

2024-04-03 Thread Jeff Davis
On Wed, 2024-04-03 at 01:45 -0700, Jeff Davis wrote: > I suggest that you add a "heap_index" field to ReorderBufferTXN that > would point to the index into the heap's array (the same as > bh_nodeidx_entry.index in your patch). Each time an element moves > within the heap array, just follow the

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Jacob Champion
On Wed, Apr 3, 2024 at 8:29 AM Tom Lane wrote: > I count 3 machines running 1.0.1, 18 running some flavor > of 1.0.2, and 7 running various LibreSSL versions. I don't know all the tradeoffs with buildfarm wrangling, but IMO all those 1.0.2 installations are the most problematic, so I dug in a

Re: Statistics Import and Export

2024-04-03 Thread Tom Lane
Corey Huinker writes: > - functions strive to not ERROR unless absolutely necessary. The biggest > exposure is the call to array_in(). As far as that goes, it shouldn't be that hard to deal with, at least not for "soft" errors which hopefully cover most input-function failures these days. You

Re: Use streaming read API in ANALYZE

2024-04-03 Thread Heikki Linnakangas
On 03/04/2024 13:31, Nazir Bilal Yavuz wrote: Streaming API has been committed but the committed version has a minor change, the read_stream_begin_relation function takes Relation instead of BufferManagerRelation now. So, here is a v5 which addresses this change. I'm getting a repeatable

Re: Adding comments to help understand psql hidden queries

2024-04-03 Thread David Christensen
I got Greg's blessing on squashing the commits down, and now including a v4 with additional improvements on the output formatting front. Main changes: - all generated comments are the same width - width has been bumped to 80 - removed _() functions for consumers of the new output functions This

Re: Combine Prune and Freeze records emitted by vacuum

2024-04-03 Thread Melanie Plageman
On Wed, Apr 3, 2024 at 12:34 PM Heikki Linnakangas wrote: > > On 03/04/2024 17:18, Melanie Plageman wrote: > > I noticed you didn't make the comment updates I suggested in my > > version 13 here [1]. A few of them are outdated references to > > heap_page_prune() and one to a now deleted variable

Re: RFC: Additional Directory for Extensions

2024-04-03 Thread Christoph Berg
> Fwiw, I wrote this patch to solve the problem of testing extensions at > build-time where the build process does not have write access to > PGSHAREDIR. It solves that problem quite well, almost all PG > extensions have build-time test coverage now (where there was > basically 0 before). Also,

Re: Streaming read-ready sequential scan code

2024-04-03 Thread Melanie Plageman
On Tue, Apr 2, 2024 at 1:10 PM Heikki Linnakangas wrote: > > On 01/04/2024 22:58, Melanie Plageman wrote: > > Attached v7 has version 14 of the streaming read API as well as a few > > small tweaks to comments and code. > > I saw benchmarks in this thread to show that there's no regression when >

Re: Is it safe to cache data by GiST consistent function

2024-04-03 Thread Tom Lane
=?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: > On 3 Apr 2024, at 16:27, Tom Lane wrote: >> AFAIK it works. I don't see any of the in-core ones doing so, >> but at least range_gist_consistent and multirange_gist_consistent >> are missing a bet by repeating their cache search every time. >

Re: LogwrtResult contended spinlock

2024-04-03 Thread Bharath Rupireddy
On Wed, Apr 3, 2024 at 4:49 PM Alvaro Herrera wrote: > > Thanks for keeping this moving forward. I gave your proposed patches a > look. One thing I didn't like much is that we're adding a new member > (Copy) to XLogwrtAtomic -- but this struct is supposed to be a mirror of > XLogwrtResult for

Re: Detoasting optionally to make Explain-Analyze less misleading

2024-04-03 Thread Matthias van de Meent
On Tue, 2 Apr 2024 at 17:47, Tom Lane wrote: > > Matthias van de Meent writes: > > Attached is v9, which is rebased on master to handle 24eebc65's > > changed signature of pq_sendcountedtext. > > It now also includes autocompletion, and a second patch which adds > > documentation to give users

Re: [HACKERS] make async slave to wait for lsn to be replayed

2024-04-03 Thread Alvaro Herrera
Hello Alexander, On 2024-Apr-03, Alexander Korotkov wrote: > Regarding the shmem data structure for LSN waiters. I didn't pick > LWLock or ConditionVariable, because I needed the ability to wake up > only those waiters whose LSN is already replayed. In my experience > waking up a process is

Re: Is it safe to cache data by GiST consistent function

2024-04-03 Thread Michał Kłeczek
Thanks for taking your time to answer. Not sure if I understand though. > On 3 Apr 2024, at 16:27, Tom Lane wrote: > > =?utf-8?Q?Micha=C5=82_K=C5=82eczek?= writes: >> When implementing a GiST consistent function I found the need to cache >> pre-processed query across invocations. >> I am not

Re: RFC: Additional Directory for Extensions

2024-04-03 Thread Christoph Berg
Re: David E. Wheeler > > Yes, I like the suggestion to make it require a restart, which lets the > > sysadmin control it and not limited to whatever the person who compiled it > > thought would make sense. > > Here’s a revision of the Debian patch that requires a server start. Thanks for

Re: Combine Prune and Freeze records emitted by vacuum

2024-04-03 Thread Heikki Linnakangas
On 03/04/2024 17:18, Melanie Plageman wrote: I noticed you didn't make the comment updates I suggested in my version 13 here [1]. A few of them are outdated references to heap_page_prune() and one to a now deleted variable name (all_visible_except_removable). I applied them to your v13 and

Re: [PATCH] Modify pg_ctl to detect presence of geek user

2024-04-03 Thread Andrey M. Borodin
> On 3 Apr 2024, at 18:17, Panda Developpeur > wrote: > > Thank you for considering my contribution. Looks interesting! + usleep(50); Don't we need to make system 500ms faster instead? Let's change it to +

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-04-03 Thread Bertrand Drouvot
Hi, On Wed, Apr 03, 2024 at 08:28:04PM +0530, Bharath Rupireddy wrote: > On Wed, Apr 3, 2024 at 6:46 PM Bertrand Drouvot > wrote: > > > > Just one comment on v32-0001: > > > > +# Synced slot on the standby must get its own inactive_since. > > +is( $standby1->safe_psql( > > +

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-04-03 Thread Alvaro Herrera
On 2024-Apr-03, Dilip Kumar wrote: > Yeah, we missed acquiring the bank lock w.r.t. intervening pages, > thanks for reporting. Your fix looks correct to me. Thanks for the quick review! And thanks to Alexander for the report. Pushed the fix. -- Álvaro Herrera PostgreSQL Developer —

Re: [PATCH] Modify pg_ctl to detect presence of geek user

2024-04-03 Thread Panda Developpeur
Yeah sorry for the delay, it took me some time to understood how build, modify and test the modification

Re: Cutting support for OpenSSL 1.0.1 and 1.0.2 in 17~?

2024-04-03 Thread Tom Lane
Jacob Champion writes: > As far as I can tell, no versions of LibreSSL so far provide > X509_get_signature_info(), so this patch is probably a bit too > aggressive. Another problem with cutting support is how many buildfarm members will we lose. I scraped recent configure logs and got the

  1   2   >