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

2024-01-25 Thread Sutou Kouhei
Hi, Thanks for trying these patches! In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 25 Jan 2024 10:53:58 +0800, jian he wrote: > COPY data TO '/dev/null' WITH (FORMAT csv) \watch count=5 Wow! I didn't know the "\watch count="! I'll use it. > Time: 6

Re: UUID v7

2024-01-25 Thread Sergey Prokhorenko
I am against turning the DBMS into another C++, in which they do not so much design something new as fix bugs in production after a crash. As for partitioning, I already wrote to Andrey Borodin that we need a special function to generate a partition id using the UUIDv7 timestamp or even simultan

Re: Use of backup_label not noted in log

2024-01-25 Thread Michael Paquier
On Mon, Jan 22, 2024 at 04:36:27PM +0900, Michael Paquier wrote: > + if (ControlFile->backupStartPoint != InvalidXLogRecPtr) > > Nit 1: I would use XLogRecPtrIsInvalid here. > > + ereport(LOG, > + (errmsg("completed backup recovery with redo LSN %X/%X", > +

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Amit Langote
On Thu, Jan 25, 2024 at 4:47 PM Richard Guo wrote: > On Thu, Jan 25, 2024 at 2:28 PM Amit Langote wrote: >> >> On Thu, Jan 25, 2024 at 2:59 PM Richard Guo wrote: >> > I came across a warning when building master (a044e61f1b) on old GCC >> > (4.8.5). >> > >> > jsonfuncs.c: In function ‘jsonb_popu

Re: Split index and table statistics into different types of stats

2024-01-25 Thread Bertrand Drouvot
Hi, On Tue, Nov 14, 2023 at 09:04:03AM +0100, Drouvot, Bertrand wrote: > On 11/13/23 9:44 PM, Andres Freund wrote: > > Hi, > > > > It's not nice from a layering POV that we need this level of awareness in > > bufmgr.c. I wonder if this is an argument for first splitting out stats > > like > > b

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

2024-01-25 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 25 Jan 2024 12:17:55 +0900, Michael Paquier wrote: > +typedef bool (*CopyToProcessOption_function) (CopyToState cstate, DefElem > *defel); > +typedef int16 (*CopyToGetFormat_function) (CopyToState cst

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

2024-01-25 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Thu, 25 Jan 2024 13:36:03 +0900, Masahiko Sawada wrote: > I've experimented with a similar optimization for csv > and text format; have different callbacks for text and csv format and > remo

RE: speed up a logical replica setup

2024-01-25 Thread Hayato Kuroda (Fujitsu)
Dear hackers, Here are comments for v8 patch set. I may revise them by myself, but I want to post here to share all of them. 01. ``` /* Options */ static char *pub_conninfo_str = NULL; static SimpleStringList database_names = {NULL, NULL}; static int wait_seconds = DEFAULT_WAIT; static bool

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

2024-01-25 Thread Bharath Rupireddy
On Tue, Jan 23, 2024 at 9:37 AM Jeff Davis wrote: > > On Mon, 2024-01-22 at 12:12 -0800, Andres Freund wrote: > > I still think that anything that requires such checks shouldn't be > > merged. It's completely bogus to check page contents for validity > > when we > > should have metadata telling us

Re: remaining sql/json patches

2024-01-25 Thread jian he
On 9.16.4. JSON_TABLE ` name type FORMAT JSON [ENCODING UTF8] [ PATH json_path_specification ] Inserts a composite SQL/JSON item into the output row ` i am not sure "Inserts a composite SQL/JSON item into the output row" I think it means, for any type's typecategory is TYPCATEGORY_STRING, if FORMAT

Fix inappropriate comments in function ReplicationSlotAcquire

2024-01-25 Thread Wei Wang (Fujitsu)
Hi, In the function ReplicationSlotAcquire(), I found there is a missing in the below comments: ``` /* * Search for the slot with the specified name if the slot to acquire is * not given. If the slot is not found, we either return -1 or error out. */ s

Re: speed up a logical replica setup

2024-01-25 Thread Peter Eisentraut
On 24.01.24 00:44, Euler Taveira wrote: Subscriber has a different meaning of subscription. Subscription is an SQL object. Subscriber is the server (node in replication terminology) where the subscription resides. Having said that pg_createsubscriber doesn't seem a bad name because you are creat

Re: Fix inappropriate comments in function ReplicationSlotAcquire

2024-01-25 Thread Amit Kapila
On Thu, Jan 25, 2024 at 2:57 PM Wei Wang (Fujitsu) wrote: > > In the function ReplicationSlotAcquire(), I found there is a missing in the > below comments: > > ``` > /* > * Search for the slot with the specified name if the slot to acquire > is > * not given. If the slot

Re: Documentation to upgrade logical replication cluster

2024-01-25 Thread vignesh C
On Wed, 24 Jan 2024 at 15:16, Hayato Kuroda (Fujitsu) wrote: > > Dear Vignesh, > > Thanks for updating the patch! Basically your patch looks good. > Below lines are my comments for v3. > > 01. > > ``` > > The output plugins referenced by the slots on the old cluster must be > ins

Re: Documentation to upgrade logical replication cluster

2024-01-25 Thread vignesh C
On Thu, 25 Jan 2024 at 05:45, Peter Smith wrote: > > Here are some review comments for patch v3. > > == > doc/src/sgml/ref/pgupgrade.sgml > > 1. > + > + > + This page does not cover steps to upgrade logical replication > clusters, refer > +for details on upgrading > + logical replica

Re: Popcount optimization using AVX512

2024-01-25 Thread Alvaro Herrera
On 2024-Jan-25, Shankaran, Akash wrote: > With the updated patch, we observed significant improvements and > handily beat the previous popcount algorithm performance. No > regressions in any scenario are observed: > Platform: Intel Xeon Platinum 8360Y (Icelake) for data sizes 1kb - 64kb. > Microbe

RE: speed up a logical replica setup

2024-01-25 Thread Hayato Kuroda (Fujitsu)
Dear Peter, Thanks for giving your idea! > > Subscriber has a different meaning of subscription. Subscription is an SQL > > object. Subscriber is the server (node in replication terminology) where the > > subscription resides. Having said that pg_createsubscriber doesn't seem > > a bad > > name b

Re: Synchronizing slots from primary to standby

2024-01-25 Thread Amit Kapila
On Thu, Jan 25, 2024 at 1:25 PM Bertrand Drouvot wrote: > > On Thu, Jan 25, 2024 at 02:57:30AM +, Zhijie Hou (Fujitsu) wrote: > > > > Agreed. I split the original 0001 patch into 3 patches as suggested. > > Here is the V68 patch set. Thanks, I have pushed 0001. > > Thanks! > > Some comments.

RE: Fix inappropriate comments in function ReplicationSlotAcquire

2024-01-25 Thread Wei Wang (Fujitsu)
On Thu, Jan 25, 2024 at 18:39 Amit Kapila wrote: > Thanks for your review. > On Thu, Jan 25, 2024 at 2:57 PM Wei Wang (Fujitsu) > wrote: > > > > In the function ReplicationSlotAcquire(), I found there is a missing in the > > below comments: > > > > ``` > > /* > > * Search for t

Re: index prefetching

2024-01-25 Thread Dilip Kumar
On Wed, Jan 24, 2024 at 11:43 PM Tomas Vondra wrote: > On 1/22/24 07:35, Konstantin Knizhnik wrote: > > > > On 22/01/2024 1:47 am, Tomas Vondra wrote: > >> h, right. Well, you're right in this case we perhaps could set just one > >> of those flags, but the "purpose" of the two places is quite dif

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-25 Thread Bharath Rupireddy
On Tue, Jan 16, 2024 at 12:13 PM Hayato Kuroda (Fujitsu) wrote: > > Dear Amit, Bharath, > > > This is a more strict check because it is possible that even if the > > latest confirmed_flush location is not persisted there is no > > meaningful decodable WAL between whatever the last confirmed_flush

Re: UUID v7

2024-01-25 Thread Przemysław Sztoch
Andrey M. Borodin wrote on 25.01.2024 07:51: On 25 Jan 2024, at 09:40, Nikolay Samokhvalov wrote: From a practical point of view, these two things are extremely important to have to support partitioning. It is better to implement limitations than throw them away. Postgres always was a bit

Re: Fix inappropriate comments in function ReplicationSlotAcquire

2024-01-25 Thread Amit Kapila
On Thu, Jan 25, 2024 at 4:01 PM Wei Wang (Fujitsu) wrote: > > > Yes, agree. I think these two parts have become slightly outdated after the > commit 1632ea4. So also tried to fix the first part of the comment. > Attach the new patch. > How about changing it to something simple like: diff --git a/

Re: A failure in t/038_save_logical_slots_shutdown.pl

2024-01-25 Thread Amit Kapila
On Thu, Jan 25, 2024 at 4:27 PM Bharath Rupireddy wrote: > > Thanks. I'll wait a while and then add it to CF to not lose it in the wild. > Feel free to add it to CF. However, I do plan to look at it in the next few days. -- With Regards, Amit Kapila.

Re: cataloguing NOT NULL constraints

2024-01-25 Thread Andrew Bille
Hi Alvaro, 25.08.2023 14:38, Alvaro Herrera wrote: > I have now pushed this again. Hopefully it'll stick this time. Starting from b0e96f31, pg_upgrade fails with inherited NOT NULL constraint: For example upgrade from 9c13b6814a (or REL_12_STABLE .. REL_16_STABLE) to b0e96f31 (or master) with foll

Re: Synchronizing slots from primary to standby

2024-01-25 Thread shveta malik
On Thu, Jan 25, 2024 at 10:39 AM Peter Smith wrote: > 2. synchronize_one_slot > > + /* > + * Sanity check: Make sure that concerned WAL is received and flushed > + * before syncing slot to target lsn received from the primary server. > + * > + * This check should never pass as on the primary serv

Re: Current Connection Information

2024-01-25 Thread Aleksander Alekseev
Hi, > It would be viable and appropriate to implement a unified function that > provides important information about the current connection? > > Just an example: "Current Connection Informations". > > I implemented it in PL/pgSQL to demonstrate the idea, see on GitHub: > https://github.com/maique

Re: Synchronizing slots from primary to standby

2024-01-25 Thread Bertrand Drouvot
Hi, On Thu, Jan 25, 2024 at 03:54:45PM +0530, Amit Kapila wrote: > On Thu, Jan 25, 2024 at 1:25 PM Bertrand Drouvot > wrote: > > > > On Thu, Jan 25, 2024 at 02:57:30AM +, Zhijie Hou (Fujitsu) wrote: > > > > > > Agreed. I split the original 0001 patch into 3 patches as suggested. > > > Here is

Re: remaining sql/json patches

2024-01-25 Thread Amit Langote
On Thu, Jan 25, 2024 at 6:09 PM Amit Langote wrote: > On Wed, Jan 24, 2024 at 10:11 PM Amit Langote wrote: > > I still need to take a look at your other report regarding typmod but > > I'm out of energy today. > > The attached updated patch should address one of the concerns -- > JSON_QUERY() sho

Re: UUID v7

2024-01-25 Thread Aleksander Alekseev
Hi, > Postgres always was a bit hackerish, allowing slightly more then is safe. > I.e. you can define immutable function that is not really immutable, turn off > autovacuum or fsync. Why bother with safety guards here? > My opinion is that we should have this function to extract timestamp. Even

Re: Add bump memory context type and use it for tuplesorts

2024-01-25 Thread Matthias van de Meent
On Mon, 6 Nov 2023 at 19:54, Matthias van de Meent wrote: > > On Tue, 11 Jul 2023 at 01:51, David Rowley wrote: >> >> On Tue, 27 Jun 2023 at 21:19, David Rowley wrote: >>> I've attached the bump allocator patch and also the script I used to >>> gather the performance results in the first 2 tabs

Re: UUID v7

2024-01-25 Thread Aleksander Alekseev
Hi, > Andrey, many thanks for the updated patch. > > LGTM, cfbot is happy and I don't think we have any open items left. So > changing CF entry status back to RfC. PFA v14. I changed: ``` elog(ERROR, "Time argument of UUID v7 cannot exceed 6 bytes"); ``` ... to: ``` ereport(ERROR, (errcode

Re: Use of backup_label not noted in log

2024-01-25 Thread David Steele
On 1/25/24 04:12, Michael Paquier wrote: On Mon, Jan 22, 2024 at 04:36:27PM +0900, Michael Paquier wrote: + if (ControlFile->backupStartPoint != InvalidXLogRecPtr) Nit 1: I would use XLogRecPtrIsInvalid here. + ereport(LOG, + (errmsg("completed backup recovery with re

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-25 Thread Aleksander Alekseev
Hi, > > Here is the corrected patch. > > Thank you for updating the patch! I have some comments: Thanks for the review. > -tuple = (ReorderBufferTupleBuf *) > +tuple = (HeapTuple) > MemoryContextAlloc(rb->tup_context, > - > sizeof(ReorderBufferTupleBuf) + > +

Re: Use of backup_label not noted in log

2024-01-25 Thread Michael Banck
Hi, On Thu, Jan 25, 2024 at 08:56:52AM -0400, David Steele wrote: > I would still advocate for a back patch here. It is frustrating to get logs > from users that just say: > > LOG: invalid checkpoint record > PANIC: could not locate a valid checkpoint record > > It would be very helpful to kno

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Wed, 24 Jan 2024 at 19:03, Michael Paquier wrote: > On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: > > I managed to get it to build the vcvarsall arch needs to be x64. I need > to > > add some options, but the patch above needs to be applied to build it. > > Nice. If I may ask,

Re: Unnecessary smgropen in {heapam_relation,index}_copy_data?

2024-01-25 Thread Aleksander Alekseev
Hi, > I find heapam_relation_copy_data() and index_copy_data() have the following > code: > > dstrel = smgropen(*newrlocator, rel->rd_backend); > > ... > > RelationCreateStorage(*newrlocator, rel->rd_rel->relpersistence, > true); > > The smgropen() is also called by Relat

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 08:31, Dave Cramer wrote: > > > On Wed, 24 Jan 2024 at 19:03, Michael Paquier wrote: > >> On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: >> > I managed to get it to build the vcvarsall arch needs to be x64. I need >> to >> > add some options, but the patch ab

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-25 Thread Robert Haas
On Wed, Jan 24, 2024 at 9:13 PM Melanie Plageman wrote: > v12 attached has my attempt at writing better comments for this > section of lazy_scan_heap(). + /* + * If we didn't get the cleanup lock and the page is not new or empty, + * we can still collect LP_DEAD items in the dead_items array for

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-25 Thread Melanie Plageman
On Thu, Jan 25, 2024 at 8:57 AM Robert Haas wrote: > > On Wed, Jan 24, 2024 at 9:13 PM Melanie Plageman > wrote: > > v12 attached has my attempt at writing better comments for this > > section of lazy_scan_heap(). > > + /* > + * If we didn't get the cleanup lock and the page is not new or empty,

Re: remaining sql/json patches

2024-01-25 Thread jian he
On Thu, Jan 25, 2024 at 7:54 PM Amit Langote wrote: > > > > > The problem with returning comp_domain_with_typmod from json_value() > > seems to be that it's using a text-to-record CoerceViaIO expression > > picked from JsonExpr.item_coercions, which behaves differently than > > the expression tree

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Tom Lane
Amit Langote writes: > On Thu, Jan 25, 2024 at 2:59 PM Richard Guo wrote: >> I came across a warning when building master (a044e61f1b) on old GCC >> (4.8.5). > Will apply the attached, which does this: > - return BoolGetDatum(!SOFT_ERROR_OCCURRED(&escontext)); > + return BoolGetDatum(!escon

Re: cleanup patches for incremental backup

2024-01-25 Thread Robert Haas
On Wed, Jan 24, 2024 at 2:39 PM Nathan Bossart wrote: > That seems like a reasonable starting point. Even if it doesn't help > determine the root cause, it should at least help rule out concurrent > summary removal. Here is a patch for that. -- Robert Haas EDB: http://www.enterprisedb.com v1

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Amit Langote
On Thu, Jan 25, 2024 at 23:57 Tom Lane wrote: > Amit Langote writes: > > On Thu, Jan 25, 2024 at 2:59 PM Richard Guo > wrote: > >> I came across a warning when building master (a044e61f1b) on old GCC > >> (4.8.5). > > > Will apply the attached, which does this: > > > - return BoolGetDatum(!S

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Tom Lane
Amit Langote writes: > On Thu, Jan 25, 2024 at 23:57 Tom Lane wrote: >> -1 please. We should not break that abstraction for the sake >> of ignorable warnings on ancient compilers. > Ignoring the warning was my 1st thought too, because an old discussion I > found about the warning was too old (

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-25 Thread Robert Haas
On Thu, Jan 25, 2024 at 9:18 AM Melanie Plageman wrote: > > To me, the first paragraph of this one misses the mark. What I thought > > we should be saying here was something like "If we don't have a > > cleanup lock, the code above has already processed this page to the > > extent that is possible

Re: Unnecessary smgropen in {heapam_relation,index}_copy_data?

2024-01-25 Thread Japin Li
On Thu, 25 Jan 2024 at 21:43, Aleksander Alekseev wrote: > Hi, > >> I find heapam_relation_copy_data() and index_copy_data() have the following >> code: >> >> dstrel = smgropen(*newrlocator, rel->rd_backend); >> >> ... >> >> RelationCreateStorage(*newrlocator, rel->rd_r

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Amit Langote
On Fri, Jan 26, 2024 at 0:15 Tom Lane wrote: > Amit Langote writes: > > On Thu, Jan 25, 2024 at 23:57 Tom Lane wrote: > >> -1 please. We should not break that abstraction for the sake > >> of ignorable warnings on ancient compilers. > > > Ignoring the warning was my 1st thought too, because a

Re: More new SQL/JSON item methods

2024-01-25 Thread Andrew Dunstan
On 2024-01-18 Th 09:25, Jeevan Chalke wrote: On Thu, Jan 18, 2024 at 1:03 AM Peter Eisentraut wrote: On 17.01.24 10:03, Jeevan Chalke wrote: > I added unary '+' and '-' support as well and thus thought of having > separate rules altogether rather than folding those in.

Re: A compiling warning in jsonb_populate_record_valid

2024-01-25 Thread Tom Lane
Amit Langote writes: > On Fri, Jan 26, 2024 at 0:15 Tom Lane wrote: >> Amit Langote writes: >>> Ignoring the warning was my 1st thought too, because an old discussion I >>> found about the warning was too old (2011). The style I adopted in my >>> “fix” is used in a few other places too, so I th

Re: Patch: Improve Boolean Predicate JSON Path Docs

2024-01-25 Thread Tom Lane
"David E. Wheeler" writes: > On Jan 24, 2024, at 16:32, Tom Lane wrote: >> + >> + Predicate check expressions are required in the >> + @@ operator (and the >> + jsonb_path_match function), and should not be >> used >> + with the @? operator (or the >> + jsonb_

Re: make dist using git archive

2024-01-25 Thread Peter Eisentraut
On 22.01.24 21:04, Tristan Partin wrote: +git = find_program('git', required: false, native: true, disabler: true) +bzip2 = find_program('bzip2', required: false, native: true, disabler: true) This doesn't need to be a disabler. git is fine as-is. See later comment. Disablers only work like y

Re: cleanup patches for incremental backup

2024-01-25 Thread Nathan Bossart
On Thu, Jan 25, 2024 at 10:06:41AM -0500, Robert Haas wrote: > On Wed, Jan 24, 2024 at 2:39 PM Nathan Bossart > wrote: >> That seems like a reasonable starting point. Even if it doesn't help >> determine the root cause, it should at least help rule out concurrent >> summary removal. > > Here is

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-25 Thread Melanie Plageman
On Thu, Jan 25, 2024 at 10:19 AM Robert Haas wrote: > > On Thu, Jan 25, 2024 at 9:18 AM Melanie Plageman > wrote: > > > To me, the first paragraph of this one misses the mark. What I thought > > > we should be saying here was something like "If we don't have a > > > cleanup lock, the code above h

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-25 Thread Alvaro Herrera
Here's a touched-up version of this patch. First, PROC_GLOBAL->clogGroupFirst and SlruCtl->latest_page_number change from being protected by locks to being atomics, but there's no mention of considering memory barriers that they should have. Looking at the code, I think the former doesn't need an

Re: make dist using git archive

2024-01-25 Thread Tristan Partin
On Thu Jan 25, 2024 at 10:04 AM CST, Peter Eisentraut wrote: On 22.01.24 21:04, Tristan Partin wrote: >> +    'HEAD', '.'], >> +  install: false, >> +  output: distdir + '.tar.bz2', >> +) > > The bz2 target should be wrapped in an `if bzip2.found()`. The way that this currently works i

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-25 Thread Alvaro Herrera
On 2024-Jan-25, Alvaro Herrera wrote: > Here's a touched-up version of this patch. > diff --git a/src/backend/storage/lmgr/lwlock.c > b/src/backend/storage/lmgr/lwlock.c > index 98fa6035cc..4a5e05d5e4 100644 > --- a/src/backend/storage/lmgr/lwlock.c > +++ b/src/backend/storage/lmgr/lwlock.c > @@

Add new error_action COPY ON_ERROR "log"

2024-01-25 Thread torikoshia
Hi, As described in 9e2d870119, COPY ON_EEOR is expected to have more "error_action". (Note that option name was changed by b725b7eec) I'd like to have a new option "log", which skips soft errors and logs information that should have resulted in errors to PostgreSQL log. I think this option

Re: index prefetching

2024-01-25 Thread Tomas Vondra
On 1/25/24 11:45, Dilip Kumar wrote: > On Wed, Jan 24, 2024 at 11:43 PM Tomas Vondra > wrote: > >> On 1/22/24 07:35, Konstantin Knizhnik wrote: >>> >>> On 22/01/2024 1:47 am, Tomas Vondra wrote: h, right. Well, you're right in this case we perhaps could set just one of those flags, b

Re: UUID v7

2024-01-25 Thread Sergey Prokhorenko
Aleksander, In this case the documentation must state that the functions uuid_extract_time() and uuidv7(T) are against the RFC requirements, and that developers may use these functions with caution at their own risk, and these  functions are not recommended for production environment. The funct

Re: A performance issue with Memoize

2024-01-25 Thread Tom Lane
David Rowley writes: > I'd feel better about doing it your way if Tom could comment on if > there was a reason he put the function calls that way around in > 5ebaaa494. Apologies for not having noticed this thread before. I'm taking a look at it now. However, while sniffing around this I found

Re: Emit fewer vacuum records by reaping removable tuples during pruning

2024-01-25 Thread Robert Haas
On Thu, Jan 25, 2024 at 11:19 AM Melanie Plageman wrote: > Cool. I might add "successfully" or "fully" to "Either way, the page > hasn't been processed yet" I'm OK with that. > > > I think it would be nice to clarify this comment. I think the "when > > > there is little free space anyway" is ref

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-01-25 Thread Robert Haas
On Thu, Jan 25, 2024 at 11:22 AM Alvaro Herrera wrote: > Still with these auto-tuning GUCs, I noticed that the auto-tuning code > would continue to grow the buffer sizes with shared_buffers to > arbitrarily large values. I added an arbitrary maximum of 1024 (8 MB), > which is much higher than the

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Andrew Dunstan
On 2024-01-24 We 19:02, Michael Paquier wrote: On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: I managed to get it to build the vcvarsall arch needs to be x64. I need to add some options, but the patch above needs to be applied to build it. Nice. If I may ask, what kind of host a

Re: A performance issue with Memoize

2024-01-25 Thread Tom Lane
David Rowley writes: > I think fixing it your way makes sense. I don't really see any reason > why we should have two. However... > Another way it *could* be fixed would be to get rid of pull_paramids() > and change create_memoize_plan() to set keyparamids to all the param > IDs that match are e

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 12:30, Andrew Dunstan wrote: > > On 2024-01-24 We 19:02, Michael Paquier wrote: > > On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: > > I managed to get it to build the vcvarsall arch needs to be x64. I need to > add some options, but the patch above needs to b

Re: More new SQL/JSON item methods

2024-01-25 Thread Tom Lane
Andrew Dunstan writes: > Thanks, I have pushed this. The buildfarm is pretty widely unhappy, mostly failing on select jsonb_path_query('1.23', '$.string()'); On a guess, I tried running that under valgrind, and behold it said ==00:00:00:05.637 435530== Conditional jump or move depends on unini

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 08:45, Dave Cramer wrote: I tried running my buildfarm using my git repo and my branch, but get the following error Status Line: 492 bad branch parameter Content: bad branch parameter fix_arm Web txn failed with status: 1 You can't use your own branch with the buildfa

Re: More new SQL/JSON item methods

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 14:31, Tom Lane wrote: Andrew Dunstan writes: Thanks, I have pushed this. The buildfarm is pretty widely unhappy, mostly failing on select jsonb_path_query('1.23', '$.string()'); On a guess, I tried running that under valgrind, and behold it said ==00:00:00:05.637 435530=

Re: Relation bulk write facility

2024-01-25 Thread Heikki Linnakangas
On 10/01/2024 18:17, Robert Haas wrote: I think we should try to pick prefixes that are one or more words rather than using word fragments. bulkw is an awkward prefix even for people whose first language is English, and probably more awkward for others. Renamed the 'bulkw' variables to 'bulksta

Re: More new SQL/JSON item methods

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 14:31, Tom Lane wrote: Andrew Dunstan writes: Thanks, I have pushed this. The buildfarm is pretty widely unhappy, mostly failing on select jsonb_path_query('1.23', '$.string()'); On a guess, I tried running that under valgrind, and behold it said ==00:00:00:05.637 435530=

Re: More new SQL/JSON item methods

2024-01-25 Thread Tom Lane
Andrew Dunstan writes: > On 2024-01-25 Th 14:31, Tom Lane wrote: >> (The reported crashes seem to be happening later during a >> recursive invocation, seemingly because JsonbType(jb) is >> returning garbage. So there may be another bug after this one.) > I don't think so. AIUI The first call dea

Re: proposal: psql: show current user in prompt

2024-01-25 Thread Pavel Stehule
Hi čt 11. 1. 2024 v 12:12 odesílatel Jelte Fennema-Nio napsal: > On Tue, 12 Sept 2023 at 09:46, Peter Eisentraut > wrote: > > ISTM that for a purpose like pgbouncer, it would be simpler to add a new > > GUC "report these variables" and send that in the startup message? That > > might not help

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 14:31, Andrew Dunstan wrote: > > On 2024-01-25 Th 08:45, Dave Cramer wrote: > > > > > > I tried running my buildfarm using my git repo and my branch, but get the > following error > Status Line: 492 bad branch parameter > Content: > bad branch parameter fix_arm > > Web txn

Re: More new SQL/JSON item methods

2024-01-25 Thread Tom Lane
I wrote: > There's something else going on, because I'm still getting the > assertion failure on my Mac with this fix in place. Annoyingly, > it goes away if I compile with -O0, so it's kind of hard to > identify what's going wrong. No, belay that: I must've got confused about which version I was

[Doc] Improvements to ddl.sgl Privileges Section and Glossary

2024-01-25 Thread David G. Johnston
Hey, In a nearby user complaint email [1] some missing information regarding ownership reassignment came to light. I took that and went a bit further to add what I felt was further missing information and context for how the privilege system is designed. I've tried to formalize and label existin

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 12:30, Andrew Dunstan wrote: > > On 2024-01-24 We 19:02, Michael Paquier wrote: > > On Wed, Jan 24, 2024 at 06:45:21AM -0500, Dave Cramer wrote: > > I managed to get it to build the vcvarsall arch needs to be x64. I need to > add some options, but the patch above needs to b

Re: More new SQL/JSON item methods

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 15:33, Tom Lane wrote: Andrew Dunstan writes: On 2024-01-25 Th 14:31, Tom Lane wrote: (The reported crashes seem to be happening later during a recursive invocation, seemingly because JsonbType(jb) is returning garbage. So there may be another bug after this one.) I don't

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Anthony Roberts
Hi David, Unix "file" or "dumpbin /headers" in vcvarsall are your best bets. Thanks, Anthony On Thu, 25 Jan 2024, 21:01 Dave Cramer, wrote: > > > On Thu, 25 Jan 2024 at 12:30, Andrew Dunstan wrote: > >> >> On 2024-01-24 We 19:02, Michael Paquier wrote: >> >> On Wed, Jan 24, 2024 at 06:45:21AM

Re: Remove unused fields in ReorderBufferTupleBuf

2024-01-25 Thread reid . thompson
On Thu, 2024-01-25 at 16:16 +0300, Aleksander Alekseev wrote: > Hi, > > > > Here is the corrected patch. > > > > Thank you for updating the patch! I have some comments: > > Thanks for the review. > > > -tuple = (ReorderBufferTupleBuf *) > > +tuple = (HeapTuple) > >

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 15:56, Dave Cramer wrote: On Thu, 25 Jan 2024 at 14:31, Andrew Dunstan wrote: On 2024-01-25 Th 08:45, Dave Cramer wrote: I tried running my buildfarm using my git repo and my branch, but get the following error Status Line: 492 bad branch parameter

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 16:04, Anthony Roberts wrote: > Hi David, > > Unix "file" or "dumpbin /headers" in vcvarsall are your best bets. > > Thanks, > Anthony > So there is another way, select the file in Windows Explorer and right click, in the compatibility tab if the "Windows on ARM" is greye

Re: More new SQL/JSON item methods

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 15:58, Tom Lane wrote: I wrote: There's something else going on, because I'm still getting the assertion failure on my Mac with this fix in place. Annoyingly, it goes away if I compile with -O0, so it's kind of hard to identify what's going wrong. No, belay that: I must've g

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Andrew Dunstan
On 2024-01-25 Th 16:17, Dave Cramer wrote: On Thu, 25 Jan 2024 at 16:04, Anthony Roberts wrote: Hi David, Unix "file" or "dumpbin /headers" in vcvarsall are your best bets. Thanks, Anthony So there is another way, select the file in Windows Explorer and right click, i

Re: Use of backup_label not noted in log

2024-01-25 Thread David Steele
On 1/25/24 09:29, Michael Banck wrote: Hi, On Thu, Jan 25, 2024 at 08:56:52AM -0400, David Steele wrote: I would still advocate for a back patch here. It is frustrating to get logs from users that just say: LOG: invalid checkpoint record PANIC: could not locate a valid checkpoint record It

Re: Guiding principle for dropping LLVM versions?

2024-01-25 Thread Thomas Munro
On Thu, Jan 25, 2024 at 4:44 PM Thomas Munro wrote: > ... A few build farm animals will > now fail in the configure step as discussed, and need some adjustment > (ie disable LLVM or upgrade to LLVM 10+ for the master branch). Owners pinged.

Re: Use of backup_label not noted in log

2024-01-25 Thread Tom Lane
David Steele writes: > Another thing to note here -- knowing the LSN is important but also > knowing that backup recovery was attempted (i.e. backup_label exists) is > really crucial. Knowing both just saves so much time in back and forth > debugging. > It appears the tally for back patching i

Re: Use of backup_label not noted in log

2024-01-25 Thread David Steele
On 1/25/24 17:42, Tom Lane wrote: David Steele writes: Another thing to note here -- knowing the LSN is important but also knowing that backup recovery was attempted (i.e. backup_label exists) is really crucial. Knowing both just saves so much time in back and forth debugging. It appears the

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Dave Cramer
On Thu, 25 Jan 2024 at 16:32, Andrew Dunstan wrote: > > On 2024-01-25 Th 16:17, Dave Cramer wrote: > > > > On Thu, 25 Jan 2024 at 16:04, Anthony Roberts > wrote: > >> Hi David, >> >> Unix "file" or "dumpbin /headers" in vcvarsall are your best bets. >> >> Thanks, >> Anthony >> > > > So there is

Re: Guiding principle for dropping LLVM versions?

2024-01-25 Thread Mark Wong
On 1/25/24 13:41, Thomas Munro wrote: On Thu, Jan 25, 2024 at 4:44 PM Thomas Munro wrote: ... A few build farm animals will now fail in the configure step as discussed, and need some adjustment (ie disable LLVM or upgrade to LLVM 10+ for the master branch). Owners pinged. I think I fixed up

Re: speed up a logical replica setup

2024-01-25 Thread Euler Taveira
On Tue, Jan 23, 2024, at 10:29 PM, Euler Taveira wrote: > I'll post a new one soon. I'm attaching another patch that fixes some of the issues pointed out by Hayato, Shlok, and Junwang. * publication doesn't exist. The analysis [1] was done by Hayato but I didn't use the proposed patch. Instead

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

2024-01-25 Thread Michael Paquier
On Thu, Jan 25, 2024 at 05:45:43PM +0900, Sutou Kouhei wrote: > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Thu, 25 Jan 2024 12:17:55 +0900, > Michael Paquier wrote: >> +extern CopyToRoutine CopyToRoutineText; >> +extern CopyToRoutine CopyToRoutineCSV;

Re: speed up a logical replica setup

2024-01-25 Thread Euler Taveira
On Thu, Jan 25, 2024, at 6:05 AM, Hayato Kuroda (Fujitsu) wrote: > 01. > ``` > /* Options */ > static char *pub_conninfo_str = NULL; > static SimpleStringList database_names = {NULL, NULL}; > static int wait_seconds = DEFAULT_WAIT; > static bool retain = false; > static bool dry_run = false; > ```

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-01-25 Thread Yugo NAGATA
On Tue, 2 Jan 2024 08:00:00 +0800 jian he wrote: > On Mon, Nov 6, 2023 at 8:00 AM jian he wrote: > > > > minor doc issues. > > Returns the chunk id of the TOASTed value, or NULL if the value is not > > TOASTed. > > Should it be "chunk_id"? Thank you for your suggestion. As you pointed out, it

Rename setup_cancel_handler in pg_dump

2024-01-25 Thread Yugo NAGATA
Hi, Attached is a simple patch to rename setup_cancel_handler() in pg_dump/parallel.c. I am proposing it because there is a public function with the same name in fe_utils/cancel.c. I know pg_dump/parallel.c does not include fe_utils/cancel.h, so there is no conflict, but I think it is better to

Re: Use of backup_label not noted in log

2024-01-25 Thread Michael Paquier
On Thu, Jan 25, 2024 at 08:56:52AM -0400, David Steele wrote: > I would still advocate for a back patch here. It is frustrating to get logs > from users that just say: > > LOG: invalid checkpoint record > PANIC: could not locate a valid checkpoint record > > It would be very helpful to know wha

RE: Fix inappropriate comments in function ReplicationSlotAcquire

2024-01-25 Thread Wei Wang (Fujitsu)
On Thu, Jan 25, 2024 at 20:33 Amit Kapila wrote: > On Thu, Jan 25, 2024 at 4:01 PM Wei Wang (Fujitsu) > wrote: > > > > > > Yes, agree. I think these two parts have become slightly outdated after the > > commit 1632ea4. So also tried to fix the first part of the comment. > > Attach the new patch.

Re: [PATCH] Add native windows on arm64 support

2024-01-25 Thread Michael Paquier
On Thu, Jan 25, 2024 at 04:52:30PM -0500, Dave Cramer wrote: > On Thu, 25 Jan 2024 at 16:32, Andrew Dunstan wrote: >> On 2024-01-25 Th 16:17, Dave Cramer wrote: >> Yeah, I think the default Developer Command Prompt for VS2022 is set up >> for x86 builds. AIUI you should start by executing "vcvarsa

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-01-25 Thread vignesh C
On Wed, 20 Dec 2023 at 19:17, Jelte Fennema-Nio wrote: > > On Thu, 14 Dec 2023 at 13:57, Jelte Fennema-Nio wrote: > > I changed all the places that were not adhering to those spellings. > > It seems I forgot a /g on my sed command to do this so it turned out I > missed one that caused the test to

Re: Printing backtrace of postgres processes

2024-01-25 Thread vignesh C
On Sun, 5 Nov 2023 at 01:49, Bharath Rupireddy wrote: > > On Thu, Jul 20, 2023 at 8:22 PM Daniel Gustafsson wrote: > > > > > On 11 Jan 2023, at 15:44, Bharath Rupireddy > > > wrote: > > > > > > On Wed, Nov 30, 2022 at 11:43 AM Bharath Rupireddy > > > wrote: > > >> > > >> I'm attaching the v22

  1   2   >