Re: table inheritance versus column compression and storage settings

2024-01-30 Thread Ashutosh Bapat
On Tue, Dec 5, 2023 at 6:28 PM Peter Eisentraut wrote: > > On 05.12.23 05:26, Ashutosh Bapat wrote: > >> - When inheriting from multiple parents with different settings, an > >> explicit setting in the child is required. > > When no explicit setting for child is specified, it will throw an > >

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Peter Eisentraut
On 31.01.24 06:28, Tom Lane wrote: The idea of adding a file to the data directory appeals to me. optional_runtime_features.conf alter_system=enabled copy_from_program=enabled copy_to_program=disabled ... so, exactly what keeps an uncooperative superuser from overwriting that file? The point

RE: Synchronizing slots from primary to standby

2024-01-30 Thread Zhijie Hou (Fujitsu)
On Wednesday, January 31, 2024 9:57 AM Peter Smith wrote: > > Hi, > > I saw that v73-0001 was pushed, but it included some last-minute > changes that I did not get a chance to check yesterday. > > Here are some review comments for the new parts of that patch. > > == >

Re: Apply the "LIMIT 1" optimization to partial DISTINCT

2024-01-30 Thread Richard Guo
On Wed, Jan 31, 2024 at 12:26 PM David Rowley wrote: > On Fri, 26 Jan 2024 at 21:14, David Rowley wrote: > > However, having said that. Parallel plans are often picked when there > > is some highly selective qual as parallel_tuple_cost has to be applied > > to fewer tuples for such plans, so

Re: Some revises in adding sorting path

2024-01-30 Thread Richard Guo
On Wed, Jan 31, 2024 at 5:13 AM David Rowley wrote: > On Wed, 31 Jan 2024 at 00:44, Richard Guo wrote: > > This patchset does not aim to introduce anything new; it simply > > refactors the existing code. The newly added tests are used to show > > that the code that is touched here is not

Re: Should we remove -Wdeclaration-after-statement?

2024-01-30 Thread Peter Eisentraut
On 29.01.24 16:03, Jelte Fennema-Nio wrote: I feel like this is the type of change where there's not much discussion to be had. And the only way to resolve it is to use some voting to gauge community opinion. So my suggestion is for people to respond with -1, -0.5, +-0, +0.5, or +1 to indicate

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Ashutosh Bapat
On Wed, Jan 31, 2024 at 12:12 PM David Rowley wrote: > > What is relevant are things like: > > For: > * It's a clear bug and what's happening now is clearly wrong. > * inheritance/partitioned table plan changes for the better in minor versions > > Against: > * Nobody has complained for 13 years,

Re: Incorrect cost for MergeAppend

