Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing

2023-05-02 Thread samay sharma
Hi, On Mon, Apr 24, 2023 at 2:58 PM Peter Geoghegan wrote: > My work on page-level freezing for PostgreSQL 16 has some remaining > loose ends to tie up with the documentation. The "Routine Vacuuming" > section of the docs has no mention of page-level freezing. It also > doesn't mention the FPI o

Re: Large files for relations

2023-05-02 Thread Thomas Munro
On Wed, May 3, 2023 at 5:21 PM Thomas Munro wrote: > rsync --link-dest I wonder if rsync will grow a mode that can use copy_file_range() to share blocks with a reference file (= previous backup). Something like --copy-range-dest. That'd work for large-file relations (assuming a file system that

Re: Large files for relations

2023-05-02 Thread Thomas Munro
On Tue, May 2, 2023 at 3:28 PM Pavel Stehule wrote: > I like this patch - it can save some system sources - I am not sure how much, > because bigger tables usually use partitioning usually. Yeah, if you only use partitions of < 1GB it won't make a difference. Larger partitions are not uncommon,

Re: COPY TO STDOUT Apache Arrow support

2023-05-02 Thread Pavel Stehule
Hi st 3. 5. 2023 v 5:15 odesílatel Adam Lippai napsal: > Hi, > > There is also a new Arrow C library (one .h and one .c file) which makes > it easier to use it from the postgresql codebase. > > https://arrow.apache.org/blog/2023/03/07/nanoarrow-0.1.0-release/ > https://github.com/apache/arrow-na

Re: COPY TO STDOUT Apache Arrow support

2023-05-02 Thread Adam Lippai
Hi, There is also a new Arrow C library (one .h and one .c file) which makes it easier to use it from the postgresql codebase. https://arrow.apache.org/blog/2023/03/07/nanoarrow-0.1.0-release/ https://github.com/apache/arrow-nanoarrow/tree/main/dist Best regards, Adam Lippai On Thu, Apr 13, 202

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-05-02 Thread Peter Geoghegan
On Tue, May 2, 2023 at 6:46 PM John Naylor wrote: > It might least be good for readability to gloss over the warning and only > quote the MXID limit error message, but we'll have to see how it looks. Apparently you expect me to join you in pretending that you didn't lambast my review on this thr

Re: Rename 'lpp' to 'lp' in heapam.c

2023-05-02 Thread David Rowley
On Wed, 3 May 2023 at 12:16, Yaphters W wrote: > I just found the naming of the ItemId variables is not consistent in > heapam.c. There are 13 'lpp's and 112 'lp's. Technically 'lpp' is correct as > ItemId is a line pointer's pointer and there used to be code like "++lpp" for > line pointer arr

Re: [PATCH] Clarify the behavior of the system when approaching XID wraparound

2023-05-02 Thread John Naylor
On Tue, May 2, 2023 at 9:55 AM Peter Geoghegan wrote: > > On Mon, May 1, 2023 at 5:34 AM John Naylor wrote: > > 0003 is now a quick-and-dirty attempt at that, only in the docs. The MXID part is mostly copy-pasted from the XID part, just to get something together. I'd like to abbreviate that some

Rename 'lpp' to 'lp' in heapam.c

2023-05-02 Thread Yaphters W
Hi, I just found the naming of the ItemId variables is not consistent in heapam.c. There are 13 'lpp's and 112 'lp's. Technically 'lpp' is correct as ItemId is a line pointer's pointer and there used to be code like "++lpp" for line pointer array iteration. Now that all the "++lpp" code has been r

Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing

2023-05-02 Thread Peter Geoghegan
On Tue, May 2, 2023 at 1:29 PM Robert Haas wrote: > I told you that I did not agree with your dislike for the term > wraparound and I explained why. You sent a couple more emails telling > me that I was wrong and, frankly, saying a lot of things that seem > only tangentially related to the point t

Re: Overhauling "Routine Vacuuming" docs, particularly its handling of freezing

2023-05-02 Thread Robert Haas
On Mon, May 1, 2023 at 11:21 PM Peter Geoghegan wrote: > I can't imagine why you feel it necessary to communicate with me like > this. This is just vitriol, lacking any substance. John's email is pretty harsh, but I can understand why he's frustrated. I told you that I did not agree with your di

Re: "variable not found in subplan target list"

2023-05-02 Thread Alvaro Herrera
Hi Amit, On 2023-Mar-30, Alvaro Herrera wrote: > On 2023-Mar-29, Amit Langote wrote: > > Though, I wonder if we need to keep ec386948948 that introduced the > > notion of part_prune_index around if the project that needed it [1] > > has moved on to an entirely different approach altogether, one

code cleanup for CREATE STATISTICS

2023-05-02 Thread Robert Haas
Hi, There is at present a comment at the top of transformStatsStmt which says "To avoid race conditions, it's important that this function relies only on the passed-in relid (and not on stmt->relation) to determine the target relation." However, doing what the comment says we need to do doesn't ac

Cleaning up array_in()

2023-05-02 Thread Tom Lane
This is in response to Alexander's observation at [1], but I'm starting a fresh thread to keep this patch separate from the plperl fixes in the cfbot's eyes. Alexander Lakhin writes: > I continue watching the array handling bugs dancing Sirtaki too. Now it's > another asymmetry: > select '{{1},{{

