Re: Psql meta-command conninfo+

2024-02-08 Thread Pavel Luzanov
Hi, Maiquel! The patch v10 build ends with a warning: $ make -j --silent describe.c:911:1: warning: no previous prototype for ‘listConnectionInformation’ [-Wmissing-prototypes] 911 | listConnectionInformation() | ^ About terms. postgres@postgres(17.0)=# \x

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 9:39 PM Tom Lane wrote: > Nathan Bossart writes: > > On Thu, Feb 08, 2024 at 11:59:54AM -0800, Andres Freund wrote: > >> I'd put these static inlines into common/int.h. I don't think this is > common > >> enough to warrant being in c.h. Probably also doesn't hurt to have

Re: Introduce XID age and inactive timeout based replication slot invalidation

2024-02-08 Thread Bertrand Drouvot
Hi, On Wed, Feb 07, 2024 at 12:22:07AM +0530, Bharath Rupireddy wrote: > On Mon, Feb 5, 2024 at 3:15 PM Bertrand Drouvot > wrote: > > > > I'm not sure I like the fact that "invalidations" and "conflicts" are merged > > into a single field. I'd vote to keep conflict_reason as it is and add a new

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

2024-02-08 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Fri, 9 Feb 2024 13:21:34 +0900, Michael Paquier wrote: >> - Revisit what we have here, looking at more profiles to see how HEAD >> an v13 compare. It looks like we are on a good path, but let's tackle >>

Re: Psql meta-command conninfo+

2024-02-08 Thread Jim Jones
Hi Nathan On 09.02.24 03:41, Nathan Bossart wrote: > Separately, does > the server version really belong here? I'm not sure I would consider that > to be connection information. > I tend to agree with you. The info there wouldn't hurt, but perhaps the client version would be a better fit. --

Re: Fix propagation of persistence to sequences in ALTER TABLE / ADD COLUMN

2024-02-08 Thread Peter Eisentraut
On 08.02.24 07:04, Ashutosh Bapat wrote: The patch looks ok. +seqstmt->sequence->relpersistence = cxt->rel ? cxt->rel->rd_rel->relpersistence : cxt->relation->relpersistence; + This condition looks consistent with the other places in the code around line 435, 498. Ah good, that pattern

RE: Synchronizing slots from primary to standby

2024-02-08 Thread Zhijie Hou (Fujitsu)
On Friday, February 9, 2024 2:44 PM Masahiko Sawada wrote: > > On Thu, Feb 8, 2024 at 8:01 PM shveta malik wrote: > > > > On Thu, Feb 8, 2024 at 12:08 PM Peter Smith > wrote: > > > > > > Here are some review comments for patch v80_2-0001. > > > > Thanks for the feedback Peter. Addressed the

Re: Documentation to upgrade logical replication cluster

2024-02-08 Thread Peter Smith
Here are some review comments for patch v7-0001. == doc/src/sgml/glossary.sgml 1. + + Logical replication cluster + + + A set of publisher and subscriber instance with publisher instance + replicating changes to the subscriber instance. + + + 1a. /instance

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread vignesh C
On Thu, 8 Feb 2024 at 23:30, Alexander Lakhin wrote: > > 08.02.2024 12:25, vignesh C wrote: > > Yes, the wakeup call sent by the "CREATE SUBSCRIPTION" command was > > getting missed in this case. The wakeup call can be sent during > > subscription creation/modification and when the apply worker

Re: Synchronizing slots from primary to standby

2024-02-08 Thread Masahiko Sawada
On Thu, Feb 8, 2024 at 8:01 PM shveta malik wrote: > > On Thu, Feb 8, 2024 at 12:08 PM Peter Smith wrote: > > > > Here are some review comments for patch v80_2-0001. > > Thanks for the feedback Peter. Addressed the comments in v81. > Attached patch001 for early feedback. Rest of the patches need

Small fix on query_id_enabled

2024-02-08 Thread Yugo NAGATA
Hi, I found the comment on query_id_enabled looks inaccurate because this is never set to true when compute_query_id is ON. /* True when compute_query_id is ON, or AUTO and a module requests them */ bool query_id_enabled = false; Should we fix this as following (just fixing the place of

Re: speed up a logical replica setup

2024-02-08 Thread vignesh C
On Wed, 7 Feb 2024 at 10:24, Euler Taveira wrote: > > On Fri, Feb 2, 2024, at 6:41 AM, Hayato Kuroda (Fujitsu) wrote: > > Thanks for updating the patch! Thanks for the updated patch, few comments: Few comments: 1) Cleanup function handler flag should be reset, i.e. dbinfo->made_replslot = false;

Re: Synchronizing slots from primary to standby

