Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Michael Paquier
On Fri, Sep 16, 2022 at 06:48:36PM -0700, Peter Geoghegan wrote: > On Fri, Sep 16, 2022 at 6:20 PM Tom Lane wrote: >> I'd view the current state of reorderbuffer.h as pretty unacceptable on >> stylistic grounds no matter which position you take. Having successive >> declarations randomly using na

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-09-16 Thread Michael Paquier
On Fri, Sep 16, 2022 at 06:24:07PM +0200, Drouvot, Bertrand wrote: > The CF bot is failing for Windows (all other tests are green) and only for > the new tap test related to the regular expression on the host name (the > ones on database and role are fine). > > The issue is not related to the patc

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 18:37, Tom Lane wrote: > > Simon Riggs writes: > > On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: > >> You cannot > >> do that, at least not without checking that the originating > >> transaction has no snapshots that could see the older row version. > > > I'm saying this

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 21:07, Laurenz Albe wrote: > > On Fri, 2022-09-16 at 10:26 -0400, Tom Lane wrote: > > Simon Riggs writes: > > > A user asked me whether we prune never visible changes, such as > > > BEGIN; > > > INSERT... > > > UPDATE.. (same row) > > > COMMIT; > > > > Didn't we just have

Re: Slow standby snapshot

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 17:08, Michail Nikolaev wrote: > > Hello everyone. > > To find the best frequency for calling KnownAssignedXidsCompress in > Simon's patch, I made a set of benchmarks. It looks like each 8th xid > is a little bit often. > > Setup and method is the same as previous (1). 16-c

Re: ICU for global collation

2022-09-16 Thread Marina Polyakova
On 2022-09-16 10:57, Peter Eisentraut wrote: On 16.09.22 09:31, Marina Polyakova wrote: IMO it is hardly understantable from the program output either - it looks like I manually chose the encoding UTF8. Maybe first inform about selected encoding?.. Yes, I included something like that in the p

introduce optimized linear search functions that return index of matching element

2022-09-16 Thread Nathan Bossart
On Fri, Sep 16, 2022 at 02:54:14PM +0700, John Naylor wrote: > v6 demonstrates why this should have been put off towards the end. (more > below) Since the SIMD code is fresh in my mind, I wanted to offer my review for 0001 in the "Improve dead tuple storage for lazy vacuum" thread [0]. However, I

Re: ICU for global collation

2022-09-16 Thread Peter Eisentraut
On 16.09.22 08:49, Marina Polyakova wrote: But perhaps the check that --icu-locale cannot be specified unless locale provider icu is chosen should also be moved here? So all these checks will be in one place and it will use the provider from the template database (which could be icu): $ initd

RE: why can't a table be part of the same publication as its schema

2022-09-16 Thread houzj.f...@fujitsu.com
On Saturday, September 17, 2022 11:22 AM Amit Kapila wrote: > > On Fri, Sep 16, 2022 at 1:09 PM houzj.f...@fujitsu.com > > wrote: > > > > Attach the new version patch which addressed above comments and ran > pgident. > > I also improved some codes and documents based on some comments given > >

Re: Make mesage at end-of-recovery less scary.

2022-09-16 Thread Justin Pryzby
@cfbot: rebased over adb466150, which did the same thing as one of the hunks in xlogreader.c. >From c4069bb7181b68d742d2025567f859e69d24f513 Mon Sep 17 00:00:00 2001 From: Kyotaro Horiguchi Date: Thu, 7 Jul 2022 11:51:45 +0900 Subject: [PATCH] Make End-Of-Recovery error less scary When recovery i

Re: why can't a table be part of the same publication as its schema

2022-09-16 Thread Amit Kapila
On Fri, Sep 16, 2022 at 1:09 PM houzj.f...@fujitsu.com wrote: > > Attach the new version patch which addressed above comments and ran pgident. > I also improved some codes and documents based on some comments > given by Vignesh and Peter offlist. > Thanks, the patch looks mostly good to me. I hav

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 6:20 PM Tom Lane wrote: > I think they're easily Stroustrup's worst idea ever. You're basically > throwing away an opportunity for documentation, and that documentation > is often sorely needed. He could at least point to C++ pure virtual functions, where omitting a param

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Tom Lane
Peter Geoghegan writes: > The check that I used to write the patches doesn't treat unnamed > parameters in a function declaration as an inconsistency, even when > "strict" is used. Another nearby check *could* be used to catch > unnamed parameters [1] if that was deemed useful, though. How do you

