Re: Re: proposal: schema variables

2024-12-19 Thread jian he
hi. review is based on v20241219-0002-Storage-for-session-variables-and-SQL-interface.patch and v20241219-0001-Enhancing-catalog-for-support-session-variables-and-.patch. in doc/src/sgml/catalogs.sgml defaclobjtype char Type of object this entry is for: r = relation (table, view), S = sequenc

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Masahiko Sawada
On Thu, Dec 19, 2024 at 9:36 PM Amit Kapila wrote: > > On Fri, Dec 20, 2024 at 12:42 AM Masahiko Sawada > wrote: > > > > On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > > > > > > > > @@ -2067,7 +2143,7 @@ ReorderBufferResetTXN(ReorderBuffer *rb, > > > ReorderBufferTXN *txn, > > > Reo

Re: Conflict detection for update_deleted in logical replication

2024-12-19 Thread Nisha Moond
Here is further performance test analysis with v16 patch-set. In the test scenarios already shared on -hackers [1], where pgbench was run only on the publisher node in a pub-sub setup, no performance degradation was observed on either node. In contrast, when pgbench was run only on the subscri

Re: Added schema level support for publication.

2024-12-19 Thread Amit Kapila
On Thu, Dec 19, 2024 at 12:02 AM vignesh C wrote: > > On Wed, 18 Dec 2024 at 16:34, Artur Zakirov wrote: > > > > On Tue, 17 Dec 2024 at 10:43, vignesh C wrote: > > > > If I understand your suggestion correctly I think this will break the > > > > "--exclude-schema" option of pg_dump. That change

Re: Statistics Import and Export

2024-12-19 Thread Corey Huinker
> > The biggest functional change is the way dependencies are handled for > matview stats. Materialized views ordinarily end up in > SECITON_PRE_DATA, but in some cases they can be postponed to > SECTION_POST_DATA. You solved that by always putting the matview stats > in SECTION_POST_DATA. > Accur

Re: per backend I/O statistics

2024-12-19 Thread Alexander Lakhin
Hello Michael, 19.12.2024 06:21, Michael Paquier wrote: Fixed that, bumped the two version counters, and done. Could you, please, look at recent failures produced by grassquit (which has fsync = on in it's config), on an added test case? For instance, [1]: --- /home/bf/bf-build/grassquit/HEAD/

Re: Collation & ctype method table, and extension hooks

2024-12-19 Thread Andreas Karlsson
On 12/5/24 1:21 AM, Jeff Davis wrote: = v9-0003-Move-code-for-collation-version-into-provider-spe.patch Moves some code from pg_collate.c into provider specific files. I agree with the general idea, but it seems we are accumulating a lot of provider-specific functions. Should we define a pro

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Amit Kapila
On Fri, Dec 20, 2024 at 12:42 AM Masahiko Sawada wrote: > > On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > > > > > @@ -2067,7 +2143,7 @@ ReorderBufferResetTXN(ReorderBuffer *rb, > > ReorderBufferTXN *txn, > > ReorderBufferChange *specinsert) > > { > > /* Discard the changes that we

Re: Statistics Import and Export

2024-12-19 Thread Jeff Davis
On Fri, 2024-12-13 at 00:22 -0500, Corey Huinker wrote: > Per offline conversation with Jeff, adding a --no-schema to pg_dump > option both for completeness (we already have --no-data and --no- > statistics), but users who previously got the effect of --no-schema > did so by specifying --data-only,

Speed up ICU case conversion by using ucasemap_utf8To*()

2024-12-19 Thread Andreas Karlsson
Hi, Jeff pointed out to me that the case conversion functions in ICU have UTF-8 specific versions which means we can call those directly if the database encoding is UTF-8 and skip having to convert to and from UChar. Since most people today run their databases in UTF-8 I think this optimizat

Eliminating SPI / SQL from some RI triggers - take 3

2024-12-19 Thread Amit Langote
Hi, We discussed $subject at [1] and [2] and I'd like to continue that work with the hope to commit some part of it for v18. In short, performing the RI checks for inserts and updates of a referencing table as direct scans of the PK index results in up to 40% improvement in their performance, esp

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2024-12-19 Thread jian he
On Fri, Dec 20, 2024 at 8:02 AM Michael Paquier wrote: > > On Thu, Dec 19, 2024 at 02:28:21PM +0800, jian he wrote: > > Since materialized views have physical storage, > > > > we can make materialized views also using COPY table_name, instead of > > COPY(query). > > > > Some simple tests show arou

Re: Can rs_cindex be < 0 for bitmap heap scans?

2024-12-19 Thread Richard Guo
On Fri, Dec 20, 2024 at 7:50 AM Melanie Plageman wrote: > On Wed, Dec 18, 2024 at 9:50 PM Richard Guo wrote: > > I think this binary search code now has a risk of underflow. If 'mid' > > is calculated as zero, the second 'if' branch will cause 'end' to > > underflow. > What about this instead:

Re: Logical Replication of sequences

2024-12-19 Thread Peter Smith
Hi Vignesh. Here are some review comments for the patch v20241211-0005. == doc/src/sgml/logical-replication.sgml Section "29.6.1. Sequence Definition Mismatches" 1. + + + If there are differences in sequence definitions between the publisher and + subscriber, a WARNING is log

Re: Memory leak in WAL sender with pgoutput (v10~)

2024-12-19 Thread Michael Paquier
On Thu, Dec 19, 2024 at 09:27:04AM -0800, Masahiko Sawada wrote: > On Wed, Dec 18, 2024 at 6:26 PM Michael Paquier wrote: >> v2 does not have these weaknesses by design. > > I agree that v2 is better than v3 in terms of that. Okay. In terms of the backbranches, would you prefer that I handle th

Re: [PATCH] Fixed creation of empty .log files during log rotation

2024-12-19 Thread Michael Paquier
On Fri, Dec 13, 2024 at 02:21:45PM +0300, Arseny Kositsin wrote: > 08.12.2024 01:06, Tomas Vondra wrote: >> In fact, isn't it wrong to do the check outside? logfile_rotate_dest() >> is responsible for closing the log files too, and with the check outside >> we keep the first .log file open forever

Re: Back-patch of: avoid multiple hard links to same WAL file after a crash

2024-12-19 Thread Robert Pang
Dear Michael, Thank you for applying this back-patch. I also appreciate everyone's input on this issue. Sincerely, Robert Pang On Thu, Dec 19, 2024 at 4:13 PM Michael Paquier wrote: > On Thu, Dec 19, 2024 at 11:07:25AM -0500, Andres Freund wrote: > > On 2024-12-19 09:31:14 -0600, Nathan Boss

Re: [PoC] Let libpq reject unexpected authentication requests

2024-12-19 Thread Michael Paquier
On Thu, Dec 19, 2024 at 05:02:19PM -0800, Jacob Champion wrote: > I've taken another shot at this over on the OAuth thread [1], for > those who are still interested; see v40-0002. It's more code than my > previous attempt, but I think it does a clearer job of separating the > two concerns. > > [1]

Re: pure parsers and reentrant scanners

2024-12-19 Thread Tom Lane
I noticed that lapwing is bleating about ccache gcc -std=gnu99 -Wall -Wmissing-prototypes -Wpointer-arith -Wdeclaration-after-statement -Werror=vla -Wendif-labels -Wmissing-format-attribute -Wformat-security -fno-strict-aliasing -fwrapv -fexcess-precision=standard -g -O2 -fPIC -fvisibility=hidd

Re: [PoC] Let libpq reject unexpected authentication requests

2024-12-19 Thread Jacob Champion
Michael Paquier wrote: > Please note that the CF entry has been marked as committed. We should > really do something about having a cleaner separation between SASL, > the mechanisms and the AUTH_REQ_* codes, in the long term, though > honestly I don't know yet what would be the most elegant and t

Re: Logical Replication of sequences

2024-12-19 Thread Peter Smith
Hi Vignesh, Here are some review comments for the patch v20241211-0004. == GENERAL 1. There are more than a dozen places where the relation (relkind) is checked to see if it is a SEQUENCE: e.g. + get_rel_relkind(subrel->srrelid) != RELKIND_SEQUENCE && e.g. + if (get_rel_relkind(subrel->srre

Re: AIO v2.0

2024-12-19 Thread Andres Freund
Hi, On 2024-12-19 17:34:29 -0500, Tom Lane wrote: > Andres Freund writes: > > My current thoughts around this are that we should generally, independent of > > io_uring, increase the FD limit ourselves. > > I'm seriously down on that, because it amounts to an assumption that > we own the machine a

Re: Back-patch of: avoid multiple hard links to same WAL file after a crash

2024-12-19 Thread Michael Paquier
On Thu, Dec 19, 2024 at 11:07:25AM -0500, Andres Freund wrote: > On 2024-12-19 09:31:14 -0600, Nathan Bossart wrote: >> LGTM > > Dito. Thanks for double-checking. Done this one. -- Michael signature.asc Description: PGP signature

Re: in BeginCopyTo make materialized view using COPY TO instead of COPY (query).

2024-12-19 Thread Michael Paquier
On Thu, Dec 19, 2024 at 02:28:21PM +0800, jian he wrote: > Since materialized views have physical storage, > > we can make materialized views also using COPY table_name, instead of > COPY(query). > > Some simple tests show around %3.7 or 4.3% speed up. This restriction comes from 3bf3ab8c5636 as

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread Tom Lane
David Rowley writes: > On Fri, 20 Dec 2024 at 11:23, Tom Lane wrote: >> Attached is a patch to take it out and then rename >> BuildTupleHashTableExt() back to BuildTupleHashTable(). > No complaints here. Thanks for cleaning that up. Thanks, will push. > I couldn't help but also notice the nbuc

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread David Rowley
On Fri, 20 Dec 2024 at 11:23, Tom Lane wrote: > Pushed ... and now I have one more beef about the way things are > in this area. I don't think we should leave the compatibility > function BuildTupleHashTable() in place in HEAD. Making it a > wrapper around a new function BuildTupleHashTableExt()

Re: Can rs_cindex be < 0 for bitmap heap scans?

2024-12-19 Thread Melanie Plageman
On Wed, Dec 18, 2024 at 9:50 PM Richard Guo wrote: > > On Thu, Dec 19, 2024 at 8:18 AM Melanie Plageman > wrote: > > I pushed the straightforward option for now so that it's fixed. > > I think this binary search code now has a risk of underflow. If 'mid' > is calculated as zero, the second 'if'

Re: AIO v2.0

2024-12-19 Thread Tom Lane
Andres Freund writes: > My current thoughts around this are that we should generally, independent of > io_uring, increase the FD limit ourselves. I'm seriously down on that, because it amounts to an assumption that we own the machine and can appropriate all its resources. If ENFILE weren't a thi

Re: AIO v2.0

2024-12-19 Thread Andres Freund
Hi, Sorry for loosing track of your message for this long, I saw it just now because I was working on posting a new version. On 2024-11-18 13:19:58 +0100, Jakub Wartak wrote: > On Fri, Sep 6, 2024 at 9:38 PM Andres Freund wrote: > Thank You for worth admiring persistence on this. Please do not

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread Tom Lane
Pushed ... and now I have one more beef about the way things are in this area. I don't think we should leave the compatibility function BuildTupleHashTable() in place in HEAD. Making it a wrapper around a new function BuildTupleHashTableExt() was a fine solution for preserving ABI in released bra

Re: Parallel heap vacuum

2024-12-19 Thread Masahiko Sawada
On Sat, Dec 14, 2024 at 1:24 PM Tomas Vondra wrote: > > On 12/13/24 00:04, Tomas Vondra wrote: > > ... > > > > The main difference is here: > > > > > > master / no parallel workers: > > > > pages: 0 removed, 221239 remain, 221239 scanned (100.00% of total) > > > > 1 parallel worker: > > > > pa

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread Tom Lane
David Rowley writes: > One minor detail... I think the only thing I'd like to see is the > moving of the enable_hashagg checks to increment the disabled_nodes > count in create_setop_path() instead of where it's being called. I > understand there's only 1 caller of that function that passes > SET

Re: JIT compilation per plan node

2024-12-19 Thread David Rowley
Thanks for taking a look and thinking about this problem. On Fri, 20 Dec 2024 at 03:49, Matheus Alcantara wrote: > static void > plan_consider_jit(Plan *plan) > { > plan->jit = false; > > if (jit_enabled) > { > Costtotal_cost; > > total_cost = plan->total_cost * pl

Re: Fix crash when non-creator being an iteration on shared radix tree

2024-12-19 Thread Masahiko Sawada
On Wed, Dec 18, 2024 at 10:32 PM John Naylor wrote: > > On Thu, Dec 19, 2024 at 1:00 AM Masahiko Sawada wrote: > > > > On Tue, Dec 17, 2024 at 11:12 PM John Naylor > > wrote: > > > +1 in general, but I wonder if instead the iter_context should be > > > created within RT_BEGIN_ITERATE -- I imagi

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread David Rowley
On Fri, 20 Dec 2024 at 08:38, Tom Lane wrote: > > David Rowley writes: > > On Thu, 19 Dec 2024 at 15:44, Tom Lane wrote: > >> The common_result_slot_type() function I wrote here perhaps > >> should be made generally available, but I didn't do that yet. > > > I think it would be good to make this

Re: Converting SetOp to read its two inputs separately

2024-12-19 Thread Tom Lane
David Rowley writes: > On Thu, 19 Dec 2024 at 15:44, Tom Lane wrote: >> The common_result_slot_type() function I wrote here perhaps >> should be made generally available, but I didn't do that yet. > I think it would be good to make this generic as it can be at least > used in nodeRecursiveunion.

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Masahiko Sawada
On Thu, Dec 19, 2024 at 2:56 AM Amit Kapila wrote: > > On Thu, Dec 19, 2024 at 7:14 AM Masahiko Sawada wrote: > > > > On Mon, Dec 9, 2024 at 9:09 PM Amit Kapila wrote: > > > > > > On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada > > > wrote: > > > > > > > > I've attached a new version patch tha

Re: sslinfo extension - add notbefore and notafter timestamps

2024-12-19 Thread Cary Huang
> > The recent bump in minmum required versions of OpenSSL and LibreSSL made me > > remember to revisit this patch which was previously reverted due to library > > incompatibility (with *both* OpenSSL and LibreSSL on different APIs). > > > > The attached removes the timestamp conversion worka

Allow ILIKE forward matching to use btree index

2024-12-19 Thread Yugo Nagata
Hi, Currently, btree indexes cannot used for ILIKE (~~*) operator if the pattern has case-varying characters although LIKE (~~) expression can be converted to indexable clauses by the planner support function (if the collation is "C" or operator class 'text_pattern_ops' is used). For example, "t

Re: Doc: clarify the log message level of the VERBOSE option

2024-12-19 Thread Fujii Masao
On 2024/12/05 16:48, Masahiro Ikeda wrote: On 2024-12-05 16:23, Yugo NAGATA wrote: -  Prints a progress report as each table is clustered. +  Prints a progress report as each table is clustered, +  at INFO level. I feel like the comma could not be necessary here like the fix for

Re: Add CASEFOLD() function.

2024-12-19 Thread Jeff Davis
On Thu, 2024-12-19 at 17:18 +0100, Peter Eisentraut wrote: > Can you explain this in further detail?  I don't quite follow why > this > would be required. I am unsure now. My initial reasoning was based on the idea that users would want to use CASEFOLD(t) in a unique expression index as an impro

Re: Memory leak in WAL sender with pgoutput (v10~)

2024-12-19 Thread Masahiko Sawada
On Wed, Dec 18, 2024 at 6:26 PM Michael Paquier wrote: > > On Thu, Dec 19, 2024 at 07:50:57AM +0530, Amit Kapila wrote: > > The difference between fix_memory_leak_v2 and fix_memory_leak_v3 is > > that the earlier one resets the pubctx to NULL along with freeing the > > context memory. Resetting a

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-12-19 Thread Melanie Plageman
On Thu, Dec 19, 2024 at 10:23 AM Melanie Plageman wrote: > > On Thu, Dec 19, 2024 at 10:12 AM Richard Guo wrote: > > > > On Thu, Dec 19, 2024 at 6:15 PM Richard Guo wrote: > > > I think we need to check whether rs_tbmiterator is NULL before calling > > > tbm_end_iterate on it, like below. > > >

Re: Remaining dependency on setlocale()

2024-12-19 Thread Peter Eisentraut
On 17.12.24 19:10, Jeff Davis wrote: On Tue, 2024-12-17 at 13:14 +0100, Peter Eisentraut wrote: I think we will need to keep the global LC_CTYPE setting set to something useful, for example so that system error messages come out in the right encoding. Do we need to rely on the global LC_CTYPE

Re: Add CASEFOLD() function.

2024-12-19 Thread Peter Eisentraut
On 16.12.24 18:49, Jeff Davis wrote: One question I have is whether we want this function to normalize the output. I believe most usecases would want the output normalized, because normalization differences (e.g. "a" U+0061 followed by "combining acute" U+0301 vs "a with acute" U+00E1) are more

Re: Bug in nbtree SAOP scans with non-required arrays, truncated high key

2024-12-19 Thread Peter Geoghegan
On Wed, Dec 18, 2024 at 3:20 PM Peter Geoghegan wrote: > Attached fix addresses the issue by consistently resetting the scan's > so->scanBehind flag (which might still be set to true from the > previous page's high key) at the start of _bt_advance_array_keys. I pushed this fix just now. I should

Re: connection establishment versus parallel workers

2024-12-19 Thread Nathan Bossart
Sorry for the delay, and thanks again for digging into this. On Fri, Dec 13, 2024 at 03:56:00PM +1300, Thomas Munro wrote: > 0001 patch is unchanged, 0002 patch sketches out a response to the > observation a couple of paragraphs above. Both of these patches seem to improve matters quite a bit. I

Re: Back-patch of: avoid multiple hard links to same WAL file after a crash

2024-12-19 Thread Andres Freund
On 2024-12-19 09:31:14 -0600, Nathan Bossart wrote: > On Thu, Dec 19, 2024 at 02:44:53PM +0900, Michael Paquier wrote: > > I've been double-checking the code to refresh myself with the problem, > > and I don't see a reason to not apply something like the attached set > > down to v13 for all these r

Re: Parametrization minimum password lenght

2024-12-19 Thread Nathan Bossart
On Thu, Dec 19, 2024 at 09:36:17AM -0600, Nathan Bossart wrote: > On Thu, Dec 19, 2024 at 07:25:30AM +, Bertrand Drouvot wrote: >> - errmsg("password is too short"))); >> + errmsg("password is too short: %d (< >> %d)", pwd

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Yura Sokolov
19.12.2024 15:10, Andrey M. Borodin wrote: On 19 Dec 2024, at 15:37, Yura Sokolov wrote: So, there's no more than 8192 banks at the moment. OK, but still current type indicates bitwise usage, while struct member is used as a number. Ok, I agree. Here's version with type change bits16 ->

Re: Parametrization minimum password lenght

2024-12-19 Thread Nathan Bossart
On Thu, Dec 19, 2024 at 11:22:02AM +0100, Emanuele Musella wrote: > It seems to me you are working on an older version of patch. > > In attached the latest one for your reference. I used the v9 patch as the basis for v10. There are a few small edits, such as removing the upper bound for the para

Re: Parametrization minimum password lenght

2024-12-19 Thread Nathan Bossart
On Thu, Dec 19, 2024 at 07:25:30AM +, Bertrand Drouvot wrote: > + if (pwdlen < min_password_length) >ereport(ERROR, >(errcode(ERRCODE_INVALID_PARAMETER_VALUE), > errmsg("password is too short"))); > > Now that the minimum password length is

Re: Back-patch of: avoid multiple hard links to same WAL file after a crash

2024-12-19 Thread Nathan Bossart
On Thu, Dec 19, 2024 at 02:44:53PM +0900, Michael Paquier wrote: > I've been double-checking the code to refresh myself with the problem, > and I don't see a reason to not apply something like the attached set > down to v13 for all these remaining branches (minus an edit of the > commit message).

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-12-19 Thread Melanie Plageman
On Thu, Dec 19, 2024 at 10:12 AM Richard Guo wrote: > > On Thu, Dec 19, 2024 at 6:15 PM Richard Guo wrote: > > I think we need to check whether rs_tbmiterator is NULL before calling > > tbm_end_iterate on it, like below. > > > > --- a/src/backend/executor/nodeBitmapHeapscan.c > > +++ b/src/backen

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-12-19 Thread Richard Guo
On Thu, Dec 19, 2024 at 6:15 PM Richard Guo wrote: > I think we need to check whether rs_tbmiterator is NULL before calling > tbm_end_iterate on it, like below. > > --- a/src/backend/executor/nodeBitmapHeapscan.c > +++ b/src/backend/executor/nodeBitmapHeapscan.c > @@ -572,9 +572,11 @@ ExecReScanBi

Re: Removing the pgstat_flush_io() call from the walwriter

2024-12-19 Thread Bertrand Drouvot
Hi, On Thu, Dec 19, 2024 at 05:50:43PM +0300, Nazir Bilal Yavuz wrote: > Hi, > > On Thu, 19 Dec 2024 at 08:50, Bertrand Drouvot > wrote: > > > > Hi, > > > > On Wed, Dec 18, 2024 at 11:55:11AM -0500, Andres Freund wrote: > > > Yea, i think it's fine to just call it unnecessarily. Particularly >

Re: Removing the pgstat_flush_io() call from the walwriter

2024-12-19 Thread Nazir Bilal Yavuz
Hi, On Thu, 19 Dec 2024 at 08:50, Bertrand Drouvot wrote: > > Hi, > > On Wed, Dec 18, 2024 at 11:55:11AM -0500, Andres Freund wrote: > > Yea, i think it's fine to just call it unnecessarily. Particularly because > > we > > do want to actually report IO stats for walwriter eventually. > > Yeah, b

Re: JIT compilation per plan node

2024-12-19 Thread Matheus Alcantara
Hi, It seems quite a while since the last email, but I was taking a look at this thread and I think that we can have another, but similar, approach for this proposal. Em ter., 14 de mai. de 2024 às 01:10, David Rowley escreveu: > Currently, during execution, ExecCreateExprSetupSteps() traverses

Re: Send duration output to separate log files

2024-12-19 Thread Greg Sabino Mullane
Thanks for the feedback on this, everyone. I think, given the lack of committer enthusiasm, I may have to go the route of redesigning the logging system completely. At any rate, I cannot circle back to this for a while. 2. possibility to support rsyslog by setting different or some syslog > relate

Re: New "single" COPY format

2024-12-19 Thread Andrew Dunstan
On 2024-12-16 Mo 10:09 AM, Joel Jacobson wrote: Hi hackers, After further consideration, I'm withdrawing the patch. Some fundamental questions remain unresolved: - Should round-trip fidelity be a strict goal? By "round-trip fidelity", I mean that data exported and then re-imported should y

Re: log_min_messages per backend type

2024-12-19 Thread Euler Taveira
On Thu, Dec 19, 2024, at 1:13 AM, Kirill Reshke wrote: > Hi! Looks like a sane proposal. Correct me if I'm wrong, but with your > patch it is not possible to configure something like "everybody ERROR, > but autovac DEBUG5"? I mean, > set log_min_messages to 'ERROR:default, DEBUG5:autovacuum' (not >

Re: Separate GUC for replication origins

2024-12-19 Thread Peter Eisentraut
On 10.12.24 19:41, Euler Taveira wrote: I'm attaching a patch that adds max_replication_origins. It basically replaces all of the points that refers to max_replication_slots on the subscriber. It uses the same default value as max_replication_slots (10). I did nothing to keep the backward compat

Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table.

2024-12-19 Thread Robert Haas
On Thu, Dec 19, 2024 at 7:08 AM Nishant Sharma wrote: > Thanks Robert for your response and the review comments! > > I have addressed both your suggestions, by changing the error > message and merging both the patches to one. > > PFA, patch set v4. Cool. I don't want to commit this right before m

Re: Can rs_cindex be < 0 for bitmap heap scans?

2024-12-19 Thread Ranier Vilela
Em qua., 18 de dez. de 2024 às 20:18, Melanie Plageman < melanieplage...@gmail.com> escreveu: > On Wed, Dec 18, 2024 at 3:13 PM Melanie Plageman > wrote: > > > > option 1: > > most straightforward fix > > > > diff --git a/src/backend/access/heap/heapam_handler.c > > b/src/backend/access/heap/heap

RE: COPY performance on Windows

2024-12-19 Thread Ryohei Takahashi (Fujitsu)
Hi Thank you for your advice and testing. > I think, it could be checked, if table has text fields instead of > numeric - we could exclude numeric conversion > and have the same input-output operations (really more IO-operation, but > we need to compare) I changed the column from int to text

Re: Proposal to add a new URL data type.

2024-12-19 Thread Victor Yegorov
ср, 11 дек. 2024 г. в 19:04, Alexander Borisov : > > I've created a commitfest entry for the patch: https:// > > commitfest.postgresql.org/51/5432/ > commitfest.postgresql.org/51/5432/> > > I was not able to find you, please, register a community account and set > > yourself as an author for the

Re: pure parsers and reentrant scanners

2024-12-19 Thread Peter Eisentraut
On 18.12.24 18:43, Tom Lane wrote: Peter Eisentraut writes: I started committing the cube and seg pieces. There were a couple of complaints from the buildfarm, like segscan.c:348:15: error: redefinition of typedef 'yyscan_t' is a C11 feature [-Werror,-Wtypedef-redefinition] typedef void* yysca

Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table.

2024-12-19 Thread Nishant Sharma
Hi, Summary of this thread- Tom had the following concern:- Regarding location of check in ATExecAlterColumnGenericOptions. And spell check issue comparison. Which I believe was addressed by v2 and its response. Ashutosh had the suggestion:- Check should be delegated to an FDW validator. Which

Re: pure parsers and reentrant scanners

2024-12-19 Thread Peter Eisentraut
On 17.12.24 01:46, Andreas Karlsson wrote: On 12/16/24 8:39 AM, Peter Eisentraut wrote: I'll leave it at this for now and wait for some reviews. I really like this work since it makes the code cleaner to read on top of paving the way for threading. Reviewed the patches and found a couple of

Re: [PATCH] Add support for displaying database service in psql prompt

2024-12-19 Thread Michael Banck
Hi, On Wed, Dec 18, 2024 at 03:17:36PM +0900, Michael Paquier wrote: > On Tue, Dec 17, 2024 at 09:42:36AM +0100, Michael Banck wrote: > > Done. > > > > V3 attached. > > Done. Thanks! Michael

Re: Can rs_cindex be < 0 for bitmap heap scans?

2024-12-19 Thread Ranier Vilela
Em qua., 18 de dez. de 2024 às 23:50, Richard Guo escreveu: > On Thu, Dec 19, 2024 at 8:18 AM Melanie Plageman > wrote: > > I pushed the straightforward option for now so that it's fixed. > > I think this binary search code now has a risk of underflow. If 'mid' > is calculated as zero, the seco

Re: Can rs_cindex be < 0 for bitmap heap scans?

2024-12-19 Thread Ranier Vilela
Hi. Sorry for not responding quickly. I have been without communication until now. Em qua., 18 de dez. de 2024 às 17:13, Melanie Plageman < melanieplage...@gmail.com> escreveu: > On Wed, Dec 18, 2024 at 1:23 PM Ranier Vilela wrote: > > > > Hi. > > > > Em qua., 18 de dez. de 2024 às 14:01, Melan

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Andrey M. Borodin
> On 19 Dec 2024, at 15:37, Yura Sokolov wrote: > > So, there's no more than 8192 banks at the moment. OK, but still current type indicates bitwise usage, while struct member is used as a number. Best regards, Andrey Borodin.

Re: [PROPOSAL] : Disallow use of empty column name in (column_name '') in ALTER or CREATE of foreign table.

2024-12-19 Thread Nishant Sharma
On Tue, Dec 17, 2024 at 10:12 PM Robert Haas wrote: > On Wed, Oct 9, 2024 at 7:12 AM Nishant Sharma > wrote: > > I have included them in v3. v3 does not allow empty schema_name & > > table_name options along with column_name. > > I was looking at these patches today and trying to understand whet

speedup COPY TO for partitioned table.

2024-12-19 Thread jian he
hi. COPY (select_query) generally slower than table_beginscan.. table_scan_getnextslot ..table_endscan, especially for partitioned tables. so in the function DoCopyTo trying to use table_beginscan.. table_scan_getnextslot ..table_endscan for COPY TO when source table is a partitioned table. s

Re: Skip collecting decoded changes of already-aborted transactions

2024-12-19 Thread Amit Kapila
On Thu, Dec 19, 2024 at 7:14 AM Masahiko Sawada wrote: > > On Mon, Dec 9, 2024 at 9:09 PM Amit Kapila wrote: > > > > On Tue, Nov 26, 2024 at 3:03 AM Masahiko Sawada > > wrote: > > > > > > I've attached a new version patch that incorporates all comments I got so > > > far. > > > > > > > Review

Re: Vacuum statistics

2024-12-19 Thread Alena Rybakina
Hi! On 02.12.2024 17:46, Ilia Evdokimov wrote: In my opinion, the patches are semantically correct. However, not all dead code has been removed - I'm referring to pgstat_update_snapshot(). Also, the tests need to be fixed. I fixed it [0]. Thank you! [0] https://www.postgresql.org/message-

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Yura Sokolov
19.12.2024 13:10, Andrey Borodin пишет: On 19 Dec 2024, at 15:01, Yura Sokolov wrote: - `&` takes 0.69ns - `mult-rec` takes 2.94ns - `%` takes 3.24ns. Thanks, Yura, for benchmarks and off-list conversation. I’ve reproduced similar numbers on my Apple M2. I agree that additional 3-4ns are n

Re: Parametrization minimum password lenght

2024-12-19 Thread Emanuele Musella
Hi Nathan, thank you. It seems to me you are working on an older version of patch. In attached the latest one for your reference. Thanks for your support Best regards Emanuele Musella Il giorno mer 18 dic 2024 alle ore 21:56 Nathan Bossart < nathandboss...@gmail.com> ha scritto: > Here is

Re: New "single" COPY format

2024-12-19 Thread Joel Jacobson
On Thu, Dec 19, 2024, at 07:48, jian he wrote: > I have reviewed v21-0001 again. > > v21-0001-Introduce-CopyFormat-and-replace-csv_mode-and-binary.patch > is a good refactor. > > > overall looks good to me. OK, I could submit it as a separate patch. Would we also want the reorganization of existi

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Andrey Borodin
> On 19 Dec 2024, at 15:01, Yura Sokolov wrote: > > - `&` takes 0.69ns > - `mult-rec` takes 2.94ns > - `%` takes 3.24ns. Thanks, Yura, for benchmarks and off-list conversation. I’ve reproduced similar numbers on my Apple M2. I agree that additional 3-4ns are negligible in case of SLRU access.

Re: Fix bank selection logic in SLRU

2024-12-19 Thread Yura Sokolov
10.12.2024 17:07, Dilip Kumar wrote: On Tue, 10 Dec 2024 at 6:32 PM, Andrey M. Borodin > wrote: > On 10 Dec 2024, at 15:39, Yura Sokolov mailto:y.soko...@postgrespro.ru>> wrote: > > It is not critical bug, since it doesn't hurt correctness just p

Re: Change GUC hashtable to use simplehash?

2024-12-19 Thread John Naylor
I wrote: > The offending code is not even my preferred way to handle the last > word of the string (see f4ad0021af), so if the current way is still > not valgrind-clean, I wonder if we should give up and add an > exception, since we know any garbage bits are masked off. That would actually be a m

Re: BitmapHeapScan streaming read user and prelim refactoring

2024-12-19 Thread Richard Guo
On Sat, Oct 19, 2024 at 5:48 AM Melanie Plageman wrote: > I plan to commit 0002 and 0003 next week. I'm interested if you think > 0001 is correct. > I may also commit 0004-0006 as I feel they are ready too. I noticed an oversight on master, which I think was introduced by the 0005 patch. In Exec

Re: Add “FOR UPDATE NOWAIT” lock details to the log.

2024-12-19 Thread Yuki Seino
I will design a new GUC while ensuring consistency with 'log_lock_waits'. Regarding the patch, when I applied it to HEAD, it failed to compile with the following errors. Could you update the patch to address this? proc.c:1538:20: error: use of undeclared identifier 'buf'  1538 |