Re: Recovering from detoast-related catcache invalidations

2025-01-14 Thread Heikki Linnakangas
On 12/01/2025 03:26, Noah Misch wrote: On Thu, Jan 09, 2025 at 11:39:53AM +0200, Heikki Linnakangas wrote: On 07/01/2025 23:56, Noah Misch wrote: @@ -697,9 +725,14 @@ CreateCacheMemoryContext(void) * * This is not very efficient if the target cache is nearly empty. * However, it

Re: Recovering from detoast-related catcache invalidations

2025-01-09 Thread Heikki Linnakangas
On 07/01/2025 23:56, Noah Misch wrote: On Tue, Dec 24, 2024 at 12:18:09AM +0200, Heikki Linnakangas wrote: I'm thinking of the attached to fix this. It changes the strategy for detecting concurrent cache invalidations. Instead of the "recheck" mechanism that was introduced in co

Re: Reorder shutdown sequence, to flush pgstats later

2025-01-08 Thread Heikki Linnakangas
thread, where I also needed btmask_all_except3() but then removed the only call to btmask_all_except2(). Instead of adding/removing code, it seems better to just use a variadic function. Nice. A variadic btmask_add() might be handy too. And then 0004, the reason for this thread. Overall, looks good to me. -- Heikki Linnakangas Neon (https://neon.tech)

Re: AIO v2.2

2025-01-07 Thread Heikki Linnakangas
needs to call the prepare functions explicitly, instead of having them as callbacks. Nominally that's more steps, but IMHO it's better to be explicit. The same actions were happening previously too, it was just hidden in the callback. I updated the README to show that too. I'm not wed

Re: AIO v2.2

2025-01-07 Thread Heikki Linnakangas
&io_method, + DEFAULT_IO_METHOD, io_method_options, + NULL, assign_io_method, NULL + }, + The description is a bit funny because synchronous I/O is one of the possible methods. -- Heikki Linnakangas Neon (https://neon.tech)

Re: AIO v2.2

2025-01-07 Thread Heikki Linnakangas
r, before the IO is submitted. This would also make it easier to order functions more sensibly in aio.c, as all the issuer functions would be together. The functions on AIO handles that everyone can call already have a distinct type (PgAioHandleRef vs PgAioHandle*). Hmm, yeah I think you migh

Re: A few patches to clarify snapshot management

2025-01-07 Thread Heikki Linnakangas
On 07/01/2025 00:00, Andres Freund wrote: On 2024-12-20 19:31:01 +0200, Heikki Linnakangas wrote: While playing around some more with this, I noticed that this code in GetTransactionSnapshot() is never reached, and AFAICS has always been dead code: Snapshot GetTransactionSnapshot(void

Re: POC: make mxidoff 64 bits

2025-01-01 Thread Heikki Linnakangas
On 27/12/2024 19:09, Maxim Orlov wrote: On Wed, 18 Dec 2024 at 13:21, Heikki Linnakangas <mailto:hlinn...@iki.fi>> wrote: Does the pg_upgrade code work though, if you have that buggy situation where oldestOffsetKnown == false ? ... > > 

table_tuple_lock's snapshot argument

2024-12-29 Thread Heikki Linnakangas
pam, it could be the TID like today, but a different AM could return some other token. Continue to use SnapshotDirty in the index scan, but in the call to table_tuple_lock(), instead of passing GetLatestSnapshot() and TID, pass the token you got index_getnext_slot(). Thoughts? -- Heikki Linnakangas Neon (https://neon.tech)

Re: pure parsers and reentrant scanners

2024-12-27 Thread Heikki Linnakangas
flex NEWS file, this syntax was added in flex 2.5.34, and we already require 2.5.35. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows

2024-12-25 Thread Heikki Linnakangas
On 25/12/2024 18:34, Tom Lane wrote: Heikki Linnakangas writes: Ok, committed that, thanks1 The question this patch brings to my mind is whether libpgport doesn't need the same treatment. Good point. Yes it does. I tested that by adding a dummy call to COMP_CRC32C() in a test module,

Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows

2024-12-25 Thread Heikki Linnakangas
: cflag_libs,    c_pch: pch_c_h, I also created entry in the commit fest with this patch https://commitfest.postgresql.org/51/5457/ Ok, committed that, thanks1 -- Heikki Linnakangas Neon (https://neon.tech)

Re: adjust_limit_rows_costs algorithm

2024-12-25 Thread Heikki Linnakangas
worth considering. Or maybe you could improve the selectivity estimator of the LIKE operator to be more accurate to begin with. -- Heikki Linnakangas Neon (https://neon.tech)

Re: AIX support

2024-12-25 Thread Heikki Linnakangas
good on modern compilers and systems in general. Perhaps we should just always use the system memset(). So for this patch, e key question is whether there's something AIX specific here. I'd assume no. I'd assume it to depend on the hardware rather than the OS. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Recovering from detoast-related catcache invalidations

2024-12-25 Thread Heikki Linnakangas
On 24/12/2024 09:38, Michael Paquier wrote: On Tue, Dec 24, 2024 at 12:18:09AM +0200, Heikki Linnakangas wrote: My first attempt was to insert the CatCTup or CatCList entry to the catcache before starting to build it, marked with a flag to indicate that the entry isn't fully built yet. But

Re: Recovering from detoast-related catcache invalidations

2024-12-23 Thread Heikki Linnakangas
On 14/12/2024 02:06, Heikki Linnakangas wrote: Ok, I missed that. It does not handle the 2nd scenario though: If a new catalog tuple is concurrently inserted that should be part of the list, it is missed. I was able to reproduce that, by pausing a process with gdb while it's buildin

Re: Exporting float_to_shortest_decimal_buf(n) with Postgres 17 on Windows

2024-12-23 Thread Heikki Linnakangas
pgcommon@0@'.format(name), link_with: cflag_libs, + link_whole: cflag_libs, c_pch: pch_c_h, kwargs: opts + { 'include_directories': [ -- Heikki Linnakangas Neon (https://neon.tech)

Re: Repeatable read transaction doesn't see dropped table

2024-12-23 Thread Heikki Linnakangas
CREATE TABLE test AS SELECT 2 as id; session 2: SELECT * FROM test; id (0 rows) Session 2 sees the table that was created concurrently, but not its contents. -- Heikki Linnakangas Neon (https://neon.tech)

Re: TransactionXmin != MyProc->xmin

2024-12-21 Thread Heikki Linnakangas
On 12/12/2024 22:26, Heikki Linnakangas wrote: On 12/12/2024 21:57, Andres Freund wrote: Perhaps we should have some assertions ensuring TransactionXmin has a valid value in some places? +1, wouldn't hurt. I didn't, after all, as I couldn't find a good place where to put th

Re: A few patches to clarify snapshot management

2024-12-20 Thread Heikki Linnakangas
On 16/12/2024 23:56, Nathan Bossart wrote: On Mon, Dec 16, 2024 at 12:06:33PM +0200, Heikki Linnakangas wrote: While working on the CSN snapshot patch, I got sidetracked looking closer into the snapshot tracking in snapmgr.c. Attached are a few patches to clarify some things. I haven'

Re: SIGSEGV in GrantLockLocal()

2024-12-18 Thread Heikki Linnakangas
hat might be happening. I don't know how that can happen, but I suspect commit 3c0fd64fec because it changed things in that area. If you can find a way to reproduce that even sporadically, that would be very helpful! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Exceptional md.c paths for recovery and zero_damaged_pages

2024-12-17 Thread Heikki Linnakangas
On 17/12/2024 23:28, Andres Freund wrote: On 2024-12-17 19:57:13 +0200, Heikki Linnakangas wrote: On 14/12/2024 01:44, Andres Freund wrote: The zero_damaged_pages path in bufmgr.c makes sense to me, but this one seems less sane to me. If you want to recover from a data corruption event and

Re: Exceptional md.c paths for recovery and zero_damaged_pages

2024-12-17 Thread Heikki Linnakangas
error into the relevant paths in HEAD and see whether it triggers for anybody in the next months. Having all these untested paths in md.c forever doesn't seem great. +1 -- Heikki Linnakangas Neon (https://neon.tech)

Re: Visibility bug with prepared transaction with subtransactions on standby

2024-12-16 Thread Heikki Linnakangas
me with TEMP_CONFIG containing: recovery_min_apply_delay = '500ms' All the other tests (I ran check-world) pass with this setting. So maybe this test lacks waiting for standby synchronization. Fixed, thanks! -- Heikki Linnakangas Neon (https://neon.tech)

A few patches to clarify snapshot management

2024-12-16 Thread Heikki Linnakangas
ept of a returned statically-allocated snapshot, and the whole question of what does "used very long" mean in GetTransactionSnapshot(). Thoughts on that? -- Heikki Linnakangas Neon (https://neon.tech) From 7a32da753d05819c991d93cce3e3174f5a142238 Mon Sep 17 00:00:00 2001 From: Heikki Linn

Re: pure parsers and reentrant scanners

2024-12-16 Thread Heikki Linnakangas
nicer in general, and it might also fix a few possible small memory leaks. I did a bit more work on this, so here is an updated patch set. Looks good to me. There's more work to be done, but this is all good steps in the right direction. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Recovering from detoast-related catcache invalidations

2024-12-13 Thread Heikki Linnakangas
On 13/12/2024 17:30, Tom Lane wrote: Heikki Linnakangas writes: CatalogCacheCreateEntry() can accept catcache invalidations when it opens the toast table, and it now has recheck logic to detect the case that the tuple it's processing (ntp) is invalidated. However, isn't it also pos

Re: Recovering from detoast-related catcache invalidations

2024-12-13 Thread Heikki Linnakangas
hat we had processed in an earlier iteration of the loop? Or that a new catalog tuple was inserted that should be part of the list we're building? -- Heikki Linnakangas Neon (https://neon.tech)

Re: TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
On 12/12/2024 21:57, Andres Freund wrote: On 2024-12-12 20:16:39 +0200, Heikki Linnakangas wrote: A straightforward fix is to ensure that TransactionXmin is updated whenever MyProc->xmin is: diff --git a/src/backend/utils/time/snapmgr.c b/src/backend/utils/time/snapmgr.c index a1a0c2ad

TransactionXmin != MyProc->xmin

2024-12-12 Thread Heikki Linnakangas
sactionXmin in all of those cases as well, so that TransactionXmin is always the equal to MyProc->xmin. Maybe even rename it to MyProcXmin to make that more clear. -- Heikki Linnakangas Neon (https://neon.tech) # # Session 3 starts with a cursor on table and fetches one row. # Then it

Re: Refactoring postmaster's code to cleanup after child exit

2024-12-10 Thread Heikki Linnakangas
On 09/12/2024 22:55, Heikki Linnakangas wrote: Not sure how to fix this. A small sleep in the test would work, but in principle there's no delay that's guaranteed to be enough. A more robust solution would be to run a "select count(*) from pg_stat_activity" and wait

Re: Refactoring postmaster's code to cleanup after child exit

2024-12-09 Thread Heikki Linnakangas
On 09/12/2024 14:47, Tomas Vondra wrote: On 12/9/24 13:30, Heikki Linnakangas wrote: On 09/12/2024 01:12, Tomas Vondra wrote: On 11/14/24 15:13, Heikki Linnakangas wrote: On 09/10/2024 23:40, Heikki Linnakangas wrote: I pushed the first three patches, with the new test and one of the small

Re: Refactoring postmaster's code to cleanup after child exit

2024-12-09 Thread Heikki Linnakangas
On 09/12/2024 01:12, Tomas Vondra wrote: On 11/14/24 15:13, Heikki Linnakangas wrote: On 09/10/2024 23:40, Heikki Linnakangas wrote: I pushed the first three patches, with the new test and one of the small refactoring patches. Thanks for all the comments so far! Here is a new version of the

Re: Remove remnants of "snapshot too old"

2024-12-03 Thread Heikki Linnakangas
On 04/12/2024 03:24, Tom Lane wrote: Andres Freund writes: On 2024-12-03 22:06:59 +0200, Heikki Linnakangas wrote: I spotted some more remnants of the "snapshot too old" feature that was removed in v17. Barring objections, I will commit the attached patch to tidy up. Most of th

Remove remnants of "snapshot too old"

2024-12-03 Thread Heikki Linnakangas
I spotted some more remnants of the "snapshot too old" feature that was removed in v17. Barring objections, I will commit the attached patch to tidy up. -- Heikki Linnakangas Neon (https://neon.tech) From a24f69e0bcf38721e5ffe2c7b65f9901fa8b079d Mon Sep 17 00:00:00 2001 Fr

Re: Interrupts vs signals

2024-12-02 Thread Heikki Linnakangas
On 02/12/2024 09:32, Thomas Munro wrote: On Sat, Nov 23, 2024 at 10:58 AM Heikki Linnakangas wrote: Hmm, so this would replace the maybeSleepingOnInterrupts bitmask I envisioned. Makes a lot of sense. If it's a single bit though, that means that you'll still get woken up by inter

Re: Typo in comment of auto_explain.c

2024-11-27 Thread Heikki Linnakangas
rg/wiki/If_and_only_if. There was some previous discussion on pgsql-hackers on whether that usage common enough, although I don't find the thread right now. You're not the first one to think it's a typo :-). -- Heikki Linnakangas Neon (https://neon.tech)

Re: Make postmaster environment dump easier to skim over

2024-11-26 Thread Heikki Linnakangas
ight be useful I guess, but it'd not clear from the message that that's what "postgres" is. Maybe change it to "progname: \"%s\", initial environment: ". -- Heikki Linnakangas Neon (https://neon.tech)

Re: Improve statistics estimation considering GROUP-BY as a 'uniqueiser'

2024-11-25 Thread Heikki Linnakangas
to a single row. So I think there's some more work to be done here. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Interrupts vs signals

2024-11-22 Thread Heikki Linnakangas
specific better idea so I'm not objecting... Perhaps it's more like INTERRUPT_GENERAL_NOTIFY, except that _NOTIFY is already a well known thing, and the procsignal patch introduces INTERRUPT_NOTIFY... INTERRUPT_GENERAL with no third word isn't out of the question, either. I li

Re: Interrupts vs signals

2024-11-22 Thread Heikki Linnakangas
d have a separate "maybe sleeping" bit for each interrupt bit, but could still use atomic_fetch_or atomically read the interrupt bits and announce the sleeping. -- Heikki Linnakangas Neon (https://neon.tech)

Re: smgrextendv and vectorizing the bulk_write implementation

2024-11-22 Thread Heikki Linnakangas
with a BLCKSZ write. We've always just assumed that it won't happen, or if it does it means you ran out of disk space. I don't know why we ever assumed that, even though it has worked in practice. But I think we should stop assuming that going forward, and always retry short w

Re: Offsets of `struct Port` are no longer constant

2024-11-22 Thread Heikki Linnakangas
On 11/11/2024 21:43, Daniel Gustafsson wrote: On 11 Nov 2024, at 20:17, Jacob Champion wrote: On Mon, Nov 11, 2024 at 11:13 AM Heikki Linnakangas wrote: On REL_17_STABLE, we should probably adjust the comment to warn that 'raw_buf' and friends can move depending on USE_OPENS

Re: SIMD optimization for list_sort

2024-11-22 Thread Heikki Linnakangas
tuple sort in the future. If you could use this to speed up tuple sorting, that would be much more interesting for PostgreSQL itself. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Changed behavior in rewriteheap

2024-11-22 Thread Heikki Linnakangas
itten' field, it was not used for anything anymore. Thanks! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Changed behavior in rewriteheap

2024-11-22 Thread Heikki Linnakangas
Looks good to me. Eric, can you confirm that Matthias's patch fixes the problem for you? -- Heikki Linnakangas Neon (https://neon.tech)

Re: Fix an error while building test_radixtree.c with TEST_SHARED_RT

2024-11-18 Thread Heikki Linnakangas
in radixtree.h to make it self-contained. +1. Please make sure the #includes are in alphabetical order. While we're at it, I noticed that lib/radixtree.h includes "postgres.h". That's against our usual convention. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Reduce TupleHashEntryData struct size by half

2024-11-18 Thread Heikki Linnakangas
On 18/11/2024 22:22, Jeff Davis wrote: On Mon, 2024-11-18 at 12:13 +0200, Heikki Linnakangas wrote: Hmm, it would seem more straightforward to store it in the beginning, i.e. have something like this: struct {   void *additional;   MinimalTupleData mtup; } ; That was my first

Re: Reduce TupleHashEntryData struct size by half

2024-11-18 Thread Heikki Linnakangas
the compiler understands that the elements are still 4-byte aligned, or if it forces byte-per-byte access? Playing with godbolt a little, it seems like GCC at least understands it, but clang does not. On architectures with non-strict alignment, it doesn't matter as a simple load/store instruction is the fastest option anyway. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Optimizing FastPathTransferRelationLocks()

2024-11-15 Thread Heikki Linnakangas
uld start clearing databaseid on backend exit. -- Heikki Linnakangas Neon (https://neon.tech)

Re: CSN snapshots in hot standby

2024-11-15 Thread Heikki Linnakangas
On 29/10/2024 18:33, Heikki Linnakangas wrote: I added two tests to the test suite:     master patched insert-all-different-xids: 0.00027    0.00019 s / iteration insert-all-different-subxids:  0.00023    0.00020 s / iteration insert-all-different-xids: Open

Re: Interrupts vs signals

2024-11-15 Thread Heikki Linnakangas
nder if we should have a dedicated interrupt flag for this instead. -- Heikki Linnakangas Neon (https://neon.tech) From 2e81b3d3e51a66add7d7d6f70f70618194b2f01d Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Fri, 15 Nov 2024 16:23:30 +0200 Subject: [PATCH v4 3/3] Use proc interrupt

Re: POC: make mxidoff 64 bits

2024-11-15 Thread Heikki Linnakangas
On 13/11/2024 17:44, Maxim Orlov wrote: On Tue, 12 Nov 2024 at 02:31, Heikki Linnakangas <mailto:hlinn...@iki.fi>> wrote: On a different note, I'm surprised you're rewriting member segments from scratch, parsing all the individual member groups and writing them out

Re: JIT: The nullness of casetest.value can be determined at the JIT compile time.

2024-11-15 Thread Heikki Linnakangas
ecInitExpr() time that the parameter must be already evaluated when it's referred, and skip the lazy checks? -- Heikki Linnakangas Neon (https://neon.tech)

Re: JIT: Remove some unnecessary instructions.

2024-11-15 Thread Heikki Linnakangas
obviously correct. Committed, thanks! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Refactoring postmaster's code to cleanup after child exit

2024-11-14 Thread Heikki Linnakangas
On 09/10/2024 23:40, Heikki Linnakangas wrote: I pushed the first three patches, with the new test and one of the small refactoring patches. Thanks for all the comments so far! Here is a new version of the remaining patches. Lots of little cleanups and changes here and there since the last

Re: On non-Windows, hard depend on uselocale(3)

2024-11-14 Thread Heikki Linnakangas
hough Overall, the patch looks good to me. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Speed up TransactionIdIsCurrentTransactionId() with lots of subxacts

2024-11-13 Thread Heikki Linnakangas
clear they're not valid anymore, but no one is supposed to look at elements beyond totalXids anyway. We don't do such clearing at the end of top transaction either. Thanks for the review! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Statistics Import and Export

2024-11-12 Thread Heikki Linnakangas
x27;foo', 'xmin', false, 1); pg_set_attribute_stats (1 row) We should probably not allow that, because you cannot ANALYZE system columns: postgres=# analyze foo (xmin); ERROR: column "xmin" of relation "foo" does not exist -- Heikki Linnakangas Neon (https://neon.tech)

Re: Improve error messages for database object stats manipulation functions during recovery

2024-11-12 Thread Heikki Linnakangas
recovery". I've attached a patch implementing these changes. It also updates the documentation to clearly state that these functions are not available during recovery. Looks good to me. -- Heikki Linnakangas Neon (https://neon.tech)

Re: POC: make mxidoff 64 bits

2024-11-11 Thread Heikki Linnakangas
create a cluster that's close to multixid wrapround: initdb -D data pg_resetwal -D data -m 429491,429490 dd if=/dev/zero of=data/pg_multixact/offsets/FFFE bs=8192 count=32 -- Heikki Linnakangas Neon (https://neon.tech) import sys; import threading; import psycopg2; def test_mul

Re: Offsets of `struct Port` are no longer constant

2024-11-11 Thread Heikki Linnakangas
bly adjust the comment to warn that 'raw_buf' and friends can move depending on USE_OPENSSL. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Support LIKE with nondeterministic collations

2024-11-11 Thread Heikki Linnakangas
: SELECT repeat('x', 10) LIKE '%xxxy%' COLLATE ignore_accents; -- Heikki Linnakangas Neon (https://neon.tech)

Re: warn if GUC set to an invalid shared library

2024-11-11 Thread Heikki Linnakangas
g" flag. That would also naturally allow the combination of "source == PGC_S_FILE && is_testing==true", if some settings would need different checks in ALTER SYSTEM for example. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Interrupts vs signals

2024-11-10 Thread Heikki Linnakangas
On 05/11/2024 22:21, Jelte Fennema-Nio wrote: On Mon, 4 Nov 2024 at 20:42, Heikki Linnakangas wrote: Having spent some time playing with this, I quite like option C: break compatibility, but provide an out-of-tree header file with *forward*-compatibility macros. That encourages extension

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Heikki Linnakangas
On 04/11/2024 18:53, Robert Haas wrote: On Mon, Nov 4, 2024 at 10:57 AM Heikki Linnakangas wrote: Maybe that's just a better fit and we don't need either a procedure or new syntax. I think it would still be good to expose the feature at SQL level too. Makes it easier to test an

Re: documentation structure

2024-11-04 Thread Heikki Linnakangas
nt returnvalue: validity error : Element optional is not declared in returnvalue list of possible children -- Heikki Linnakangas Neon (https://neon.tech)

Re: Latches vs lwlock contention

2024-11-04 Thread Heikki Linnakangas
partition lock. But it became necessary with the main patch, so I squashed it with that. And the others that I squashed were just not that interesting on their own. The rest of Thomas's SetLatches work remains, so I left the commitfest entry in "Needs review" state. -- Heikki Linnakangas Neon (https://neon.tech)

Re: pgsql: Implement pg_wal_replay_wait() stored procedure

2024-11-04 Thread Heikki Linnakangas
d makes it usable without client library changes, for example. -- Heikki Linnakangas Neon (https://neon.tech)

Re: PG_TEST_EXTRA and meson

2024-11-04 Thread Heikki Linnakangas
. Marking the entry as RFC. Committed with minor changes. I squashed the first two patches, and rephrased the docs and some comments a little. Thanks! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Inquiry on Future Plans for Enhancements to PostgreSQL MVCC Model and Vacuum Process

2024-11-01 Thread Heikki Linnakangas
is is an open source project, so the future depends on what people decide to work on and submit patches for. The above are just the notable efforts that I'm aware of. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Improve the efficiency of _bt_killitems.

2024-11-01 Thread Heikki Linnakangas
On 01/11/2024 10:41, feichanghong wrote: On Nov 1, 2024, at 16:24, Heikki Linnakangas wrote: On 01/11/2024 09:19, feichanghong wrote: Hi hackers, In the _bt_killitems function, the following logic is present: we search to the right for an index item that matches the heap TID and attempt

Re: Improve the efficiency of _bt_killitems.

2024-11-01 Thread Heikki Linnakangas
uples with the same key, as long as they're not visible at the same time. For example, if you UPDATE or DELETE+INSERT a row. -- Heikki Linnakangas Neon (https://neon.tech)

Re: IPC::Run::time[r|out] vs our TAP tests

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 14:27, Daniel Gustafsson wrote: On 28 Oct 2024, at 11:56, Heikki Linnakangas wrote: On 09/04/2024 20:10, Daniel Gustafsson wrote: =item $session->quit Close the session and clean up resources. Each test run must be closed with C. Returns TRUE when the session was clea

Re: In-placre persistance change of a relation

2024-10-31 Thread Heikki Linnakangas
actions. The UNDO records for the aborted subtransactions would bloat the undo file. But maybe that's nevertheless better? -- Heikki Linnakangas Neon (https://neon.tech)

Re: Relcache refactoring

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 12:06, Heikki Linnakangas wrote: On 31/10/2024 10:14, Heikki Linnakangas wrote: Committed with those fixes, thanks for the review! There is a failure in the buildfarm animal 'prion', which builds with -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE options. I

Re: Use "protocol options" name instead of "protocol extensions" everywhere

2024-10-31 Thread Heikki Linnakangas
ere's no support for extensions to create protocol extensions. TLS extensions is a good comparison. I don't have a strong opinion, all of those would work for me. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Relcache refactoring

2024-10-31 Thread Heikki Linnakangas
On 31/10/2024 10:14, Heikki Linnakangas wrote: Committed with those fixes, thanks for the review! There is a failure in the buildfarm animal 'prion', which builds with -DRELCACHE_FORCE_RELEASE -DCATCACHE_FORCE_RELEASE options. I'll look into that later today. (

Re: Relcache refactoring

2024-10-31 Thread Heikki Linnakangas
this will get called with refcnt == 1, even though we have no AccessShareLock on the index. But I guess that's OK for a nailed index. Committed with those fixes, thanks for the review! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Shave a few cycles off our ilog10 implementation

2024-10-30 Thread Heikki Linnakangas
t did you use to performance test it, to get those results? -- Heikki Linnakangas Neon (https://neon.tech)

Re: AIO writes vs hint bits vs checksums

2024-10-30 Thread Heikki Linnakangas
k seems acceptable though. But: We can address this and improve performance over the status quo! Today we determine tuple visiblity determination one-by-one, even when checking the visibility of an entire page worth of tuples. Yes, batching the visibility checks makes sense in any case. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Interrupts vs signals

2024-10-30 Thread Heikki Linnakangas
I'm leaning towards option C). Let's rip off the band-aid, but provide documentation for how to adapt your extension code. And provide a forwards-compatibility header on the wiki, that extension authors can use to make the new Interrupt calls work against old server versions. The second question is whether we need to provide a replacement for InitLatch for extensions. ISTM that none of the extensions out there truly need it. But maybe if we had a nicer interface for allocating interrupt bits for custom usage, they would actually find that handy. But I'm leaning towards "no" at this point. Could be added later. -- Heikki Linnakangas Neon (https://neon.tech)

Re: freespace.c modifies buffer without any locks

2024-10-30 Thread Heikki Linnakangas
vacuumed, afaict? Yeah. In the context of actual VACUUM rather than relation extension, that seems fine; the next GetPageWithFreeSpace() call will fix it up quickly. -- Heikki Linnakangas Neon (https://neon.tech)

Re: protocol-level wait-for-LSN

2024-10-30 Thread Heikki Linnakangas
sages. Or encapsulate the whole protocol in XML. So yes, each protocol extension needs to know about all the other protocol extensions that it can be used with. In practice we'll avoid doing crazy stuff so that the protocol extensions are orthogonal, but if user-defined extensions get involved

Re: AIO writes vs hint bits vs checksums

2024-10-30 Thread Heikki Linnakangas
vistuples_dense[nvis] = tup->t_self.ip_posid; + nvis++; + } Is the likely(valid) hint important for performance here? It would be a bad hint for a table with lots of dead tuples. I feel we'd better rely on the branch predictor for this one.

Re: define pg_structiszero(addr, s, r)

2024-10-29 Thread Heikki Linnakangas
=0.041196s check zeros using memcmp -- elapsed=0.016407s " So, in this test, the loop is 0.024789s longer means 0.024789s/100=24 Nanosecond slower per comparison (If my math is correct). I believe that test program is bogus. Look at the assembly code; the compiler optimized away the loo

Re: protocol-level wait-for-LSN

2024-10-28 Thread Heikki Linnakangas
y. Or if you just want to wait without issuing any query. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Avoid possible overflow (src/port/bsearch_arg.c)

2024-10-28 Thread Heikki Linnakangas
FlagModeflagMode; uint32 value; } CompoundAffixFlag; We have bsearch_arg() now, so we could switch to that and remove 'flagMode' from here. -- Heikki Linnakangas Neon (https://neon.tech)

Re: In-placre persistance change of a relation

2024-10-28 Thread Heikki Linnakangas
ove the new relation. AtEOXact_RelationMap() is called very late in the commit process to keep the window as small as possible, but if it nevertheless happens, the consequences are pretty bad if you remove a relation file that is in fact needed. -- Heikki Linnakangas Neon (https://neon.tech)

Re: define pg_structiszero(addr, s, r)

2024-10-28 Thread Heikki Linnakangas
How performance sensitive is this? If it's not, then the above seems like the most straightforward way to do this, which is good. If it is performance sensitive, it's still good, because the compiler can optimize that well: https://godbolt.org/z/x9hPWjheq. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Avoid possible overflow (src/port/bsearch_arg.c)

2024-10-28 Thread Heikki Linnakangas
probably *BSD or libiberty. Tomas, do you remember? Not that it matters, but I'm curious. Some of those other implementations have fixed this, others have not. And they all seem to also have the "involes" typo in the comment that we fixed in commit 7ef8b52cf07 :-). Ranier, you

Re: IPC::Run::time[r|out] vs our TAP tests

2024-10-28 Thread Heikki Linnakangas
n. Calling ->quit on the process makes the test fail from the process having already exited, but we can call ->finish directly like we do in test_misc/t/005_timeouts.pl. 0003 fixes this. Alexander included this fix in commit 3c5db1d6b016 already. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Refine comments on usage WL_POSTMASTER_DEATH vs WL_EXIT_ON_PM_DEATH

2024-10-23 Thread Heikki Linnakangas
f will do the exit(), not the caller. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Refine comments on usage WL_POSTMASTER_DEATH vs WL_EXIT_ON_PM_DEATH

2024-10-23 Thread Heikki Linnakangas
On 23/10/2024 20:29, Pavel Borisov wrote: Hi, Heikki! On Wed, 23 Oct 2024 at 21:00, Heikki Linnakangas <mailto:hlinn...@iki.fi>> wrote: On 23/10/2024 12:18, Pavel Borisov wrote: > Hi, Hackers! > > Current comments on the usage of WL_POSTMASTER_D

Re: POC: make mxidoff 64 bits

2024-10-22 Thread Heikki Linnakangas
xact/members/0001 pg_multixact/members/00010001 Thanks for working on this! -- Heikki Linnakangas Neon (https://neon.tech)

Re: Fix attributes of consume_xids and consume_xids_until

2024-10-11 Thread Heikki Linnakangas
accordingly. Applied, thanks! I didn't backpatch this because it's a test module that shouldn't be installed in production. And because we don't bother with upgrade scripts for these test modules, it could get confusing. -- Heikki Linnakangas Neon (https://neon.tech)

Re: sunsetting md5 password support

2024-10-10 Thread Heikki Linnakangas
being seen. I wouldn't recommend it if SCRAM is available, but yeah, with TLS and sslmode=verify-full, it's secure enough. Note that some authentication methods like LDAP and Radius use "password" authentication on the wire. -- Heikki Linnakangas Neon (https://neon.tech)

Speed up TransactionIdIsCurrentTransactionId() with lots of subxacts

2024-10-10 Thread Heikki Linnakangas
h attached, as well as a little shell script to produce that test case. To use, pipe it to psql. The patch makes the test case about 10x faster, but since this is a question of O(n) vs O(log(n)), you can make it arbitrarily bad by changing the number of savepoints. -- Heikki Linnakangas Neon (htt

Re: sunsetting md5 password support

2024-10-09 Thread Heikki Linnakangas
MD5 passwords, if you can't use them? You might as well set all the MD5 passwords to null. My feeling is that it would be less confusing to users to just disallow md5 passwords in one release. I'm not sure these intermediate steps are really doing anyone any favors. -- Heikki Linnakangas Neon (https://neon.tech)

Re: Allow default \watch interval in psql to be configured

2024-10-09 Thread Heikki Linnakangas
reater than *or equal to* 0". Or maybe "cannot be negative". -0 is also accepted, though. +This variable set the default interval which \watch set -> sets + HELP0(" WATCH_INTERVAL\n" + "number of seconds \\watch waits beetween queries\n"); beetween -> between -- Heikki Linnakangas Neon (https://neon.tech)

  1   2   3   4   5   6   7   8   9   10   >