Re: Tree-walker callbacks vs -Wdeprecated-non-prototype

2022-09-16 Thread Tom Lane
I wrote: > Ugh. I wonder if we can get away with declaring the walker arguments > as something like "bool (*walker) (Node *, void *)" without having > to change all the actual walkers to be exactly that signature. > Having to insert casts in the walkers would be a major pain-in-the-butt. No joy o

Re: Make ON_ERROR_STOP stop on shell script failure

2022-09-16 Thread bt22nakamorit
2022-09-16 17:30 に Kyotaro Horiguchi さんは書きました: At Fri, 16 Sep 2022 15:55:33 +0900, bt22nakamorit wrote in Hi, """\set ON_ERROR_STOP on""" stops any subsequent incoming query that comes after an error of an SQL, but does not stop after a shell script ran by """\! """ returning values other than

Re: SLRUs in the main buffer pool, redux

2022-09-16 Thread Bagga, Rishu
Hi Thomas, While I was working on adding the page headers to SLRU pages on your patch, I came across this code where it seems like "MultiXactIdToMemberPage" is mistakenly being used instead of MultiXactIdToOffsetPage in the TrimMultiXact function. Below is the area of concern in the patch: @@

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 4:49 PM Tom Lane wrote: > Agreed; I see no need to tolerate any inconsistency. The check that I used to write the patches doesn't treat unnamed parameters in a function declaration as an inconsistency, even when "strict" is used. Another nearby check *could* be used to cat

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Tom Lane
Peter Geoghegan writes: > It's possible to configure the clang-tidy tooling to tolerate various > inconsistencies, below some kind of threshold -- it is totally > customizable. But I think that a strict, simple rule is the way to go > here. Agreed; I see no need to tolerate any inconsistency. >

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 4:19 PM Tom Lane wrote: > I agree, this has always been a pet peeve of mine as well. I would > have guessed there were fewer examples than you found, because I've > generally fixed any such cases I happened to notice. If you actually go through them all one by one you'll

Re: Making C function declaration parameter names consistent with corresponding definition names

2022-09-16 Thread Tom Lane
Peter Geoghegan writes: > I have to admit that these inconsistencies are a pet peeve of mine. I > find them distracting, and have a history of fixing them on an ad-hoc > basis. But there are real practical arguments in favor of being strict > about it as a matter of policy -- it's not *just* neatn

Re: clang 15 doesn't like our JIT code

2022-09-16 Thread Tom Lane
Thomas Munro writes: > there's also the walker stuff[1] to address. Yeah. I just did some experimentation with that, and it looks like neither gcc nor clang will cut you any slack at all for declaring an argument as "void *": given say typedef bool (*tree_walker_callback) (Node *node, void *con

RFC: Logging plan of the running query

2022-09-16 Thread a.rybakina
Hi, I liked this idea and after reviewing code I noticed some moments and I'd rather ask you some questions. Firstly, I suggest some editing in the comment of commit. I think, it is turned out the more laconic and the same clear. I wrote it below since I can't think of any other way to add

Re: clang 15 doesn't like our JIT code

2022-09-16 Thread Thomas Munro
On Sat, Sep 17, 2022 at 6:45 AM Andres Freund wrote: > On 2022-09-16 11:40:46 -0400, Tom Lane wrote: > > According to > > > > https://bugzilla.redhat.com/show_bug.cgi?id=2127503 > > > > bleeding-edge clang complains thusly: > > > > llvmjit_inline.cpp: In function 'std::unique_ptr > > llvm_load_su

Re: [PoC] Let libpq reject unexpected authentication requests

2022-09-16 Thread Jacob Champion
On Fri, Sep 16, 2022 at 7:56 AM Peter Eisentraut wrote: > On 08.09.22 20:18, Jacob Champion wrote: > After thinking about this a bit more, I think it would be best if the > words used here match exactly with what is used in pg_hba.conf. That's > the only thing the user cares about: reject "passwo

Re: [RFC] building postgres with meson - v13