2024-02-08 Thread Amit Kapila
On Fri, Feb 9, 2024 at 9:57 AM Peter Smith wrote: > > Here are some review comments for patch v81-0001. > > == > > 1. GENERAL - ReplicationSlotInvalidationCause enum. > > I was thinking that the ReplicationSlotInvalidationCause should > explicitly set RS_INVAL_NONE = 0 (it's zero anyway, but

Re: [PATCH] Add native windows on arm64 support

2024-02-08 Thread Michael Paquier
On Tue, Feb 06, 2024 at 07:01:49AM -0500, Dave Cramer wrote: > Thanks, this patch works and > testing with meson passes. Only with the version posted at [1]? Interesting, that's the same contents as v8 posted upthread, minus src/tools/ because we don't need to care about them anymore. Andrew,

Re: GUC-ify walsender MAX_SEND_SIZE constant

2024-02-08 Thread Michael Paquier
On Thu, Feb 08, 2024 at 02:42:00PM +0330, Majid Garoosi wrote: > Thank you very much for your review. Something to be aware of, but the community lists use bottom-posting for replies because it is easier to follow the logic of a thread this way. See here:

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

2024-02-08 Thread Michael Paquier
On Fri, Feb 09, 2024 at 01:19:50PM +0900, Sutou Kouhei wrote: > Are you already working on this? Do you want me to write the > next patch based on the current master? No need for a new patch, thanks. I've spent some time today doing a rebase and measuring the whole, without seeing a degradation

Re: Synchronizing slots from primary to standby

2024-02-08 Thread Amit Kapila
On Fri, Feb 9, 2024 at 10:00 AM Zhijie Hou (Fujitsu) wrote: > > Here is the V82 patch set which includes the following changes: > +reserve_wal_for_local_slot(XLogRecPtr restart_lsn) { ... + /* + * Find the oldest existing WAL segment file. + * + * Normally, we can determine it by using the last

Re: Synchronizing slots from primary to standby

2024-02-08 Thread Peter Smith
Here are some review comments for patch v81-0001. == 1. GENERAL - ReplicationSlotInvalidationCause enum. I was thinking that the ReplicationSlotInvalidationCause should explicitly set RS_INVAL_NONE = 0 (it's zero anyway, but making it explicit with a comment /* Must be zero. */. will stop

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

2024-02-08 Thread Michael Paquier
On Wed, Feb 07, 2024 at 01:33:18PM +0900, Michael Paquier wrote: > Hmm. That explains why I was not seeing any differences with this > callback then. It seems to me that the order of actions to take is > clear, like: > - Revert 2889fd23be56 to keep a clean state of the tree, now done with >

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

2024-02-08 Thread Sutou Kouhei
Hi, In "Re: Make COPY format extendable: Extract COPY TO format implementations" on Wed, 7 Feb 2024 13:33:18 +0900, Michael Paquier wrote: > Hmm. That explains why I was not seeing any differences with this > callback then. It seems to me that the order of actions to take is > clear,

Re: Psql meta-command conninfo+

2024-02-08 Thread Nathan Bossart
Sorry if this has been brought up, but I noticed that some of the information is listed below the result set: postgres=# \conninfo+ Current Connection Information -[ RECORD 1 ]--+- Database | postgres Authenticated User | nathan

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-08 Thread Jeevan Chalke
On Thu, Feb 8, 2024 at 2:22 PM jian he wrote: > On Thu, Feb 8, 2024 at 1:27 PM Jeevan Chalke > wrote: > > > > > > > > On Wed, Feb 7, 2024 at 9:13 PM jian he > wrote: > >> > >> On Wed, Feb 7, 2024 at 7:36 PM Jeevan Chalke > >> wrote: > >> > Added checkTimezoneIsUsedForCast() check where ever

RE: Psql meta-command conninfo+

2024-02-08 Thread Maiquel Grassi
On 08.02.24 21:37, Erik Wienhold wrote: >> Modifiers such as + or S in \dS are not covered by autocompletion. >> src/bin/psql/tab-complete.c only specifies backslash commands in their >> basic form (without modifiers). >> >> (\dS actually autocompletes to \ds to my surprise) >> >Aha... I never

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

2024-02-08 Thread Michael Paquier
On Thu, Feb 01, 2024 at 10:57:58AM +0900, Michael Paquier wrote: > CREATE EXTENSION blackhole_am; One thing I have forgotten here is to provide a copy of this AM for future references, so here you go with a blackhole_am.tar.gz attached. -- Michael blackhole_am.tar.gz Description:

Re: Where can I find the doxyfile?

2024-02-08 Thread John Morris
>> We also have a handful of .cpp files. Fortunately, our .cpp files are simple and do not include C++ specific features. We shouldn’t have any problem adding .cpp to the filter list. At some point it will be necessary to support general C++, but I wasn’t planning to do it yet. >> This file

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Andres Freund
Hi, On 2024-02-09 09:36:28 +0900, Michael Paquier wrote: > On Thu, Feb 08, 2024 at 10:25:07AM +0200, Heikki Linnakangas wrote: > > There's no validation, just conversion. I'd suggest: > > > > "Set up encoding conversion info if the file and server encodings differ > > (see also

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Michael Paquier
On Thu, Feb 08, 2024 at 10:25:07AM +0200, Heikki Linnakangas wrote: > There's no validation, just conversion. I'd suggest: > > "Set up encoding conversion info if the file and server encodings differ > (see also pg_server_to_any)." > > Other than that, +1 Cool. I've used your wording and

Re: Psql meta-command conninfo+

2024-02-08 Thread Jim Jones
Hi Erik On 08.02.24 21:37, Erik Wienhold wrote: > Modifiers such as + or S in \dS are not covered by autocompletion. > src/bin/psql/tab-complete.c only specifies backslash commands in their > basic form (without modifiers). > > (\dS actually autocompletes to \ds to my surprise) > Aha... I never

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Michael Paquier
On Thu, Feb 08, 2024 at 05:29:46PM +0900, Sutou Kouhei wrote: > Oh, sorry. I missed the Michael's patch: > https://www.postgresql.org/message-id/flat/ZcR9Q9hJ8GedFSCd%40paquier.xyz#e73272b042a22befac7a95f7bcb4fb9a > > I withdraw my change. No problem. Thanks for caring about that. -- Michael

Re: Make documentation builds reproducible

2024-02-08 Thread Peter Smith
On Thu, Feb 8, 2024 at 9:47 PM Peter Eisentraut wrote: > > On 23.01.24 02:06, Peter Smith wrote: > > This has been working forever, but seems to have broken due to commit > > [1] having an undeclared variable. > > > runtime error: file stylesheet-html-common.xsl line 452 element if > > Variable

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-02-08 Thread Daniel Gustafsson
> On 8 Feb 2024, at 15:16, Daniel Gustafsson wrote: > One option could perhaps be to include a version number for <= comparison, and > if set to zero a function pointer to a version check function must be > provided? > That would handle the simple cases in a single place without messy logic,

RE: Psql meta-command conninfo+

2024-02-08 Thread Maiquel Grassi
>On 2024-02-08 20:37 +0100, Jim Jones wrote: >> One thing I just noticed. The psql autocomplete feature does not suggest >> the new + option of \conninfo. For instance, when typing "\connin[TAB]" >> it automatically autocompletes to "\conninfo ". I guess it should also >> be included in this

Re: "ERROR: latch already owned" on gharial

2024-02-08 Thread Andres Freund
Hi, On 2024-02-08 14:57:47 +0200, Heikki Linnakangas wrote: > On 08/02/2024 04:08, Soumyadeep Chakraborty wrote: > > A possible ordering of events: > > > > (1) DisownLatch() is called by pid Y during ProcKill() and the write for > > latch->owner_pid = 0 is NOT yet flushed to shmem. > > > > (2)

Re: Where can I find the doxyfile?

2024-02-08 Thread Andres Freund
Hi, On 2024-02-08 18:30:01 +, John Morris wrote: > +FILTER_PATTERNS= *.c *.h We also have a handful of .cpp files. > +/* > + * Custom banner character to be removed from comments. > + * We'll hardcode it to suit postgreSQL, but it should be set through a > command line arg. > + */

RE: Psql meta-command conninfo+

2024-02-08 Thread Maiquel Grassi
> v8 no longer throws a permission denied error for non-superusers - it is > IMHO much nicer this way. > > $ /usr/local/postgres-dev/bin/psql postgres -p 5432 -h 127.0.0.1 -U jim > psql (17devel) > Type "help" for help. > > postgres=# \x > Expanded display is on. > postgres=# \conninfo+ > Current

Re: glibc qsort() vulnerability

2024-02-08 Thread Tom Lane
Nathan Bossart writes: > On Thu, Feb 08, 2024 at 11:59:54AM -0800, Andres Freund wrote: >> I'd put these static inlines into common/int.h. I don't think this is common >> enough to warrant being in c.h. Probably also doesn't hurt to have a not >> quite >> as generic name as INT_CMP, I'd not be

Re: Psql meta-command conninfo+

2024-02-08 Thread Erik Wienhold
On 2024-02-08 20:37 +0100, Jim Jones wrote: > One thing I just noticed. The psql autocomplete feature does not suggest > the new + option of \conninfo. For instance, when typing "\connin[TAB]" > it automatically autocompletes to "\conninfo ". I guess it should also > be included in this patch.

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 9:07 PM Nathan Bossart wrote: > On Thu, Feb 08, 2024 at 11:59:54AM -0800, Andres Freund wrote: > > On 2024-02-08 13:44:02 -0500, Tom Lane wrote: > >> Are we okay with using macros that (a) have double evaluation hazards > >> and (b) don't enforce the data types being

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 7:44 PM Tom Lane wrote: > Nathan Bossart writes: > > On Thu, Feb 08, 2024 at 02:16:11PM +0100, Mats Kindahl wrote: > >> +/* > >> + * Compare two integers and return -1, 0, or 1 without risking > overflow. > >> + * > >> + * This macro is used to avoid running into overflow

Re: pg_get_expr locking

2024-02-08 Thread Tom Lane
I wrote: > Peter Eisentraut writes: >> I think the situation is that one test (domain) runs pg_get_expr as part >> of an information_schema view, while at the same time another test >> (alter_table) drops a table that the pg_get_expr is just processing. > The test case that's failing is, IIUC,

Re: glibc qsort() vulnerability

2024-02-08 Thread Nathan Bossart
On Thu, Feb 08, 2024 at 11:59:54AM -0800, Andres Freund wrote: > On 2024-02-08 13:44:02 -0500, Tom Lane wrote: >> Are we okay with using macros that (a) have double evaluation hazards >> and (b) don't enforce the data types being compared are the same? >> I think static inlines might be a safer

Re: gcc build warnings at -O3

2024-02-08 Thread Alexander Korotkov
On Wed, Feb 7, 2024 at 10:31 PM Andres Freund wrote: > On 2024-01-11 21:55:19 -0500, Tom Lane wrote: > > Bharath Rupireddy writes: > > > Hi, I'm seeing a compiler warning with CFLAGS -O3 but not with -O2. > > > > > In file included from dbcommands.c:20: > > > dbcommands.c: In function

Re: glibc qsort() vulnerability

2024-02-08 Thread Andres Freund
Hi, On 2024-02-08 13:44:02 -0500, Tom Lane wrote: > Nathan Bossart writes: > > On Thu, Feb 08, 2024 at 02:16:11PM +0100, Mats Kindahl wrote: > >> +/* > >> + * Compare two integers and return -1, 0, or 1 without risking overflow. > >> + * > >> + * This macro is used to avoid running into overflow

Re: Psql meta-command conninfo+

2024-02-08 Thread Jim Jones
On 08.02.24 16:50, Maiquel Grassi wrote: > Hi Jim, > Thank you for your support on this patch! > As I believe in its usability, I have been dedicating efforts to make > it really interesting. > I hadn't thought about the permissioning issue for > "unix_socket_directories". I appreciate that. > I

Re: glibc qsort() vulnerability

2024-02-08 Thread Tom Lane
Nathan Bossart writes: > On Thu, Feb 08, 2024 at 02:16:11PM +0100, Mats Kindahl wrote: >> +/* >> + * Compare two integers and return -1, 0, or 1 without risking overflow. >> + * >> + * This macro is used to avoid running into overflow issues because a simple >> + * subtraction of the two values

Re: glibc qsort() vulnerability

2024-02-08 Thread Nathan Bossart
On Thu, Feb 08, 2024 at 02:16:11PM +0100, Mats Kindahl wrote: > +/* > + * Compare two integers and return -1, 0, or 1 without risking overflow. > + * > + * This macro is used to avoid running into overflow issues because a simple > + * subtraction of the two values when implementing a cmp function

Re: Where can I find the doxyfile?

2024-02-08 Thread John Morris
>> I think all the explanatory messages in doc/doxygen/meson.build >> are a bit much. I think it's enough to just not define the target Here is a patch with an updated meson.build as you suggested. I agree the messages were a bit much. On the other hand, I would like to see clear error messages

Re: [PATCH] Add sortsupport for range types and btree_gist

2024-02-08 Thread Bernd Helmle
Am Mittwoch, dem 10.01.2024 um 22:18 +0800 schrieb jian he: > > I split the original author's patch into 2. > 1. Add GiST sortsupport function for all the btree-gist module data > types except anyrange data type (which actually does not in this > module) > 2. Add GiST sortsupport function for

Re: Avoiding concurrent calls to bindtextdomain()

2024-02-08 Thread Tom Lane
I wrote: > 0001 also gets rid of the possibility that pthread_mutex_init/ > pthread_mutex_lock could fail due to malloc failure. This seems > important since default_threadlock() assumes that pthread_mutex_lock > cannot fail in practice. I observe that ecpglib also assumes that, > although it's

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread Alexander Lakhin
08.02.2024 12:25, vignesh C wrote: Yes, the wakeup call sent by the "CREATE SUBSCRIPTION" command was getting missed in this case. The wakeup call can be sent during subscription creation/modification and when the apply worker exits. WaitForReplicationWorkerAttach should not reset the latch here

Re: pg_get_expr locking

2024-02-08 Thread Tom Lane
Peter Eisentraut writes: > On 07.02.24 16:26, Tom Lane wrote: >> Why would a test be applying pg_get_expr to a table it doesn't >> control? > I think the situation is that one test (domain) runs pg_get_expr as part > of an information_schema view, while at the same time another test >

Re: Put genbki.pl output into src/include/catalog/ directly

2024-02-08 Thread Tom Lane
Peter Eisentraut writes: > With the makefile rules, the output of genbki.pl was written to > src/backend/catalog/, and then the header files were linked to > src/include/catalog/. > This patch changes it so that the output files are written directly to > src/include/catalog/. Didn't read the

Re: What about Perl autodie?

2024-02-08 Thread Dagfinn Ilmari Mannsåker
Daniel Gustafsson writes: >> On 8 Feb 2024, at 16:53, Tom Lane wrote: > >> 2. Don't wait, migrate them all now. This would mean requiring >> Perl 5.10.1 or later to run the TAP tests, even in back branches. >> >> I think #2 might not be all that radical. We have nothing older >> than 5.14.0

Re: What about Perl autodie?

2024-02-08 Thread Greg Sabino Mullane
> > 2. Don't wait, migrate them all now. This would mean requiring > Perl 5.10.1 or later to run the TAP tests, even in back branches. > #2 please. For context, meson did not even exist in 2009. Cheers, Greg

Re: What about Perl autodie?

2024-02-08 Thread Daniel Gustafsson
> On 8 Feb 2024, at 16:53, Tom Lane wrote: > 2. Don't wait, migrate them all now. This would mean requiring > Perl 5.10.1 or later to run the TAP tests, even in back branches. > > I think #2 might not be all that radical. We have nothing older > than 5.14.0 in the buildfarm, so we don't

Re: What about Perl autodie?

2024-02-08 Thread Tom Lane
Daniel Gustafsson writes: >> On 8 Feb 2024, at 08:01, Peter Eisentraut wrote: >> I suppose we could start using it for completely new scripts. > +1, it would be nice to eventually be able to move to it everywhere so > starting > now with new scripts may make the eventual transition smoother.

RE: Psql meta-command conninfo+

2024-02-08 Thread Maiquel Grassi
> On 07.02.24 21:13, Maiquel Grassi wrote: >> >> I believe in v7 patch we have a quite substantial meta-command feature. >> >> > Thanks for implementing this. I find it very handy. > > I was just wondering if a "permission denied" error for non-superusers > is the best choice for "\conninfo+": > >

Re: Sequence Access Methods, round two

2024-02-08 Thread Peter Eisentraut
On 19.01.24 00:27, Michael Paquier wrote: The reason why this stuff has bumped into my desk is that we have no good solution in-core for globally-distributed transactions for active-active deployments. First, anything we have needs to be plugged into default expressions of attributes like with

RE: Psql meta-command conninfo+

2024-02-08 Thread Maiquel Grassi
> Hi, > On 07.02.2024 23:13, Maiquel Grassi wrote: > Regarding the "system_user" function, as it is relatively new, I added > the necessary handling to avoid conflicts with versions lower than version 16. > Yes, that's rights. > > A couple of doubts about the implementation details. > But

Re: the s_lock_stuck on perform_spin_delay

2024-02-08 Thread Andy Fan
Hi, > There are some similarities between this and > https://www.postgresql.org/message-id/20240207184050.rkvpuudq7huijmkb%40awork3.anarazel.de > as described in that email. Thanks for this information. > > > Hm, I think this might make this code a bit more expensive. It's cheaper, both > in

Re: pg_stat_advisor extension

2024-02-08 Thread Ilia Evdokimov
On Feb 08 2024 at 07:14:18, Andrei Lepikhov wrote: 1. In the case of parallel workers the plan_rows value has a different semantics than the number of rows predicted. Just explore get_parallel_divisor(). Yes, this is a very weighty and important issue. I need to think about this very

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-02-08 Thread Daniel Gustafsson
> On 8 Feb 2024, at 11:55, Peter Eisentraut wrote: > A few more quick comments: Thanks for reviewing! > I think the .report_text assignments also need a gettext_noop(), like the > .status assignments. Done in the attached. > The type DataTypesUsageChecks is only used in check.c, so doesn't

Re: pg_stat_advisor extension

2024-02-08 Thread Ilia Evdokimov
Our further discussion of this new extension takes place in this thread: https://www.postgresql.org/message-id/flat/f822b674-9697-43b9-931b-4d69729a26ff%40tantorlabs.com .Due to technical difficulties in the current thread, I will not be able to conduct a dialogue except in HTML format. And this

Re: 2024-02-08 release announcement draft

2024-02-08 Thread Dagfinn Ilmari Mannsåker
jian he writes: > On Thu, Feb 8, 2024 at 1:17 PM Tom Lane wrote: >> >> "Jonathan S. Katz" writes: >> > On 2/6/24 3:19 AM, jian he wrote: >> >> On Tue, Feb 6, 2024 at 12:43 PM Jonathan S. Katz >> >> wrote: >> >>> * In PL/pgSQL, support SQL commands that are `CREATE FUNCTION`/`CREATE >> >>>

Re: pg_stat_advisor extension

2024-02-08 Thread Ilia Evdokimov
On Feb 8 2024 at 00:00:00 jian he >INT MAX >should be 1.0? I don’t know why Konstantin Knizhnik used the ratio of actual tuples to the planned ones, but most who start testing my extension expect that it will be a coefficient from 0 to 1, which will be the ratio of the estimated tuples to

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread James Coleman
On Thu, Feb 8, 2024 at 4:47 AM Ashutosh Bapat wrote: > > On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > > - how to set the replica identity. If a table without a replica > > > identity is > > > + how to set the replica

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread James Coleman
On Wed, Feb 7, 2024 at 11:27 PM Laurenz Albe wrote: > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > - how to set the replica identity. If a table without a replica identity > > is > > + how to set the replica identity. If a table without a replica identity > > + (or with

Re: Thoughts about NUM_BUFFER_PARTITIONS

2024-02-08 Thread wenhui qiu
Hi Heikki Linnakangas I think the larger shared buffer higher the probability of multiple backend processes accessing the same bucket slot BufMappingLock simultaneously, ( InitBufTable(NBuffers + NUM_BUFFER_PARTITIONS); When I have free time, I want to do this test. I have seen some tests,

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 3:56 AM Nathan Bossart wrote: > On Thu, Feb 08, 2024 at 03:49:03PM +1300, Thomas Munro wrote: > > On Thu, Feb 8, 2024 at 3:38 PM Thomas Munro > wrote: > >> Perhaps you could wrap it in a branch-free sign() function so you get > >> a narrow answer? > >> > >>

Re: Simplify documentation related to Windows builds

2024-02-08 Thread Nazir Bilal Yavuz
Hi, On Tue, 30 Jan 2024 at 11:02, Michael Paquier wrote: > > On Fri, Jan 19, 2024 at 06:11:40AM -0500, Andrew Dunstan wrote: > > FYI Strawberry was a bit stuck for a while at 5.32, but they are now up to > > 5.38. See > > > > I agree we shouldn't be

Re: "ERROR: latch already owned" on gharial

2024-02-08 Thread Heikki Linnakangas
On 08/02/2024 04:08, Soumyadeep Chakraborty wrote: A possible ordering of events: (1) DisownLatch() is called by pid Y during ProcKill() and the write for latch->owner_pid = 0 is NOT yet flushed to shmem. (2) The PGPROC object for pid Y is returned to the free list. (3) Pid X sees the same

Re: 2024-02-08 release announcement draft

2024-02-08 Thread jian he
On Thu, Feb 8, 2024 at 1:17 PM Tom Lane wrote: > > "Jonathan S. Katz" writes: > > On 2/6/24 3:19 AM, jian he wrote: > >> On Tue, Feb 6, 2024 at 12:43 PM Jonathan S. Katz > >> wrote: > >>> * In PL/pgSQL, support SQL commands that are `CREATE FUNCTION`/`CREATE > >>> PROCEDURE` with SQL-standard

Re: Catalog domain not-null constraints

2024-02-08 Thread jian he
On Wed, Feb 7, 2024 at 4:11 PM Peter Eisentraut wrote: > > > > > Interesting. I couldn't reproduce this locally, even across different > > operating systems. The cfbot failures appear to be sporadic, but also > > happening across multiple systems, so it's clearly not just a local > >

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 12:01 PM Mats Kindahl wrote: > On Wed, Feb 7, 2024 at 9:56 PM Nathan Bossart > wrote: > >> On Wed, Feb 07, 2024 at 08:46:56PM +0200, Heikki Linnakangas wrote: >> > Doesn't hurt to fix the comparison functions, and +1 on using the same >> > pattern everywhere. >> >> I

Re: Thoughts about NUM_BUFFER_PARTITIONS

2024-02-08 Thread Heikki Linnakangas
On 08/02/2024 12:17, wenhui qiu wrote: HI hackers     When I read this text in this document there is a paragraph in it(https://www.interdb.jp/pg/pgsql08/03.html ) /* The BufMappingLock is split into partitions to reduce contention in the buffer

Re: Refactoring backend fork+exec code

2024-02-08 Thread Heikki Linnakangas
On 07/02/2024 20:25, Andres Freund wrote: On 2024-01-30 02:08:36 +0200, Heikki Linnakangas wrote: From 54f22231bb2540fc5957c14005956161e6fc9dac Mon Sep 17 00:00:00 2001 From: Heikki Linnakangas Date: Wed, 24 Jan 2024 23:15:55 +0200 Subject: [PATCH v8 1/5] Remove superfluous 'pgprocno' field

Re: pg_get_expr locking

2024-02-08 Thread Peter Eisentraut
On 07.02.24 16:26, Tom Lane wrote: What workaround should we use if there are conflicts created by concurrent regression tests? Just move the tests around a bit until the issue goes away? Why would a test be applying pg_get_expr to a table it doesn't control? I think the situation is that

Re: GUC-ify walsender MAX_SEND_SIZE constant

2024-02-08 Thread Majid Garoosi
Thank you very much for your review. I generally agree with your suggestions, so just applied them. You can find the new patch in the attached file. Best Majid On Tue, 6 Feb 2024 at 09:26, Michael Paquier wrote: > On Fri, Jan 19, 2024 at 11:04:50PM +0330, Majid Garoosi wrote: > > However,

Re: Synchronizing slots from primary to standby

2024-02-08 Thread shveta malik
On Thu, Feb 8, 2024 at 4:31 PM shveta malik wrote: > > On Thu, Feb 8, 2024 at 12:08 PM Peter Smith wrote: > > > > Here are some review comments for patch v80_2-0001. > > Thanks for the feedback Peter. Addressed the comments in v81. Missed to mention, Hou-san helped in addressing some of these

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

2024-02-08 Thread Jakub Wartak
Hi Daniel, On Tue, Jan 30, 2024 at 3:29 PM Daniel Verite wrote: > PFA a rebased version. Thanks for the patch! I've tested it using my original reproducer and it works great now against the original problem description. I've taken a quick look at the patch, it looks good for me. I've tested

Re: Synchronizing slots from primary to standby

2024-02-08 Thread shveta malik
On Thu, Feb 8, 2024 at 4:03 PM Amit Kapila wrote: > > Few comments on 0001 > === Thanks Amit. Addressed these in v81. > 1. > + * the slots on the standby and synchronize them. This is done on every call > + * to SQL function pg_sync_replication_slots. > > > > I think the second

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Thu, Feb 8, 2024 at 4:08 AM Nathan Bossart wrote: > Mats, I apologize for steamrolling a bit here. I'll take a step back into > a reviewer role. > No worries. :) > > -- > Nathan Bossart > Amazon Web Services: https://aws.amazon.com >

Re: Psql meta-command conninfo+

2024-02-08 Thread Jim Jones
Hi Maiquel On 07.02.24 21:13, Maiquel Grassi wrote: > > I believe in v7 patch we have a quite substantial meta-command feature. > > Thanks for implementing this. I find it very handy. I was just wondering if a "permission denied" error for non-superusers is the best choice for "\conninfo+":

Re: Psql meta-command conninfo+

2024-02-08 Thread Pavel Luzanov
Hi, On 07.02.2024 23:13, Maiquel Grassi wrote: Regarding the "system_user" function, as it is relatively new, I added the necessary handling to avoid conflicts with versions lower than version 16. Yes, that's rights. A couple of doubts about the implementation details. But keep in mind

Re: Synchronizing slots from primary to standby

2024-02-08 Thread shveta malik
On Thu, Feb 8, 2024 at 12:08 PM Peter Smith wrote: > > Here are some review comments for patch v80_2-0001. Thanks for the feedback Peter. Addressed the comments in v81. Attached patch001 for early feedback. Rest of the patches need rebasing and thus will post those later. It also addresses

Re: glibc qsort() vulnerability

2024-02-08 Thread Mats Kindahl
On Wed, Feb 7, 2024 at 9:56 PM Nathan Bossart wrote: > On Wed, Feb 07, 2024 at 08:46:56PM +0200, Heikki Linnakangas wrote: > > Doesn't hurt to fix the comparison functions, and +1 on using the same > > pattern everywhere. > > I attached a new version of the patch with some small adjustments. I

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-02-08 Thread Peter Eisentraut
On 07.02.24 14:25, Daniel Gustafsson wrote: On 6 Feb 2024, at 17:47, Daniel Gustafsson wrote: On 6 Feb 2024, at 17:32, Nathan Bossart wrote: On Fri, Feb 02, 2024 at 12:18:25AM +0530, vignesh C wrote: With no update to the thread and the patch still not applying I'm marking this as returned

Re: Make documentation builds reproducible

2024-02-08 Thread Peter Eisentraut
On 23.01.24 02:06, Peter Smith wrote: This has been working forever, but seems to have broken due to commit [1] having an undeclared variable. runtime error: file stylesheet-html-common.xsl line 452 element if Variable 'autolink.index.see' has not been declared. make: *** [html-stamp] Error

Re: Synchronizing slots from primary to standby

2024-02-08 Thread Amit Kapila
On Wed, Feb 7, 2024 at 5:32 PM shveta malik wrote: > > Sure, made the suggested function name changes. Since there is no > other change, I kept the version as v80_2. > Few comments on 0001 === 1. + * the slots on the standby and synchronize them. This is done on every call + * to

Re: [PATCH] LockAcquireExtended improvement

2024-02-08 Thread Jingxian Li
Hello Robert, On 2024/2/2 5:05, Robert Haas wrote: > On Thu, Feb 1, 2024 at 2:16 AM Jingxian Li wrote: >> According to what you said, I resubmitted a patch which splits the ProcSleep >> logic into two parts, the former is responsible for inserting self to >> WaitQueue, >> the latter is

Re: [PATCH] LockAcquireExtended improvement

2024-02-08 Thread Jingxian Li
Hello Robert, On 2024/2/2 5:05, Robert Haas wrote: > On Thu, Feb 1, 2024 at 2:16 AM Jingxian Li wrote: >> According to what you said, I resubmitted a patch which splits the ProcSleep >> logic into two parts, the former is responsible for inserting self to >> WaitQueue, >> the latter is

Thoughts about NUM_BUFFER_PARTITIONS

2024-02-08 Thread wenhui qiu
HI hackers When I read this text in this document there is a paragraph in it( https://www.interdb.jp/pg/pgsql08/03.html) /* The BufMappingLock is split into partitions to reduce contention in the buffer table (the default is 128 partitions). Each BufMappingLock partition guards a portion of

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-08 Thread Ashutosh Bapat
On Thu, Feb 8, 2024 at 9:57 AM Laurenz Albe wrote: > > On Thu, 2024-02-08 at 13:40 +1100, Peter Smith wrote: > > - how to set the replica identity. If a table without a replica identity > > is > > + how to set the replica identity. If a table without a replica identity > > + (or with

RE: Improve eviction algorithm in ReorderBuffer

2024-02-08 Thread Hayato Kuroda (Fujitsu)
Dear Sawada-san, Thanks for making v3 patchset. I have also benchmarked the case [1]. Below results are the average of 5th, there are almost the same result even when median is used for the comparison. On my env, the regression cannot be seen. HEAD (1e285a5) HEAD + v3 patches difference

Re: Race condition in FetchTableStates() breaks synchronization of subscription tables

2024-02-08 Thread vignesh C
On Tue, 6 Feb 2024 at 18:30, Alexander Lakhin wrote: > > 05.02.2024 13:13, vignesh C wrote: > > Thanks for the steps for the issue, I was able to reproduce this issue > > in my environment with the steps provided. The attached patch has a > > proposed fix where the latch will not be set in case

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-08 Thread jian he
On Thu, Feb 8, 2024 at 1:27 PM Jeevan Chalke wrote: > > > > On Wed, Feb 7, 2024 at 9:13 PM jian he wrote: >> >> On Wed, Feb 7, 2024 at 7:36 PM Jeevan Chalke >> wrote: >> > Added checkTimezoneIsUsedForCast() check where ever we are casting >> > timezoned to non-timezoned types and vice-versa.

Re: A comment in DropRole() contradicts the actual behavior

2024-02-08 Thread Kyotaro Horiguchi
At Thu, 8 Feb 2024 16:39:23 +0900, Michael Paquier wrote in > On Thu, Feb 08, 2024 at 09:00:01AM +0300, Alexander Lakhin wrote: > > Hello, > > > > Please look at errors, which produced by the following script, starting > > from 6566133c5: > > for i in `seq 100`; do (echo "CREATE USER u; DROP

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Sutou Kouhei
Hi, In <20240208.172501.2177371292839763981@clear-code.com> "Re: confusing / inefficient "need_transcoding" handling in copy" on Thu, 08 Feb 2024 17:25:01 +0900 (JST), Sutou Kouhei wrote: > How about the following to avoid needless transcoding? Oh, sorry. I missed the Michael's patch:

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Heikki Linnakangas
On 08/02/2024 09:05, Michael Paquier wrote: On Tue, Feb 06, 2024 at 02:24:45PM -0800, Andres Freund wrote: I think the code is just very confusing - there actually *is* verification of the encoding, it just happens at a different, earlier, layer, namely in copyfromparse.c: CopyConvertBuf()

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-08 Thread Sutou Kouhei
Hi, In <20240206222445.hzq22pb2nye7r...@awork3.anarazel.de> "Re: confusing / inefficient "need_transcoding" handling in copy" on Tue, 6 Feb 2024 14:24:45 -0800, Andres Freund wrote: > One unfortunate issue: We don't have any tests verifying that COPY FROM > catches encoding issues. How

  1   2   >