Re: ICU locale validation / canonicalization

2023-05-02 Thread Noah Misch
On Thu, Mar 30, 2023 at 08:59:41AM +0200, Peter Eisentraut wrote: > On 30.03.23 04:33, Jeff Davis wrote: > >Attached is a new version of the final patch, which performs > >canonicalization. I'm not 100% sure that it's wanted, but it still > >seems like a good idea to get the locales into a standard

Re: Add PQsendSyncMessage() to libpq

2023-05-02 Thread Robert Haas
On Mon, May 1, 2023 at 8:42 PM Michael Paquier wrote: > Another thing that may matter in terms of extensibility? Would a > boolean argument really be the best design? Could it be better to > have instead one API with a bits32 and some flags controlling its > internals? I wondered that, too. If

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-02 Thread Dagfinn Ilmari Mannsåker
Dagfinn Ilmari Mannsåker writes: > Michael Paquier writes: > >> On Sat, Apr 15, 2023 at 11:06:25AM +0900, Michael Paquier wrote: >>> Thanks, I'll look at it. >> >> + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION", MatchAny) || >> +Matches("CREATE", "SCHEMA", MatchAny, "AUTHOR

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-02 Thread Julien Rouhaud
On Tue, 2 May 2023, 19:43 Julien Rouhaud, wrote: > Hi, > > On Tue, May 02, 2023 at 12:55:18PM +0200, Alvaro Herrera wrote: > > On 2023-Apr-07, Julien Rouhaud wrote: > > > > > That being said, I have a hard time believing that we could actually > preserve > > > physical replication slots. I don't

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-02 Thread Julien Rouhaud
Hi, On Tue, May 02, 2023 at 12:55:18PM +0200, Alvaro Herrera wrote: > On 2023-Apr-07, Julien Rouhaud wrote: > > > That being said, I have a hard time believing that we could actually > > preserve > > physical replication slots. I don't think that pg_upgrade final state is > > fully > > reproduc

Re: Add two missing tests in 035_standby_logical_decoding.pl

2023-05-02 Thread Drouvot, Bertrand
Hi, On 5/2/23 8:28 AM, Amit Kapila wrote: On Fri, Apr 28, 2023 at 2:24 PM Drouvot, Bertrand wrote: I can see V7 failing on "Cirrus CI / macOS - Ventura - Meson" only (other machines are not complaining). It does fail on "invalidated logical slots do not lead to retaining WAL", see https://

Re: Logging parallel worker draught

2023-05-02 Thread Amit Kapila
On Mon, May 1, 2023 at 10:03 PM Robert Haas wrote: > > On Sat, Apr 22, 2023 at 7:06 AM Amit Kapila wrote: > > I don't think introducing a GUC for this is a good idea. We can > > directly output this message in the server log either at LOG or DEBUG1 > > level. > > Why not? It seems like something

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-05-02 Thread Alvaro Herrera
On 2023-Apr-07, Julien Rouhaud wrote: > That being said, I have a hard time believing that we could actually preserve > physical replication slots. I don't think that pg_upgrade final state is > fully > reproducible: not all object oids are preserved, and the various pg_restore > are run in par

Re: Tab completion for CREATE SCHEMAAUTHORIZATION

2023-05-02 Thread Dagfinn Ilmari Mannsåker
Michael Paquier writes: > On Sat, Apr 15, 2023 at 11:06:25AM +0900, Michael Paquier wrote: >> Thanks, I'll look at it. > > + else if (Matches("CREATE", "SCHEMA", "AUTHORIZATION", MatchAny) || > +Matches("CREATE", "SCHEMA", MatchAny, "AUTHORIZATION", MatchAny)) > + COMPLETE_WIT

Re: Logging parallel worker draught

2023-05-02 Thread Benoit Lobréau
On 5/1/23 18:33, Robert Haas wrote: > Why not? It seems like something some people might want to log and > others not. Running the whole server at DEBUG1 to get this information > doesn't seem like a suitable answer. Since the statement is also logged, it could spam the log with huge queries, wh

Re: min/max aggregation for jsonb

2023-05-02 Thread Peter Eisentraut
On 03.03.23 11:41, David Rowley wrote: On Fri, 3 Mar 2023 at 23:17, Daneel Yaitskov wrote: I wanted to use min/max aggregation functions for jsonb type and noticed there is no functions for this type, meanwhile string/array types are supported. It's not really clear to me how you'd want these

Re: [PATCH] Add native windows on arm64 support

2023-05-02 Thread Niyas Sait
On 19/01/2023 10:09, Niyas Sait wrote: On 17/01/2023 22:51, Andres Freund wrote:   int main(void) @@ -1960,18 +1966,19 @@ int main(void)   }   ''' -  if cc.links(prog, name: '__crc32cb, __crc32ch, __crc32cw, and __crc32cd without -march=armv8-a+crc', -  args: test_c_args) -    # Use AR

Re: buffer refcount leak in foreign batch insert code

2023-05-02 Thread Alexander Pyhalov
Michael Paquier писал 2023-04-25 04:30: On Mon, Apr 24, 2023 at 09:57:10AM +0900, Michael Paquier wrote: The attached is what I am finishing with, with a minimal regression test added to postgres_fdw. Two partitions are enough. Well, I have gone through that again this morning, and applied th