2022-09-16 Thread Tom Lane
Andres Freund writes: > On 2022-09-16 09:14:20 +1200, Thomas Munro wrote: >> On Thu, Sep 15, 2022 at 2:26 PM Andres Freund wrote: >>> - noticed that libpgport.a had and needed a dependency on errcodes.h - that >>> seemed wrong. The dependency is due to src/port/*p{read,write}v?.c including >>> po

Re: clang 15 doesn't like our JIT code

2022-09-16 Thread Andres Freund
Hi, On 2022-09-16 16:07:51 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-09-16 11:40:46 -0400, Tom Lane wrote: > >> I suspect this is less about clang and more about LLVM APIs, > >> but anyway it seems like we gotta fix something. > > > Yea, there's definitely a bunch of llvm 15 issu

Re: clang 15 doesn't like our JIT code

2022-09-16 Thread Tom Lane
Andres Freund writes: > On 2022-09-16 11:40:46 -0400, Tom Lane wrote: >> I suspect this is less about clang and more about LLVM APIs, >> but anyway it seems like we gotta fix something. > Yea, there's definitely a bunch of llvm 15 issues that need to be fixed - this > particular failure is pretty

Re: Pruning never visible changes

2022-09-16 Thread Laurenz Albe
On Fri, 2022-09-16 at 10:26 -0400, Tom Lane wrote: > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? For reference: that was https://pos

Re: Fix gin index cost estimation

2022-09-16 Thread Tom Lane
Ronan Dunklau writes: > The attached does that and is much simpler. I only took into account > entryPagesFetched, not sure if we should also charge something for data pages. I think this is wrong, because there is already a CPU charge based on the number of tuples visited, down at the very end o

Re: Reducing the WAL overhead of freezing in VACUUM by deduplicating per-tuple freeze plans

2022-09-16 Thread Peter Geoghegan
On Fri, Sep 16, 2022 at 12:30 AM Masahiko Sawada wrote: > After a quick benchmark, I've confirmed that the amount of WAL records > for freezing 1 million tuples reduced to about one-fifth (1.2GB vs > 250MB). Great. I think that the really interesting thing about the patch is how this changes the

Re: [RFC] building postgres with meson - v13

2022-09-16 Thread Andres Freund
Hi, On 2022-09-16 09:14:20 +1200, Thomas Munro wrote: > On Thu, Sep 15, 2022 at 2:26 PM Andres Freund wrote: > > - noticed that libpgport.a had and needed a dependency on errcodes.h - that > > seemed wrong. The dependency is due to src/port/*p{read,write}v?.c > > including > > postgres.h - w

Re: clang 15 doesn't like our JIT code

2022-09-16 Thread Andres Freund
Hi, On 2022-09-16 11:40:46 -0400, Tom Lane wrote: > According to > > https://bugzilla.redhat.com/show_bug.cgi?id=2127503 > > bleeding-edge clang complains thusly: > > llvmjit_inline.cpp: In function 'std::unique_ptr > llvm_load_summary(llvm::StringRef)': > llvmjit_inline.cpp:771:37: error: in

Re:pg_stat_statements and "IN" conditions

2022-09-16 Thread Sergei Kornilov
Hello! Unfortunately the patch needs another rebase due to the recent split of guc.c (0a20ff54f5e66158930d5328f89f087d4e9ab400) I'm reviewing a patch on top of a previous commit and noticed a failed test: # Failed test 'no parameters missing from postgresql.conf.sample' # at t/003_check_guc

Re: Pruning never visible changes

2022-09-16 Thread Tom Lane
Simon Riggs writes: > On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: >> You cannot >> do that, at least not without checking that the originating >> transaction has no snapshots that could see the older row version. > I'm saying this is possible only AFTER the end of the originating > xact, so t

Re: Pruning never visible changes

2022-09-16 Thread Simon Riggs
On Fri, 16 Sept 2022 at 15:26, Tom Lane wrote: > > Simon Riggs writes: > > A user asked me whether we prune never visible changes, such as > > BEGIN; > > INSERT... > > UPDATE.. (same row) > > COMMIT; > > Didn't we just have this discussion in another thread? Not that I was aware of, but it sound

Re: Patch proposal: make use of regular expressions for the username in pg_hba.conf

2022-09-16 Thread Drouvot, Bertrand
Hi, On 9/12/22 9:55 AM, Drouvot, Bertrand wrote: Hi, On 9/10/22 1:21 AM, Jacob Champion wrote: On 8/19/22 01:12, Drouvot, Bertrand wrote: + wstr = palloc((strlen(tok->string + 1) + 1) * sizeof(pg_wchar)); + wlen = pg_mb2wchar_with_len(tok->string + 1, +

Re: postgres_fdw hint messages

2022-09-16 Thread Nathan Bossart
On Fri, Sep 16, 2022 at 03:54:53PM +0200, Peter Eisentraut wrote: > I don't think we need a verb there at all. I committed it without a verb. Thanks! -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: Query Jumbling for CALL and SET utility statements

2022-09-16 Thread Drouvot, Bertrand
Hi, On 9/16/22 2:53 PM, Fujii Masao wrote: Attached v5 to normalize 2PC commands too, so that we get things like: +    case T_VariableSetStmt: +    { +    VariableSetStmt *stmt = (VariableSetStmt *) node; + +    /* stmt->name is NULL for RESET ALL */ +  