2024-01-30 Thread David Rowley
On Wed, 31 Jan 2024 at 18:58, Ashutosh Bapat wrote: > with patch > Merge Append (cost=6.94..18.90 rows=198 width=4) > without patch > Sort (cost=19.04..19.54 rows=198 width=4) > Those numbers are higher than 1% (#define STD_FUZZ_FACTOR 1.01) but > slight variation in all the GUCs that

Re: Oversight in reparameterize_path_by_child leading to executor crash

2024-01-30 Thread Richard Guo
On Wed, Jan 31, 2024 at 5:12 AM Tom Lane wrote: > Richard Guo writes: > > On Wed, Jan 17, 2024 at 5:01 PM Richard Guo > wrote: > >> Sure, here it is: > >> v10-0001-Avoid-reparameterizing-Paths-when-it-s-not-suitable.patch > > > I forgot to mention that this patch applies on v16 not master. > >

Re: src/bin/pg_upgrade/t/004_subscription.pl test comment fix

2024-01-30 Thread Peter Smith
On Wed, Jan 31, 2024 at 4:51 PM vignesh C wrote: > > On Wed, 31 Jan 2024 at 10:27, Peter Smith wrote: > > > > Hi, > > > > PSA a small fix for a misleading comment found in the pg_upgrade test code. > > Is the double # intentional here, as I did not see this style of > commenting used elsewhere:

RE: Documentation to upgrade logical replication cluster

2024-01-30 Thread Hayato Kuroda (Fujitsu)
Dear Vignesh, Thanks for updating the patch! Here are my comments for v6. 01. ``` + Logical replication cluster + + + A set of publisher and subscriber instance with publisher instance + replicating changes to the subscriber instance. + + ``` Should we say 1:N

Re: int4->bool test coverage

2024-01-30 Thread Michael Paquier
On Fri, Dec 22, 2023 at 11:48:11AM +0900, Michael Paquier wrote: > On Thu, Dec 21, 2023 at 11:56:22AM +0100, Christoph Berg wrote: >> The first cast is the int4_bool function, but it isn't covered by the >> regression tests at all. The attached patch adds tests. > > I don't see why not. And one

possible inter-gcc-version incompatibility regarding fat objects

2024-01-30 Thread Kyotaro Horiguchi
Hello. I would like to share some information regarding a recent issue we encoutered. While compiling an extension against the RPM package postgresql16-devel-16.1-2PGDG.rhel9.x86_64.rpm we faced a problem that appears to be caused by the combination of LTO and constant folding/propagation,

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Ashutosh Bapat
On Wed, Jan 31, 2024 at 4:33 AM David Rowley wrote: > > On Wed, 31 Jan 2024 at 02:23, Alexander Kuzmenkov > wrote: > > > > On Tue, Jan 30, 2024 at 1:20 PM David Rowley wrote: > > > You should likely focus on trying to find a test that does not require > > > making 2 tables with 10k rows. > > >

Re: Improve the connection failure error messages

2024-01-30 Thread Peter Smith
AFAIK some recent commits patches (e,g [1] for the "slot sync" development) have created some more cases of "could not connect..." messages. So, you might need to enhance your patch to deal with any new ones in the latest HEAD. == [1]

Re: Documentation: warn about two_phase when altering a subscription

2024-01-30 Thread Bertrand Drouvot
Hi, On Wed, Jan 31, 2024 at 01:47:16PM +1100, Peter Smith wrote: > Hi, thanks for the patch. Here are some review comments for v1 Thanks for the review! > > == > > (below is not showing the links and other sgml rendering -- all those LGTM) > > BEFORE > When altering the slot_name, the

Re: src/bin/pg_upgrade/t/004_subscription.pl test comment fix

2024-01-30 Thread vignesh C
On Wed, 31 Jan 2024 at 10:27, Peter Smith wrote: > > Hi, > > PSA a small fix for a misleading comment found in the pg_upgrade test code. Is the double # intentional here, as I did not see this style of commenting used elsewhere: +# # Upgraded regress_sub1 should still have enabled and failover

Re: [PoC] Improve dead tuple storage for lazy vacuum

2024-01-30 Thread Masahiko Sawada
On Tue, Jan 30, 2024 at 7:20 PM John Naylor wrote: > > On Tue, Jan 30, 2024 at 7:56 AM Masahiko Sawada wrote: > > > > On Mon, Jan 29, 2024 at 8:48 PM John Naylor wrote: > > > > I meant the macro could probably be > > > > > > Max(SLAB_DEFAULT_BLOCK_SIZE, (size) * N) > > > > > > (Right now N=32).

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread David G. Johnston
On Tuesday, January 30, 2024, Tom Lane wrote: > "David G. Johnston" writes: > > On Tuesday, January 30, 2024, Tom Lane wrote: > >> My larger point here is that trying to enforce restrictions on > >> superusers *within* Postgres is simply not a good plan, for > >> largely the same reasons that

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-30 Thread Ashutosh Bapat
On Wed, Jan 31, 2024 at 2:16 AM Jeff Davis wrote: > > On Tue, 2024-01-30 at 16:17 +0530, Ashutosh Bapat wrote: > > Converting a server and user mapping to > > conninfo should be delegated to the FDW being used since that FDW > > knows best how to use those options. > > If I understand you

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-30 Thread Michael Paquier
On Wed, Jan 31, 2024 at 02:11:22PM +0900, Sutou Kouhei wrote: > Ah, yes. defel->location is used in later patches. For > example, it's used when a COPY handler for the specified > FORMAT isn't found. I see. > I've prepared the v10 patch set. Could you try this? Thanks, I'm looking into that

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
"David G. Johnston" writes: > On Tuesday, January 30, 2024, Tom Lane wrote: >> My larger point here is that trying to enforce restrictions on >> superusers *within* Postgres is simply not a good plan, for >> largely the same reasons that Robert questioned making the >> GUC mechanism police

RE: Improve eviction algorithm in ReorderBuffer

2024-01-30 Thread Hayato Kuroda (Fujitsu)
Dear Sawada-san, I have started to read your patches. Here are my initial comments. At least, all subscription tests were passed on my env. A comment for 0001: 01. ``` +static void +bh_enlarge_node_array(binaryheap *heap) +{ +if (heap->bh_size < heap->bh_space) +return; + +

Re: Make COPY format extendable: Extract COPY TO format implementations

2024-01-30 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Tue, 30 Jan 2024 17:37:35 +0900, Michael Paquier wrote: >> We use defel->location for an error message. (We don't need >> to set location for the default "text" DefElem.) > > Yeah, but you should not need

Re: Synchronizing slots from primary to standby

2024-01-30 Thread Peter Smith
On Wed, Jan 31, 2024 at 2:18 PM Amit Kapila wrote: > > On Wed, Jan 31, 2024 at 7:27 AM Peter Smith wrote: > > > > I saw that v73-0001 was pushed, but it included some last-minute > > changes that I did not get a chance to check yesterday. > > > > Here are some review comments for the new parts

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread David G. Johnston
On Tuesday, January 30, 2024, Tom Lane wrote: > > > My larger point here is that trying to enforce restrictions on > superusers *within* Postgres is simply not a good plan, for > largely the same reasons that Robert questioned making the > GUC mechanism police itself. It needs to be done

src/bin/pg_upgrade/t/004_subscription.pl test comment fix

2024-01-30 Thread Peter Smith
Hi, PSA a small fix for a misleading comment found in the pg_upgrade test code. == Kind Regards, Peter Smith. Fujitsu Australia v1-0001-Fix-test-comment.patch Description: Binary data

Re: Apply the "LIMIT 1" optimization to partial DISTINCT

2024-01-30 Thread David Rowley
On Fri, 26 Jan 2024 at 21:14, David Rowley wrote: > However, having said that. Parallel plans are often picked when there > is some highly selective qual as parallel_tuple_cost has to be applied > to fewer tuples for such plans, so probably this is worth doing. I was messing around with your

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
Magnus Hagander writes: > On Tue, Jan 30, 2024 at 10:48 PM Tom Lane wrote: >> I was imagining using selinux and/or sepgsql to directly prevent >> writing postgresql.auto.conf from the Postgres account. > Wouldn't a simple "chattr +i postgresql.auto.conf" work? Hmm, I'm not too familiar with

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Alexander Lakhin
Hello, 30.01.2024 18:57, Tristan Partin wrote: Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, ... Maybe you would like to fix also one more similar place, reached with: create extension xml2; select xslt_process('', $$http://www.w3.org/1999/XSL/Transform;> $$);

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread Tom Lane
James Coleman writes: > I've finally had a chance to look at this, and I don't believe there's > any real failure here, merely drift of how the planner works on master > resulting in this query now being eligible for a different plan shape. > I was a bit wary at first because the changing test

Re: Synchronizing slots from primary to standby

2024-01-30 Thread Amit Kapila
On Wed, Jan 31, 2024 at 7:27 AM Peter Smith wrote: > > I saw that v73-0001 was pushed, but it included some last-minute > changes that I did not get a chance to check yesterday. > > Here are some review comments for the new parts of that patch. > > == >

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread James Coleman
On Tue, Jan 30, 2024 at 11:54 AM Robert Haas wrote: > > On Tue, Jan 30, 2024 at 11:17 AM Akshat Jaimini wrote: > > I think we should move this patch to the next CF as I believe that work is > > still going on resolving the last reported bug. > > We shouldn't just keep pushing this forward to

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

2024-01-30 Thread jian he
+/* + * Hash function that's compatible with guc_name_compare + */ +static uint32 +orclause_hash(const void *data, Size keysize) +{ + OrClauseGroupKey *key = (OrClauseGroupKey *) data; + uint64 hash; + + (void) JumbleExpr(key->expr, ); + hash += ((uint64) key->opno + (uint64) key->exprtype) %

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread James Coleman
On Tue, Jan 9, 2024 at 2:09 AM vignesh C wrote: > ... > > Given all of that I settled on this approach: > > 1. Modify is_parallel_safe() to by default ignore PARAM_EXEC params. > > 2. Add is_parallel_safe_with_params() that checks for the existence of > > such params. > > 3. Store the required

Re: Documentation: warn about two_phase when altering a subscription

2024-01-30 Thread Peter Smith
Hi, thanks for the patch. Here are some review comments for v1 == (below is not showing the links and other sgml rendering -- all those LGTM) BEFORE When altering the slot_name, the failover and two_phase properties values of the named slot may differ from their counterparts failover and

Re: Synchronizing slots from primary to standby

2024-01-30 Thread Peter Smith
Hi, I saw that v73-0001 was pushed, but it included some last-minute changes that I did not get a chance to check yesterday. Here are some review comments for the new parts of that patch. == doc/src/sgml/ref/create_subscription.sgml 1. connect (boolean) Specifies whether the CREATE

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 18:06, Tom Lane wrote: Andrew Dunstan writes: Pushed to all live branches. Thanks for the patch. v12 and v13 branches aren't looking good: Global symbol "$test_primary_datadir" requires explicit package name (did you forget to declare "my $test_primary_datadir"?) at

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Jelte Fennema-Nio
On Tue, 30 Jan 2024 at 19:48, Robert Haas wrote: > > On Tue, Jan 30, 2024 at 12:58 PM Melih Mutlu wrote: > > Sounds like it's difficult to come up with a heuristic that would work well > > enough for most cases. > > One thing with sending data instead of copying it if the buffer is empty is >

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Tom Lane
Andrew Dunstan writes: > Pushed to all live branches. Thanks for the patch. v12 and v13 branches aren't looking good: Global symbol "$test_primary_datadir" requires explicit package name (did you forget to declare "my $test_primary_datadir"?) at t/003_extrafiles.pl line 80. Execution of

Re: why there is not VACUUM FULL CONCURRENTLY?

2024-01-30 Thread Michael Paquier
On Tue, Jan 30, 2024 at 12:37:12PM +0100, Alvaro Herrera wrote: > On 2024-Jan-30, Pavel Stehule wrote: > > > some basic variant (without autovacuum support) can be good enough. We have > > no autovacuum support for REINDEX CONCURRENTLY and I don't see a necessity > > for it (sure, it can be

Re: Incorrect cost for MergeAppend

2024-01-30 Thread David Rowley
On Wed, 31 Jan 2024 at 02:23, Alexander Kuzmenkov wrote: > > On Tue, Jan 30, 2024 at 1:20 PM David Rowley wrote: > > You should likely focus on trying to find a test that does not require > > making 2 tables with 10k rows. > > Is 1k smallint OK? It should fit in one page. Still reproduces the >

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Dave Cramer
On Tue, Jan 30, 2024 at 4:56 PM Andrew Dunstan wrote: > > On 2024-01-30 Tu 09:50, Dave Cramer wrote: > > > > On Tue, 30 Jan 2024 at 08:38, Andrew Dunstan wrote: > >> >> On 2024-01-29 Mo 11:20, Dave Cramer wrote: >> >> >> Dave Cramer >> www.postgres.rocks >> >> >> On Mon, 29 Jan 2024 at 11:16,

Re: psql not responding to SIGINT upon db reconnection

2024-01-30 Thread Jelte Fennema-Nio
On Tue, 30 Jan 2024 at 23:20, Tristan Partin wrote: > Not next week, but here is a respin. I've exposed pqSocketPoll as > PQsocketPoll and am just using that. You can see the diff is so much > smaller, which is great! The exports.txt change should be made part of patch 0001, also docs are

Re: psql not responding to SIGINT upon db reconnection

2024-01-30 Thread Tristan Partin
On Fri Jan 12, 2024 at 11:13 AM CST, Tristan Partin wrote: On Fri Jan 12, 2024 at 10:45 AM CST, Robert Haas wrote: > On Mon, Jan 8, 2024 at 1:03 AM Tristan Partin wrote: > > I think the way to go is to expose some variation of libpq's > > pqSocketPoll(), which I would be happy to put together a

Re: 003_extrafiles.pl test fails on Windows with the newer Perl versions

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 06:49, Andrew Dunstan wrote: On 2024-01-30 Tu 06:21, Nazir Bilal Yavuz wrote: Hi, I was trying to install newer Perl versions to Windows CI images and found that 003_extrafiles.pl test fails on Windows with: (0.183s) not ok 2 - file lists match (0.000s) #   Failed test

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Magnus Hagander
On Tue, Jan 30, 2024 at 10:48 PM Tom Lane wrote: > > Robert Haas writes: > > There's nothing wrong with that exactly, but what does it gain us over > > my proposal of a sentinel file? > > I was imagining using selinux and/or sepgsql to directly prevent > writing postgresql.auto.conf from the

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 09:59:25 -0600, Tristan Partin wrote: > From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 > From: Tristan Partin > Date: Mon, 29 Jan 2024 18:03:39 -0600 > Subject: [PATCH v1 1/3] Refuse to register message in LogLogicalMessage if > NULL > If this occurs,

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Andrew Dunstan
On 2024-01-30 Tu 09:50, Dave Cramer wrote: On Tue, 30 Jan 2024 at 08:38, Andrew Dunstan wrote: On 2024-01-29 Mo 11:20, Dave Cramer wrote: Dave Cramer www.postgres.rocks On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: On

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
Robert Haas writes: > On Tue, Jan 30, 2024 at 2:20 PM Tom Lane wrote: >> Indeed. I'd go so far as to say that we should reject not only this >> proposal, but any future ones that intend to prevent superusers from >> doing things that superusers normally could do (and, indeed, are >> normally

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 2:20 PM Tom Lane wrote: > Indeed. I'd go so far as to say that we should reject not only this > proposal, but any future ones that intend to prevent superusers from > doing things that superusers normally could do (and, indeed, are > normally expected to do). That sort

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Andres Freund
Hi, On 2024-01-30 22:05:28 +0200, Heikki Linnakangas wrote: > On 30/01/2024 17:57, Tristan Partin wrote: > > In my effort to try to see if the test suite would pass with asan > > enabled, I ran into a max_stack_depth issue. I tried maxing it out > > (hence, the patch), but that still didn't

Re: Some revises in adding sorting path

2024-01-30 Thread David Rowley
On Wed, 31 Jan 2024 at 00:44, Richard Guo wrote: > This patchset does not aim to introduce anything new; it simply > refactors the existing code. The newly added tests are used to show > that the code that is touched here is not redundant, but rather > essential for generating certain paths. I

Re: Oversight in reparameterize_path_by_child leading to executor crash

2024-01-30 Thread Tom Lane
Richard Guo writes: > On Wed, Jan 17, 2024 at 5:01 PM Richard Guo wrote: >> Sure, here it is: >> v10-0001-Avoid-reparameterizing-Paths-when-it-s-not-suitable.patch > I forgot to mention that this patch applies on v16 not master. I spent some time looking at this patch (which seems more urgent

Re: [17] CREATE SUBSCRIPTION ... SERVER

2024-01-30 Thread Jeff Davis
On Tue, 2024-01-30 at 16:17 +0530, Ashutosh Bapat wrote: > Converting a server and user mapping to > conninfo should be delegated to the FDW being used since that FDW > knows best how to use those options. If I understand you correctly, you mean that there would be a new optional function

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Heikki Linnakangas
On 30/01/2024 17:57, Tristan Partin wrote: Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL().

Re: Schema variables - new implementation for Postgres 15

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 20:15 odesílatel Dmitry Dolgov <9erthali...@gmail.com> napsal: > Yep, in this constellation the implementation holds much better (in > terms of memory) in my create/let/drop testing. > > I've marked the CF item as ready for committer, but a note for anyone > who would like to

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Tom Lane
Robert Haas writes: > I have to admit that I'm a little afraid that people will mistake this > for an actual security feature and file bug reports or CVEs about the > superuser being able to circumvent these restrictions. If we add this, > we had better make sure that the documentation is

Re: Schema variables - new implementation for Postgres 15

2024-01-30 Thread Dmitry Dolgov
Yep, in this constellation the implementation holds much better (in terms of memory) in my create/let/drop testing. I've marked the CF item as ready for committer, but a note for anyone who would like to pick up it from here -- we're talking about first 5 patches here, up to the memory cleaning

Re: Add LSN <-> time conversion functionality

2024-01-30 Thread Melanie Plageman
On Wed, Dec 27, 2023 at 5:16 PM Melanie Plageman wrote: > > Elsewhere [1] I required a way to estimate the time corresponding to a > particular LSN in the past. I devised the attached LSNTimeline, a data > structure mapping LSNs <-> timestamps with decreasing precision for > older time, LSN

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 12:58 PM Melih Mutlu wrote: > Sounds like it's difficult to come up with a heuristic that would work well > enough for most cases. > One thing with sending data instead of copying it if the buffer is empty is > that initially the buffer is empty. I believe it will stay

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
Hi út 30. 1. 2024 v 18:35 odesílatel Pavel Stehule napsal: > > > út 30. 1. 2024 v 18:26 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >>

Re: UUID v7

2024-01-30 Thread Sergey Prokhorenko
typo: being carried to time step should be:being carried to timestemp Sergey Prokhorenko sergeyprokhore...@yahoo.com.au On Tuesday, 30 January 2024 at 04:35:45 pm GMT+3, Andrey M. Borodin wrote: > On 30 Jan 2024, at 15:33, Junwang Zhao wrote: > > It's always good to add a

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Melih Mutlu
Hi Robert, Robert Haas , 29 Oca 2024 Pzt, 20:48 tarihinde şunu yazdı: > > If there's already some data in PqSendBuffer, I wonder if it would be > > better to fill it up with data, flush it, and then send the rest of the > > data directly. Instead of flushing the partial data first. I'm afraid >

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Robert Haas
On Tue, Sep 12, 2023 at 10:39 AM Martín Marqués wrote: > The outcome looked for is that the system GUCs that require a restart > or reload are not modified unless it's through some orchestration or > someone with physical access to the configuration files (yeah, we > still have the COPY PROGRAM).

Re: Flushing large data immediately in pqcomm

2024-01-30 Thread Melih Mutlu
Hi Heikki, Heikki Linnakangas , 29 Oca 2024 Pzt, 19:12 tarihinde şunu yazdı: > > Proposed change modifies socket_putmessage to send any data larger than > > 8K immediately without copying it into the send buffer. Assuming that > > the send buffer would be flushed anyway due to reaching its

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 18:26 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > út 30. 1. 2024 v 17:18 odesílatel Dagfinn

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2024-01-30 Thread Alvaro Herrera
Hmm, this looks quite nice and simple. My only comment is that a sequence like this /* Read from WAL buffers, if available. */ rbytes = XLogReadFromBuffers(_message.data[output_message.len], startptr, nbytes, xlogreader->seg.ws_tli); output_message.len +=

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >> Pavel Stehule writes: >> >> >> >> > út

Re: separating use of SerialSLRULock

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-29, Alvaro Herrera wrote: > It's terrifying that SerialAdd() doesn't seem to be covered by any > tests, though. I realized that there's some coverage when compiling with TEST_SUMMARIZE_SERIAL, so I tried that and it looks OK. One other change I made was in the comment that explains

Re: Possibility to disable `ALTER SYSTEM`

2024-01-30 Thread Gabriele Bartolini
Hi, I am sending an updated patch, and submitting this to the next commit fest, as I still believe this could be very useful. Thanks, Gabriele On Thu, 7 Sept 2023 at 21:51, Gabriele Bartolini < gabriele.bartol...@enterprisedb.com> wrote: > Hi everyone, > > I would like to propose a patch that

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 11:17 AM Akshat Jaimini wrote: > I think we should move this patch to the next CF as I believe that work is > still going on resolving the last reported bug. We shouldn't just keep pushing this forward to the next CF. It's been idle since July. If it needs more work,

Re: cleanup patches for incremental backup

2024-01-30 Thread Robert Haas
On Tue, Jan 30, 2024 at 10:51 AM Robert Haas wrote: > I think the solution here is to find a better way to wait for the > inserts to be summarized, one that actually does wait for that to > happen. Here's a patch for that. I now think a7097ca630a25dd2248229f21ebce4968d85d10a was actually

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 17:46 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > út 30. 1. 2024 v 16:43 odesílatel Dagfinn

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < >> > ilm...@ilmari.org> napsal: >> > >> >> Pavel Stehule writes: >> >> >> >> > I

Re: Extend pgbench partitioning to pgbench_history

2024-01-30 Thread Gabriele Bartolini
Hi Abhijit, Thanks for your input. Please accept my updated patch. Ciao, Gabriele On Tue, 16 Jan 2024 at 12:53, Abhijit Menon-Sen wrote: > At 2023-11-30 11:29:15 +0100, gabriele.bartol...@enterprisedb.com wrote: > > > > With the attached patch, I extend the partitioning capability to the > >

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 17:18 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < > > ilm...@ilmari.org> napsal: > > > >> Pavel Stehule writes: > >> > >> > I inserted perl reference support -

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < > ilm...@ilmari.org> napsal: > >> Pavel Stehule writes: >> >> > I inserted perl reference support - hstore_plperl and json_plperl does >> it. >> > >> > +<->/* Dereference references recursively. */ >> >

Re: Parallelize correlated subqueries that execute within each worker

2024-01-30 Thread Akshat Jaimini
I think we should move this patch to the next CF as I believe that work is still going on resolving the last reported bug.

Re: Bytea PL/Perl transform

2024-01-30 Thread Pavel Stehule
út 30. 1. 2024 v 16:43 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Pavel Stehule writes: > > > I inserted perl reference support - hstore_plperl and json_plperl does > it. > > > > +<->/* Dereference references recursively. */ > > +<->while (SvROK(in)) > > +<-><-->in =

Re: Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Spend so much time writing out the email, I once again forget attachments...UGH. -- Tristan Partin Neon (https://neon.tech) From 331cec1c9db6ff60dcc6d9ba62a9c8be4e5e95ed Mon Sep 17 00:00:00 2001 From: Tristan Partin Date: Mon, 29 Jan 2024 18:03:39 -0600 Subject: [PATCH v1 1/3] Refuse to

Fix some ubsan/asan related issues

2024-01-30 Thread Tristan Partin
Patch 1: Passing NULL as a second argument to memcpy breaks ubsan, and there didn't seem to be anything preventing that in the LogLogicalMessage() codepath. Here is a preventative measure in LogLogicalMessage() and an Assert() in CopyXLogRecordToWAL(). Patch 2: Support building with

Re: cleanup patches for incremental backup

2024-01-30 Thread Robert Haas
On Mon, Jan 29, 2024 at 4:13 PM Nathan Bossart wrote: > On Mon, Jan 29, 2024 at 03:18:50PM -0500, Robert Haas wrote: > > I'm wondering if what we need to do is run pg_walsummary on both > > summary files in that case. If we just pick one or the other, how do > > we know which one to pick? > >

Re: Synchronizing slots from primary to standby

2024-01-30 Thread Bertrand Drouvot
Hi, On Mon, Jan 29, 2024 at 09:15:57AM +, Bertrand Drouvot wrote: > Hi, > > On Mon, Jan 29, 2024 at 02:35:52PM +0530, Amit Kapila wrote: > > I think it is better to create a separate patch for two_phase after > > this patch gets committed. > > Yeah, makes sense, will do, thanks! It's done

Re: Bytea PL/Perl transform

2024-01-30 Thread Dagfinn Ilmari Mannsåker
Pavel Stehule writes: > I inserted perl reference support - hstore_plperl and json_plperl does it. > > +<->/* Dereference references recursively. */ > +<->while (SvROK(in)) > +<-><-->in = SvRV(in); That code in hstore_plperl and json_plperl is only relevant because they deal with non-scalar

Documentation: warn about two_phase when altering a subscription

2024-01-30 Thread Bertrand Drouvot
Hi hackers, 776621a5e4 added a "warning" in the documentation to alter a subscription (to ensure the slot's failover property matches the subscription's one). The same remark could be done for the two_phase option. This patch is an attempt to do so. Looking forward to your feedback, Regards,

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Daniel Gustafsson
> On 30 Jan 2024, at 15:36, Tom Lane wrote: > > Alvaro Herrera writes: >> I noticed while answering a question that commit b577743000cd added the >> GUC scram_iterations and marked it GUC_REPORT, but failed to add it to >> the PQparameterStatus documentation. > > Why is it GUC_REPORT at all?

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Dave Cramer
On Tue, 30 Jan 2024 at 08:38, Andrew Dunstan wrote: > > On 2024-01-29 Mo 11:20, Dave Cramer wrote: > > > Dave Cramer > www.postgres.rocks > > > On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: > >> >> On 2024-01-26 Fr 09:18, Dave Cramer wrote: >> >> >> >> On Fri, 26 Jan 2024 at 07:36, Andrew

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Alvaro Herrera
On 2024-Jan-30, Jelte Fennema-Nio wrote: > On Tue, 30 Jan 2024 at 13:37, Alvaro Herrera wrote: > > > > I noticed while answering a question that commit b577743000cd added the > > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > > the PQparameterStatus documentation. > >

Re: scram_iterations is undocumented GUC_REPORT

2024-01-30 Thread Tom Lane
Alvaro Herrera writes: > I noticed while answering a question that commit b577743000cd added the > GUC scram_iterations and marked it GUC_REPORT, but failed to add it to > the PQparameterStatus documentation. Why is it GUC_REPORT at all? I don't see a strong need for that. (In particular, the

Re: psql's FETCH_COUNT (cursor) is not being respected for CTEs

2024-01-30 Thread Daniel Verite
vignesh C wrote: > patching file src/interfaces/libpq/exports.txt > Hunk #1 FAILED at 191. > 1 out of 1 hunk FAILED -- saving rejects to file > src/interfaces/libpq/exports.txt.rej > > Please post an updated version for the same. PFA a rebased version. Best regards, -- Daniel Vérité

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

2024-01-30 Thread jian he
On Tue, Dec 5, 2023 at 6:55 PM Andrei Lepikhov wrote: > > Here is fresh version with the pg_dump.pl regex fixed. Now it must pass > buildfarm. +JumbleState * +JumbleExpr(Expr *expr, uint64 *queryId) +{ + JumbleState *jstate = NULL; + + Assert(queryId != NULL); + + jstate = (JumbleState *)

Re: Functions to return random numbers in a given range

2024-01-30 Thread Dean Rasheed
On Tue, 30 Jan 2024 at 12:47, Aleksander Alekseev wrote: > > Maybe I'm missing something but I'm not sure if I understand what this > test tests particularly: > > ``` > -- There should be no triple duplicates in 1000 full-range 32-bit random() > -- values. (Each of the C(1000, 3) choices of

Re: compiling postgres on windows arm using meson

2024-01-30 Thread Nazir Bilal Yavuz
Hi, On Thu, 18 Jan 2024 at 05:07, Dave Cramer wrote: > > Greetings, > Getting the following error > > [1146/2086] Generating src/backend/postgres.def with a custom command > (wrapped by meson to set PATH) > FAILED: src/backend/postgres.def > "C:\Program Files\Meson\meson.exe" "--internal" "exe"

Re: [PATCH] Add native windows on arm64 support

2024-01-30 Thread Andrew Dunstan
On 2024-01-29 Mo 11:20, Dave Cramer wrote: Dave Cramer www.postgres.rocks On Mon, 29 Jan 2024 at 11:16, Andrew Dunstan wrote: On 2024-01-26 Fr 09:18, Dave Cramer wrote: On Fri, 26 Jan 2024 at 07:36, Andrew Dunstan wrote: On 2024-01-25 Th 20:32, Michael Paquier

Re: Optmize bitmapword macros calc (src/backend/nodes/bitmapset.c)

2024-01-30 Thread Ranier Vilela
Em seg., 29 de jan. de 2024 às 19:40, Nathan Bossart < nathandboss...@gmail.com> escreveu: > On Tue, Jan 30, 2024 at 11:23:57AM +1300, David Rowley wrote: > > On Tue, 30 Jan 2024 at 08:32, Nathan Bossart > wrote: > >> I'm currently +0.1 for this change. I don't see any huge problem with > >>

Re: UUID v7

2024-01-30 Thread Andrey M. Borodin
> On 30 Jan 2024, at 15:33, Junwang Zhao wrote: > > It's always good to add a newline at the end of a source file, though > this might be nitpicky. Thanks, also fixed warning found by CFBot. Best regards, Andrey Borodin. v17-0001-Implement-UUID-v7.patch Description: Binary data

Re: Improvement discussion of custom and generic plans

2024-01-30 Thread Quan Zongliang
On 2023/11/3 15:27, Quan Zongliang wrote: Hi We have one such problem. A table field has skewed data. Statistics: n_distinct | -0.4481973 most_common_vals   | {5f006ca25b52ed78e457b150ee95a30c} most_common_freqs  | {0.5518474} Data generation: CREATE TABLE s_user (

Re: Incorrect cost for MergeAppend

2024-01-30 Thread Alexander Kuzmenkov
On Tue, Jan 30, 2024 at 1:20 PM David Rowley wrote: > You should likely focus on trying to find a test that does not require > making 2 tables with 10k rows. Is 1k smallint OK? It should fit in one page. Still reproduces the error, and the entire test case runs in under 10 ms. diff --git

pg_stat_advisor extension

2024-01-30 Thread Илья Евдокимов
Hello PostgreSQL Hackers, I'm thrilled to share with you a new PostgreSQL extension I've developed, called 'pg_stat_advisor'. The genesis of this extension traces back to a conversation in this: https://www.postgresql.org/message-id/e2512fd5-77a4-825b-e456-c0586e37f293%40enterprisedb.com The

  1   2   >