clang 15 doesn't like our JIT code

2022-09-16 Thread Tom Lane
According to https://bugzilla.redhat.com/show_bug.cgi?id=2127503 bleeding-edge clang complains thusly: llvmjit_inline.cpp: In function 'std::unique_ptr llvm_load_summary(llvm::StringRef)': llvmjit_inline.cpp:771:37: error: incomplete type 'llvm::MemoryBuffer' used in nested name specifier 77

Re: Query Jumbling for CALL and SET utility statements

2022-09-16 Thread Imseih (AWS), Sami
>The utility commands for cursor like DECLARE CURSOR seem to have the same > issue >and can cause lots of pgss entries. For example, when we use postgres_fdw > and >execute "SELECT * FROM WHERE id = 10" five times in the > same >transaction, the following commands are executed i

Re: [PoC] Let libpq reject unexpected authentication requests

2022-09-16 Thread Peter Eisentraut
On 08.09.22 20:18, Jacob Champion wrote: Sounds fair. "cleartext"? "plaintext"? "plain" (like SASL's PLAIN)? On the SASL front: In the back of my head I'd been considering adding a "sasl:" prefix to "scram-sha-256", so that we have a namespace for new SASL methods. That would also give us a ju

Re: Pruning never visible changes

2022-09-16 Thread Tom Lane
Simon Riggs writes: > A user asked me whether we prune never visible changes, such as > BEGIN; > INSERT... > UPDATE.. (same row) > COMMIT; Didn't we just have this discussion in another thread? You cannot do that, at least not without checking that the originating transaction has no snapshots th

Re: Add 64-bit XIDs into PostgreSQL 15

2022-09-16 Thread Maxim Orlov
I have to say, to my embarrassment, after sending the previous email, I've notice minor imperfections in a patch set caused by the last rebase. These imperfections led to cf bot fail. I'll address this issue in the next iteration in order not to generate excessive flow. -- Best regards, Maxim Or

Re: postgres_fdw hint messages

2022-09-16 Thread Peter Eisentraut
On 13.09.22 21:02, Nathan Bossart wrote: On Tue, Sep 13, 2022 at 08:32:43AM +0200, Peter Eisentraut wrote: I notice that for column misspellings, the hint is phrased "Perhaps you meant X." whereas here we have "Did you mean X?". Let's make that uniform. Good point. I attached a new version o

RE: Allow logical replication to copy tables in binary format

2022-09-16 Thread osumi.takami...@fujitsu.com
On Tuesday, August 16, 2022 2:04 AM Melih Mutlu wrote: > Attached patch also includes some additions to the doc along with the tests. Hi, thank you for updating the patch. Minor review comments for the v2. (1) whitespace issues Please fix below whitespace errors. $ git apply v2-0001-Allow-log

PostgreSQL 15 RC1 + GA dates

2022-09-16 Thread Jonathan S. Katz
Hi, The release team is planning to release PostgreSQL 15 Release Candidate 1 (RC1) on 2022-09-29. Please ensure all open items[1] are resolved no later than 2022-09-24 0:00 AoE. Following recent release patterns, we planning for 2022-10-06 to be the GA date. This may change based on what re

Re: Error for WITH options on partitioned tables

2022-09-16 Thread Japin Li
I wrote: > On Fri, 16 Sep 2022 at 20:13, Simon Riggs > wrote: >> Patch 002 replaces this with a more meaningful error message, which >> matches our fine manual. >> https://www.postgresql.org/docs/current/sql-createtable.html >> >> ERROR: cannot specify storage options for a partitioned table

Re: Query Jumbling for CALL and SET utility statements

2022-09-16 Thread Fujii Masao
On 2022/09/09 19:11, Drouvot, Bertrand wrote: IME if your application relies on 2PC it's very likely that you will hit the exact same problems described in your original email. The utility commands for cursor like DECLARE CURSOR seem to have the same issue and can cause lots of pgss entries.

Re: Error for WITH options on partitioned tables

2022-09-16 Thread Japin Li
On Fri, 16 Sep 2022 at 20:13, Simon Riggs wrote: > Someone on general list recently complained that the error message > from trying to use options on a partitioned table was misleading, > which it definitely is: > > CREATE TABLE parted_col_comment (a int, b text) PARTITION BY LIST (a) > WITH (fi

Pruning never visible changes

2022-09-16 Thread Simon Riggs
A user asked me whether we prune never visible changes, such as BEGIN; INSERT... UPDATE.. (same row) COMMIT; Once committed, the original insert is no longer visible to anyone, so "ought to be able to be pruned", sayeth the user. And they also say that changing the app is much harder, as ever. A

Re: SUBTRANS: Minimizing calls to SubTransSetParent()

2022-09-16 Thread Simon Riggs
On Thu, 15 Sept 2022 at 12:36, Japin Li wrote: > > > On Thu, 15 Sep 2022 at 18:04, Simon Riggs > wrote: > > On Wed, 14 Sept 2022 at 15:21, Alvaro Herrera > > wrote: > >> > >> On 2022-Aug-30, Simon Riggs wrote: > >> > >> > 001_new_isolation_tests_for_subxids.v3.patch > >> > Adds new test cases

Error for WITH options on partitioned tables

2022-09-16 Thread Simon Riggs
Someone on general list recently complained that the error message from trying to use options on a partitioned table was misleading, which it definitely is: CREATE TABLE parted_col_comment (a int, b text) PARTITION BY LIST (a) WITH (fillfactor=100); ERROR: unrecognized parameter "fillfactor" Whi

Re: Switching XLog source from archive to streaming when primary available

2022-09-16 Thread Bharath Rupireddy
On Fri, Sep 16, 2022 at 12:06 PM Kyotaro Horiguchi wrote: > > In other words, it seems to me that the macro name doesn't manifest > the condition correctly. > > I don't think we don't particularly want to do that unconditionally. > I wanted just to get rid of the macro from the usage site. Even i

About displaying NestLoopParam

2022-09-16 Thread Richard Guo
I have a question about displaying NestLoopParam. In the plan below, # explain (costs off) select * from a, lateral (select sum(i) as i from b where exists (select sum(c.i) from c where c.j = a.j and c.i = b.i) ) ss where a.i = ss.i; QUERY PLAN

Re: A question about wording in messages

2022-09-16 Thread Amit Kapila
On Fri, Sep 16, 2022 at 2:07 PM Kyotaro Horiguchi wrote: > > At Fri, 16 Sep 2022 12:29:52 +0530, Amit Kapila > wrote in > > So, the change related to wal_decode_buffer_size needs to be > > backpatched to 15 whereas other message changes will be HEAD only, am > > I correct? > > Has 15 closed the

Re: A question about wording in messages

2022-09-16 Thread Kyotaro Horiguchi
At Fri, 16 Sep 2022 12:29:52 +0530, Amit Kapila wrote in > So, the change related to wal_decode_buffer_size needs to be > backpatched to 15 whereas other message changes will be HEAD only, am > I correct? Has 15 closed the entry? IMHO I supposed that all changes are applied back(?) to 15. reg

Re: Make ON_ERROR_STOP stop on shell script failure

2022-09-16 Thread Kyotaro Horiguchi
At Fri, 16 Sep 2022 15:55:33 +0900, bt22nakamorit wrote in > Hi, > > """\set ON_ERROR_STOP on""" stops any subsequent incoming query that > comes after an error of an SQL, but does not stop after a shell script > ran by """\! """ returning values other than 0, -1, or > 127, which suggests a fai

Re: ICU for global collation

2022-09-16 Thread Kyotaro Horiguchi
At Fri, 16 Sep 2022 09:56:31 +0200, Peter Eisentraut wrote in > On 15.09.22 17:41, Marina Polyakova wrote: > > I agree with you. Here's another version of the patch. The > > locale/encoding checks and reports in initdb have been reordered, > > because now the encoding is set first and only then

Re: ICU for global collation

2022-09-16 Thread Kyotaro Horiguchi
At Fri, 16 Sep 2022 09:49:28 +0300, Marina Polyakova wrote in > On 2022-09-15 09:52, Kyotaro Horiguchi wrote: > > However, when I reran the command, it complains about incompatible > > encoding this time. I think it's more user-friendly to check for the > > encoding compatibility before the che

Re: ICU for global collation

2022-09-16 Thread Peter Eisentraut
On 16.09.22 09:31, Marina Polyakova wrote: IMO it is hardly understantable from the program output either - it looks like I manually chose the encoding UTF8. Maybe first inform about selected encoding?.. Yes, I included something like that in the patch just committed. diff --git a/src/bin/in

Re: ICU for global collation

2022-09-16 Thread Peter Eisentraut
On 15.09.22 17:41, Marina Polyakova wrote: I agree with you. Here's another version of the patch. The locale/encoding checks and reports in initdb have been reordered, because now the encoding is set first and only then the ICU locale is checked. I committed something based on the first versi

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

2022-09-16 Thread John Naylor
On Fri, Sep 16, 2022 at 1:01 PM Masahiko Sawada wrote: > > On Mon, Aug 15, 2022 at 10:39 PM John Naylor > wrote: > > > > bool, buth = and <=. Should be pretty close. Also, i believe if you > > left this for last as a possible refactoring, it might save some work. v6 demonstrates why this should

RE: why can't a table be part of the same publication as its schema

2022-09-16 Thread houzj.f...@fujitsu.com
On Friday, September 16, 2022 1:42 PM Amit Kapila wrote: > > On Thu, Sep 15, 2022 at 6:27 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new version patch which added suggested restriction for > > column list and merged Vignesh's patch. > > > > Few comments: > > 1. > stati

Re: ICU for global collation

2022-09-16 Thread Marina Polyakova
On 2022-09-16 07:55, Kyotaro Horiguchi wrote: At Thu, 15 Sep 2022 18:41:31 +0300, Marina Polyakova wrote in P.S. While working on the patch, I discovered that UTF8 encoding is always used for the ICU provider in initdb unless it is explicitly specified by the user: if (!encoding && locale_prov

Re: Reducing the WAL overhead of freezing in VACUUM by deduplicating per-tuple freeze plans

2022-09-16 Thread Masahiko Sawada
On Tue, Sep 13, 2022 at 6:02 AM Peter Geoghegan wrote: > > My ongoing project to make VACUUM more predictable over time by > proactive freezing [1] will increase the overall number of tuples > frozen by VACUUM significantly (at least in larger tables). It's > important that we avoid any new user-v

Re: missing PG_FREE_IF_COPY in textlike() and textnlike() ?

2022-09-16 Thread CK Tan
Got it. It is a leak-by-design for efficiency. Thanks, -cktan On Fri, Sep 16, 2022 at 12:03 AM Tom Lane wrote: > > CK Tan writes: > > I see in the texteq() function calls to DatumGetTextPP() are followed > > by conditional calls to PG_FREE_IF_COPY. e.g. > > That's because texteq() is potentiall

Re: Remove dead macro exec_subplan_get_plan

2022-09-16 Thread Zhang Mingli
On Sep 16, 2022, 14:47 +0800, Richard Guo , wrote: > > On Tue, Sep 6, 2022 at 12:39 AM Zhang Mingli wrote: > > Macro exec_subplan_get_plan is not used anymore. > > Attach a patch to remove it. > > How about add it to the CF to not lose track of it? Will add it, thanks~ Regards, Zhang Mingli

Re: missing PG_FREE_IF_COPY in textlike() and textnlike() ?

2022-09-16 Thread Tom Lane
CK Tan writes: > I see in the texteq() function calls to DatumGetTextPP() are followed > by conditional calls to PG_FREE_IF_COPY. e.g. That's because texteq() is potentially usable as a btree index function, and btree isn't too forgiving about leaks. > However, in textlike(), PG_FREE_IF_COPY cal

Re: A question about wording in messages

2022-09-16 Thread Amit Kapila
On Fri, Sep 16, 2022 at 11:46 AM Kyotaro Horiguchi wrote: > > At Fri, 16 Sep 2022 12:10:05 +1200, Thomas Munro > wrote in > > On Wed, Sep 14, 2022 at 2:38 PM Tom Lane wrote: > > > Kyotaro Horiguchi writes: > > > > I saw the following message recently modified. > > > >> This controls the maximu