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

2024-02-07 Thread Peter Eisentraut
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/. This makes the logic simpler, and it also makes the

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

2024-02-07 Thread Michael Paquier
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 USER u;"); done | psql > >psql-1.log 2>&1 & > for i in `seq 100`; do (echo

Re: table inheritance versus column compression and storage settings

2024-02-07 Thread Ashutosh Bapat
On Wed, Feb 7, 2024 at 12:47 PM Ashutosh Bapat wrote: > 0001 fixes compression inheritance > 0002 fixes storage inheritance > The first patch does not update compression_1.out which makes CI unhappy. Here's patchset fixing that. -- Best Wishes, Ashutosh Bapat From

Re: pg_stat_advisor extension

2024-02-07 Thread Andrei Lepikhov
On 6/2/2024 22:27, Ilia Evdokimov wrote: I welcome your insights, feedback, and evaluations regarding the necessity of integrating this new extension into PostgreSQL. Besides other issues that were immediately raised during the discovery of the extension, Let me emphasize two issues: 1. In

Re: Testing autovacuum wraparound (including failsafe)

2024-02-07 Thread Peter Eisentraut
On 08.02.24 05:05, Masahiko Sawada wrote: On Thu, Feb 8, 2024 at 3:11 AM Peter Eisentraut wrote: The way src/test/modules/xid_wraparound/meson.build is written, it installs the xid_wraparound.so module into production installations. For test modules, a different installation code needs to be

Re: confusing / inefficient "need_transcoding" handling in copy

2024-02-07 Thread Michael Paquier
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() which says: > /* >* If the file

Re: What about Perl autodie?

2024-02-07 Thread Peter Eisentraut
On 08.02.24 07:03, Tom Lane wrote: John Naylor writes: On Wed, Feb 7, 2024 at 11:52 PM Greg Sabino Mullane wrote: No drawbacks. I've been using it heavily for many, many years. Came out in 5.10.1, which should be available everywhere at this point (2009 was the year of release) We moved

Re: Synchronizing slots from primary to standby

2024-02-07 Thread Peter Smith
Here are some review comments for patch v80_2-0001. == Commit message 1. We may also see the the slots invalidated and dropped on the standby if the primary changes 'wal_level' to a level lower than logical. Changing the primary 'wal_level' to a level lower than logical is only possible if

RE: Synchronizing slots from primary to standby

2024-02-07 Thread Zhijie Hou (Fujitsu)
On Wednesday, February 7, 2024 9:13 AM Masahiko Sawada wrote: > > On Tue, Feb 6, 2024 at 8:21 PM Amit Kapila wrote: > > > > On Tue, Feb 6, 2024 at 3:33 PM Amit Kapila > wrote: > > > > > > On Tue, Feb 6, 2024 at 1:09 PM Masahiko Sawada > wrote: > > > > > > > > On Tue, Feb 6, 2024 at 3:19 PM

Re: Synchronizing slots from primary to standby

2024-02-07 Thread Nisha Moond
We conducted stress testing for the patch with a setup of one primary node with 100 tables and five subscribers, each having 20 subscriptions. Then created three physical standbys syncing the logical replication slots from the primary node. All 100 slots were successfully synced on all three

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

2024-02-07 Thread Ashutosh Bapat
On Mon, Feb 5, 2024 at 9:21 PM Peter Eisentraut wrote: > > Commit 344d62fb9a9 (2022) introduced unlogged sequences and made it so > that identity/serial sequences automatically get the persistence level > of their owning table. But this works only for CREATE TABLE and not for > ALTER TABLE / ADD

Re: What about Perl autodie?

2024-02-07 Thread Tom Lane
John Naylor writes: > On Wed, Feb 7, 2024 at 11:52 PM Greg Sabino Mullane > wrote: >> No drawbacks. I've been using it heavily for many, many years. Came out in >> 5.10.1, >> which should be available everywhere at this point (2009 was the year of >> release) > We moved our minimum to 5.14

Re: meson: catalog/syscache_ids.h isn't installed

2024-02-07 Thread Sutou Kouhei
Hi, In <4b60e9bd-426c-4d4b-bbbd-1abd06fa0...@eisentraut.org> "Re: meson: catalog/syscache_ids.h isn't installed" on Mon, 5 Feb 2024 17:53:52 +0100, Peter Eisentraut wrote: > On 05.02.24 02:29, Sutou Kouhei wrote: >> catalog/syscache_ids.h is referred by utils/syscache.h but >> it's not

A comment in DropRole() contradicts the actual behavior

2024-02-07 Thread Alexander Lakhin
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 USER u;"); done | psql >psql-1.log 2>&1 & for i in `seq 100`; do (echo "CREATE USER u; DROP USER u;"); done | psql >psql-2.log 2>&1 & wait ERROR: 

Re: What about Perl autodie?

2024-02-07 Thread John Naylor
On Wed, Feb 7, 2024 at 11:52 PM Greg Sabino Mullane wrote: > > No drawbacks. I've been using it heavily for many, many years. Came out in > 5.10.1, > which should be available everywhere at this point (2009 was the year of > release) We moved our minimum to 5.14 fairly recently, so we're good

Re: Support "Right Semi Join" plan shapes

2024-02-07 Thread wenhui qiu
Hi Alena Rybakina I saw this code snippet also disable mergejoin ,I think it same effect + /* + * For now we do not support RIGHT_SEMI join in mergejoin. + */ + if (jointype == JOIN_RIGHT_SEMI) + { + *mergejoin_allowed = false; + return NIL; + } + Regards Alena Rybakina 于2024年1月30日周二 14:51写道:

Re: POC, WIP: OR-clause support for indexes

2024-02-07 Thread Andrei Lepikhov
On 3/2/2024 02:06, Alena Rybakina wrote: On 01.02.2024 08:00, jian he wrote: I added your code to the patch. Thanks Alena and Jian for the detailed scrutiny! A couple of questions: 1. As I see, transformAExprIn uses the same logic as we invented but allows composite and domain types. Could

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-07 Thread Jeevan Chalke
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. > > https://www.postgresql.org/docs/devel/functions-json.html > above

Re: 2024-02-08 release announcement draft

2024-02-07 Thread Tom Lane
"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 bodies. >>

Re: 2024-02-08 release announcement draft

2024-02-07 Thread Jonathan S. Katz
On 2/6/24 3:19 AM, jian he wrote: On Tue, Feb 6, 2024 at 12:43 PM Jonathan S. Katz wrote: Hi, Attached is a draft of the 2024-02-08 release announcement. Please review for accuracy and notable omissions. Please provide any feedback no later than 2024-02-08 12:00 UTC (and preferably sooner).

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Laurenz Albe
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 replica identity behavior the same as > NOTHING) is > added to a

Re: Testing autovacuum wraparound (including failsafe)

2024-02-07 Thread Masahiko Sawada
On Thu, Feb 8, 2024 at 3:11 AM Peter Eisentraut wrote: > > The way src/test/modules/xid_wraparound/meson.build is written, it > installs the xid_wraparound.so module into production installations. > For test modules, a different installation code needs to be used. See > neighboring test modules

Re: Printing backtrace of postgres processes

2024-02-07 Thread Michael Paquier
On Thu, Feb 08, 2024 at 12:30:00AM +0530, Bharath Rupireddy wrote: > I've missed adding LoadBacktraceFunctions() in InitAuxiliaryProcess > for 0002 patch. Please find the attached v29 patch set. Sorry for the > noise. I've been torturing the patch with \watch and loops calling the function while

Re: Change GUC hashtable to use simplehash?

2024-02-07 Thread John Naylor
On Wed, Feb 7, 2024 at 10:41 PM Peter Eisentraut wrote: > > /tmp/cirrus-ci-build/src/include/common/hashfn_unstable.h: In function > ‘int fasthash_accum_cstring_unaligned(fasthash_state*, const char*)’: > /tmp/cirrus-ci-build/src/include/common/hashfn_unstable.h:201:20: > warning: comparison of

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
Mats, I apologize for steamrolling a bit here. I'll take a step back into a reviewer role. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

RE: speed up a logical replica setup

2024-02-07 Thread Hayato Kuroda (Fujitsu)
Dear Euler, > Remember the target server was a standby (read only access). I don't expect an application trying to modify it; unless it is a buggy application. > What if the client modifies the data just after the promotion? Naively considered, all the changes can be accepted, but are there any

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
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? >> >> https://stackoverflow.com/questions/14579920/fast-sign-of-integer-in-c > > Ah,

Re: cfbot is failing all tests on FreeBSD/Meson builds

2024-02-07 Thread Tom Lane
Thomas Munro writes: > On Tue, Jan 30, 2024 at 5:06 PM Tom Lane wrote: >> Thomas Munro writes: >>> Ahh, there is one: https://github.com/cpan-authors/IO-Tty/issues/38 >> Just for the archives' sake: I hit this today on a fresh install >> of FreeBSD 14.0, which has pulled in p5-IO-Tty-1.18.

Re: glibc qsort() vulnerability

2024-02-07 Thread Thomas Munro
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? > > https://stackoverflow.com/questions/14579920/fast-sign-of-integer-in-c Ah, strike that, it is much like the suggested (a > b) - (a < b) but with extra

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
On Wed, Feb 07, 2024 at 06:06:37PM -0800, Andres Freund wrote: > Another branchless variant is (a > b) - (a < b). It seems to get a similar > improvement as the overflow-checking version. Well, that's certainly more elegant. I updated the patch to that approach for now. -- Nathan Bossart

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Peter Smith
On Thu, Feb 8, 2024 at 11:12 AM James Coleman wrote: > > On Wed, Feb 7, 2024 at 6:04 PM Peter Smith wrote: > > > > On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > > > > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe > > > wrote: > > > > > > > > On Wed, 2024-02-07 at 15:12 -0500, James

Re: glibc qsort() vulnerability

2024-02-07 Thread Thomas Munro
On Thu, Feb 8, 2024 at 3:06 PM Andres Freund wrote: > On 2024-02-07 19:52:11 -0600, Nathan Bossart wrote: > > On Wed, Feb 07, 2024 at 04:42:07PM -0800, Andres Freund wrote: > > > On 2024-02-07 16:21:24 -0600, Nathan Bossart wrote: > > >> The assembly for that looks encouraging, but I still need

Re: "ERROR: latch already owned" on gharial

2024-02-07 Thread Soumyadeep Chakraborty
Hey hackers, I wanted to report that we have seen this issue (with the procLatch) a few times very sporadically on Greenplum 6X (based on 9.4), with relatively newer versions of GCC. I realize that 9.4 is out of support, so this email is purely to add on to the existing thread, in case the info

Re: glibc qsort() vulnerability

2024-02-07 Thread Andres Freund
Hi, On 2024-02-07 19:52:11 -0600, Nathan Bossart wrote: > On Wed, Feb 07, 2024 at 04:42:07PM -0800, Andres Freund wrote: > > On 2024-02-07 16:21:24 -0600, Nathan Bossart wrote: > >> The assembly for that looks encouraging, but I still need to actually test > >> it... > > > > Possible. For 16bit

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
On Wed, Feb 07, 2024 at 04:42:07PM -0800, Andres Freund wrote: > On 2024-02-07 16:21:24 -0600, Nathan Bossart wrote: >> The assembly for that looks encouraging, but I still need to actually test >> it... > > Possible. For 16bit upcasting to 32bit is clearly the best way. For 32 bit > that doesn't

Re: Document efficient self-joins / UPDATE LIMIT techniques.

2024-02-07 Thread Laurenz Albe
On Sat, 2024-02-03 at 15:27 -0500, Corey Huinker wrote: > > Here's another attempt, applying Laurenz's feedback: I like this patch much better. Some comments: > --- a/doc/src/sgml/ref/delete.sgml > +++ b/doc/src/sgml/ref/delete.sgml > @@ -234,6 +234,24 @@ DELETE FROM films > In some cases

Re: cfbot is failing all tests on FreeBSD/Meson builds

2024-02-07 Thread Thomas Munro
On Tue, Jan 30, 2024 at 5:06 PM Tom Lane wrote: > Thomas Munro writes: > > On Sat, Jan 13, 2024 at 1:51 PM Tom Lane wrote: > >> Time for a bug report to IO::Tty's authors, I guess. > > > Ahh, there is one: https://github.com/cpan-authors/IO-Tty/issues/38 > > Just for the archives' sake: I hit

Re: Rename setup_cancel_handler in pg_dump

2024-02-07 Thread Yugo NAGATA
On Wed, 7 Feb 2024 22:59:48 +0100 Daniel Gustafsson wrote: > > On 1 Feb 2024, at 02:21, Yugo NAGATA wrote: > > On Tue, 30 Jan 2024 13:44:28 +0100 > > Daniel Gustafsson wrote: > > >> -setup_cancel_handler(void) > >> +pg_dump_setup_cancel_handler(void) > >> > >> We don't have any other

Re: Should we remove -Wdeclaration-after-statement?

2024-02-07 Thread Noah Misch
On Mon, Jan 29, 2024 at 04:03:44PM +0100, Jelte Fennema-Nio wrote: > I feel like this is the type of change where there's not much > discussion to be had. And the only way to resolve it is to use some > voting to gauge community opinion. > > So my suggestion is for people to respond with -1,

Re: glibc qsort() vulnerability

2024-02-07 Thread Andres Freund
Hi, On 2024-02-07 16:21:24 -0600, Nathan Bossart wrote: > On Wed, Feb 07, 2024 at 01:48:57PM -0800, Andres Freund wrote: > > Now, in most cases this won't matter, the sorting isn't performance > > critical. But I don't think it's a good idea to standardize on a generally > > slower pattern. > >

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread James Coleman
On Wed, Feb 7, 2024 at 6:04 PM Peter Smith wrote: > > On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe > > wrote: > > > > > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > > > We recently noticed some behavior that seems

Re: pg_stat_advisor extension

2024-02-07 Thread jian he
On Tue, Feb 6, 2024 at 12:06 AM Ilia Evdokimov wrote: > > Hi hackers, > > I'm reaching out again regarding the patch with new extension > 'pg_stat_advisor' aimed at enhancing query plan efficiency through the > suggestion of creating statistics. > > I understand the community is busy, but I

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Peter Smith
On Thu, Feb 8, 2024 at 9:04 AM James Coleman wrote: > > On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe wrote: > > > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > > We recently noticed some behavior that seems reasonable but also > > > surprised our engineers based on the docs. > > >

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
On Wed, Feb 07, 2024 at 01:48:57PM -0800, Andres Freund wrote: > Now, in most cases this won't matter, the sorting isn't performance > critical. But I don't think it's a good idea to standardize on a generally > slower pattern. > > Not that that's a good test, but I did quickly benchmark [1] this

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread James Coleman
On Wed, Feb 7, 2024 at 3:22 PM Laurenz Albe wrote: > > On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > > We recently noticed some behavior that seems reasonable but also > > surprised our engineers based on the docs. > > > > If we have this setup: > > create table items(i int); > >

Re: Rename setup_cancel_handler in pg_dump

2024-02-07 Thread Daniel Gustafsson
> On 1 Feb 2024, at 02:21, Yugo NAGATA wrote: > On Tue, 30 Jan 2024 13:44:28 +0100 > Daniel Gustafsson wrote: >> -setup_cancel_handler(void) >> +pg_dump_setup_cancel_handler(void) >> >> We don't have any other functions prefixed with pg_dump_, based on the naming >> of the surrounding code in

Re: glibc qsort() vulnerability

2024-02-07 Thread Andres Freund
Hi, On 2024-02-07 20:46:56 +0200, Heikki Linnakangas wrote: > > The routines modified do a subtraction of int:s and return that, which > > can cause an overflow. This method is used for some int16 as well but > > since standard conversions in C will perform the arithmetics in "int" > > precision,

Re: index prefetching

2024-02-07 Thread Melanie Plageman
On Wed, Jan 24, 2024 at 3:20 PM Melanie Plageman wrote: > > On Wed, Jan 24, 2024 at 4:19 AM Tomas Vondra > wrote: > > > > On 1/24/24 01:51, Melanie Plageman wrote: > > >> But I'm not sure what to do about optimizations that are more specific > > >> to the access path. Consider for example the

Re: Statistics Import and Export

2024-02-07 Thread Tomas Vondra
Hi, I took a quick look at the v4 patches. I haven't done much testing yet, so only some basic review. 0001 - The SGML docs for pg_import_rel_stats may need some changes. It starts with description of what gets overwritten (non-)transactionally (which gets repeated twice), but that seems more

Re: glibc qsort() vulnerability

2024-02-07 Thread Nathan Bossart
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 haven't looked through all in-tree qsort() comparators to see if

Re: speed up a logical replica setup

2024-02-07 Thread Euler Taveira
On Wed, Feb 7, 2024, at 2:31 AM, Hayato Kuroda (Fujitsu) wrote: > Ah, actually I did not have such a point of view. Assuming that changed port > number > can avoid connection establishments, there are four options: > a) Does not overwrite port and listen_addresses. This allows us to monitor by >

gcc build warnings at -O3

2024-02-07 Thread Andres Freund
Hi, 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 ‘createdb’: > > ../../../src/include/postgres.h:104:16: warning:

Re: Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread Laurenz Albe
On Wed, 2024-02-07 at 15:12 -0500, James Coleman wrote: > We recently noticed some behavior that seems reasonable but also > surprised our engineers based on the docs. > > If we have this setup: > create table items(i int); > insert into items(i) values (1); > create publication test_pub for all

RE: Psql meta-command conninfo+

2024-02-07 Thread Maiquel Grassi
> Hi, Maiquel! > > On 07.02.2024 17:47, Maiquel Grassi wrote: > "Also, it seems that the verbose parameter in the listConnectionInformation > is unnecessary." > Could you point out exactly the line or code snippet you are referring to? > +bool > +listConnectionInformation(const char *pattern,

Question about behavior of deletes with REPLICA IDENTITY NOTHING

2024-02-07 Thread James Coleman
Hello, We recently noticed some behavior that seems reasonable but also surprised our engineers based on the docs. If we have this setup: create table items(i int); insert into items(i) values (1); create publication test_pub for all tables; Then when we: delete from items where i = 1; we get:

Re: common signal handler protection

2024-02-07 Thread Nathan Bossart
On Wed, Feb 07, 2024 at 10:40:50AM -0800, Andres Freund wrote: > On 2024-02-07 11:15:54 -0600, Nathan Bossart wrote: >> Perhaps we should add a file global bool that is only set during >> wrapper_handler(). Then we could Assert() or elog(ERROR, ...) if >> pqsignal() is called with it set. > > In

Re: Popcount optimization using AVX512

2024-02-07 Thread Alvaro Herrera
I happened to notice by chance that John Naylor had posted an extension to measure performance of popcount here: https://postgr.es/m/CAFBsxsE7otwnfA36Ly44zZO+b7AEWHRFANxR1h1kxveEV=g...@mail.gmail.com This might be useful as a base for a new one to verify the results of the proposed patch in

Re: the s_lock_stuck on perform_spin_delay

2024-02-07 Thread Andres Freund
Hi, There are some similarities between this and https://www.postgresql.org/message-id/20240207184050.rkvpuudq7huijmkb%40awork3.anarazel.de as described in that email. On 2024-01-25 15:24:17 +0800, Andy Fan wrote: > From 4c8fd0ab71299e57fbeb18dec70051bd1d035c7c Mon Sep 17 00:00:00 2001 > From:

Re: Printing backtrace of postgres processes

2024-02-07 Thread Bharath Rupireddy
On Wed, Feb 7, 2024 at 9:00 PM Bharath Rupireddy wrote: > > On Wed, Feb 7, 2024 at 2:57 PM Michael Paquier wrote: > > > > On Wed, Feb 07, 2024 at 02:04:39PM +0530, Bharath Rupireddy wrote: > > > Well, that 'ubuntu' is the default username there, I've changed it now > > > and kept the output

Re: Remove Start* macros from postmaster.c to ease understanding of code

2024-02-07 Thread Nathan Bossart
On Tue, Feb 06, 2024 at 02:37:25PM -0600, Nathan Bossart wrote: > Unless there are objections, I'll plan on committing this in the next day > or two. Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: glibc qsort() vulnerability

2024-02-07 Thread Heikki Linnakangas
On 07/02/2024 11:09, Mats Kindahl wrote: On Tue, Feb 6, 2024 at 9:56 PM Tom Lane > wrote: Nathan Bossart mailto:nathandboss...@gmail.com>> writes: > Even if the glibc issue doesn't apply to Postgres, I'm tempted to suggest > that we make it project

Re: common signal handler protection

2024-02-07 Thread Andres Freund
Hi, On 2024-02-07 11:15:54 -0600, Nathan Bossart wrote: > On Wed, Feb 07, 2024 at 11:06:50AM -0600, Nathan Bossart wrote: > > I'd like to get this committed (to HEAD only) in the next few weeks. TBH > > I'm not wild about the weird caveats (e.g., race conditions when pqsignal() > > is called

Re: scram_iterations is undocumented GUC_REPORT

2024-02-07 Thread Alvaro Herrera
On 2024-Feb-07, Daniel Gustafsson wrote: > On 30 Jan 2024, at 15:44, Alvaro Herrera wrote: > > > I propose to turn the list into a > > > > which looks _much_ nicer to read, as in the attached screenshot of > > the PDF. > > +1, this reads a lot better. Thanks, applied and backpatched to 16.

Re: Refactoring backend fork+exec code

2024-02-07 Thread Andres Freund
Hi, On 2024-01-30 02:08:36 +0200, Heikki Linnakangas wrote: > I spent some more time on the 'lastBackend' optimization in sinvaladt.c. I > realized that it became very useless with these patches, because aux > processes are allocated pgprocno's after all the slots for regular backends. > There

Re: Testing autovacuum wraparound (including failsafe)

2024-02-07 Thread Peter Eisentraut
The way src/test/modules/xid_wraparound/meson.build is written, it installs the xid_wraparound.so module into production installations. For test modules, a different installation code needs to be used. See neighboring test modules such as src/test/modules/test_rbtree/meson.build for examples.

Re: Where can I find the doxyfile?

2024-02-07 Thread John Morris
>> Maybe this is something that can be tweaked on the doxygen side? I’ll look into that idea. Doxygen is a separate project with its own developers to persuade. I could imagine a special “C” or “C++” mode. I wanted to keep things simple, and the filter mechanism is how they extend doxygen to

Re: common signal handler protection

2024-02-07 Thread Nathan Bossart
Sorry for the noise. On Wed, Feb 07, 2024 at 11:06:50AM -0600, Nathan Bossart wrote: > I'd like to get this committed (to HEAD only) in the next few weeks. TBH > I'm not wild about the weird caveats (e.g., race conditions when pqsignal() > is called within a signal handler), but I also think it

Re: Possibility to disable `ALTER SYSTEM`

2024-02-07 Thread Euler Taveira
On Wed, Feb 7, 2024, at 10:49 AM, Jelte Fennema-Nio wrote: > On Wed, 7 Feb 2024 at 11:35, Gabriele Bartolini > wrote: > > This is mostly the approach I have taken in the patch, except allowing to > > change the value in the configuration file. > > (I had missed the patch in the long thread). I

Re: common signal handler protection

2024-02-07 Thread Nathan Bossart
On Tue, Feb 06, 2024 at 06:48:53PM -0800, Andres Freund wrote: > On 2024-02-06 20:39:41 -0600, Nathan Bossart wrote: >> I finally spent some time trying to measure this overhead. Specifically, I >> sent many, many SIGUSR2 signals to postmaster, which just uses >> dummy_handler(), i.e., does

Constant Splitting/Refactoring

2024-02-07 Thread David Christensen
As part of the reserved page space/page features[1] work, there is a need to convert some of the existing constants into variables, since the size of those will no longer be fixed at compile time. At FOSDEM, there was some interest expressed about seeing what a cleanup patch like that would look

Re: What about Perl autodie?

2024-02-07 Thread Greg Sabino Mullane
On Wed, Feb 7, 2024 at 9:05 AM Peter Eisentraut wrote: > I came across the Perl autodie pragma > (https://perldoc.perl.org/autodie). This seems pretty useful; is this > something we can use? Any drawbacks? Any minimum Perl version? Big +1 No drawbacks. I've been using it heavily for many,

Re: pgjdbc is not working with PKCS8 certificates with password

2024-02-07 Thread just madhu
I see that the generated certificate is not working in pgAdmin and psql. So I wanted a way by which I could make it work there as well. As ANS.1 DER is a supported format for libpq, I suppose that this certificate should work here as well. Also as suggested checking in pgjdbc as well. On Wed,

Re: Psql meta-command conninfo+

2024-02-07 Thread Pavel Luzanov
Hi,Maiquel! On 07.02.2024 17:47, Maiquel Grassi wrote: "Also, it seems that the verbose parameter in the listConnectionInformation is unnecessary." Could you point out exactly the line or code snippet you are referring to? +bool +listConnectionInformation(const char *pattern,*bool verbose*)

Re: Where can I find the doxyfile?

2024-02-07 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 >> when the required conditions (dependencies, options) are not there. >> Maybe something like docs_pdf can serve as an example. Makes sense, and it is simpler.

Combine headerscheck and cpluspluscheck scripts

2024-02-07 Thread Peter Eisentraut
headerscheck started in 55ea1091884 (2019) essentially as an adjusted copy of cpluspluscheck. Since then two scripts have not drifted far apart. But there are occasionally mistakes keeping the two exclude lists updated together. I figure we can just combine the two scripts into one, so it's

Re: recently added jsonpath method change jsonb_path_query, jsonb_path_query_first immutability

2024-02-07 Thread jian he
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. https://www.postgresql.org/docs/devel/functions-json.html above Table 9.51. jsonpath Filter Expression Elements, the Note

Re: Change GUC hashtable to use simplehash?

2024-02-07 Thread Peter Eisentraut
On 22.01.24 03:03, John Naylor wrote: I wrote: fasthash_init(, sizeof(Datum), kind); fasthash_accum(, (char *) , sizeof(Datum)); return fasthash_final32(, 0); It occurred to me that it's strange to have two places that length can be passed. That was a side effect of the original,

Re: Printing backtrace of postgres processes

2024-02-07 Thread Bharath Rupireddy
On Wed, Feb 7, 2024 at 2:57 PM Michael Paquier wrote: > > On Wed, Feb 07, 2024 at 02:04:39PM +0530, Bharath Rupireddy wrote: > > Well, that 'ubuntu' is the default username there, I've changed it now > > and kept the output short. > > I would keep it just at two or three lines, with a "For

Re: pg_get_expr locking

2024-02-07 Thread Tom Lane
Peter Eisentraut writes: > The function pg_get_expr(), which is used in various system views and > information schema views, does not appear to lock the table passed as > the second argument, and so appears to be liable to fail if there is a > concurrent drop of the table. There is a

Re: Set log_lock_waits=on by default

2024-02-07 Thread Stephen Frost
Greetings, * Tom Lane (t...@sss.pgh.pa.us) wrote: > Stephen Frost writes: > >> On Tue, 2024-02-06 at 12:29 -0500, Tom Lane wrote: > >>> I was, and remain, of the opinion that that was a bad idea that > >>> we'll eventually revert, just like we previously got rid of most > >>> inessential log

Re: Set log_lock_waits=on by default

2024-02-07 Thread Tom Lane
Stephen Frost writes: >> On Tue, 2024-02-06 at 12:29 -0500, Tom Lane wrote: >>> I was, and remain, of the opinion that that was a bad idea that >>> we'll eventually revert, just like we previously got rid of most >>> inessential log chatter in the default configuration. >> Unsurprisingly, I want

Re: pgjdbc is not working with PKCS8 certificates with password

2024-02-07 Thread just madhu
On further investigation, *With certificate generated as below. JDBC connection is successful.openssl pkcs8 -topk8 -inform PEM -in client.key -outform DER -out client.pk8 -passout pass:foobar * -v1 PBE-MD5-DES But a connection from pgAdmin (connection failed:

Re: pgjdbc is not working with PKCS8 certificates with password

2024-02-07 Thread Joe Conway
On 2/7/24 06:42, just madhu wrote: On further investigation, /With certificate generated as below. JDBC connection is successful./ openssl pkcs8 -topk8 -inform PEM -in client.key -outform DER -out client.pk8  -passout pass:foobar / -v1 PBE-MD5-DES But a connection from pgAdmin (connection

RE: Psql meta-command conninfo+

2024-02-07 Thread Maiquel Grassi
This is a good idea about extended connection info. On 07.02.2024 07:13, Maiquel Grassi wrote: SELECT ... current_user AS "User", This will be inconsistent with \conninfo. \conninfo returns authenticated user (PQuser), not the current_user. It might be worth showing current_user,

Re: Set log_lock_waits=on by default

2024-02-07 Thread Stephen Frost
Greetings, * Laurenz Albe (laurenz.a...@cybertec.at) wrote: > On Tue, 2024-02-06 at 12:29 -0500, Tom Lane wrote: > > Nathan Bossart writes: > > > It looks like there are two ideas: > > > [...] > > > * Set log_lock_waits on by default. The folks on this thread seem to > > > support this idea,

Re: Commitfest 2024-01 first week update

2024-02-07 Thread Daniel Gustafsson
> On 7 Feb 2024, at 14:15, Alvaro Herrera wrote: > > On 2024-Feb-07, Daniel Gustafsson wrote: > >> Since the CF app knows when the last email in the thread was, the >> state of the patch entry and the number of CF's which is has been >> present in; maybe we can extend the app to highlight these

What about Perl autodie?

2024-02-07 Thread Peter Eisentraut
I came across the Perl autodie pragma (https://perldoc.perl.org/autodie). This seems pretty useful; is this something we can use? Any drawbacks? Any minimum Perl version? Attached is a sample patch of the kind of thing I'd be interested in. The existing error handling of file operations in

Re: Commitfest 2024-01 first week update

2024-02-07 Thread Amit Kapila
On Wed, Feb 7, 2024 at 6:07 PM Alvaro Herrera wrote: > > On 2024-Feb-04, vignesh C wrote: > > > We should do something about these kinds of entries, there were few > > suggestions like tagging under a new category or so, can we add a new > > status to park these entries something like "Waiting

Re: Possibility to disable `ALTER SYSTEM`

2024-02-07 Thread Jelte Fennema-Nio
On Wed, 7 Feb 2024 at 11:35, Gabriele Bartolini wrote: > This is mostly the approach I have taken in the patch, except allowing to > change the value in the configuration file. (I had missed the patch in the long thread). I think it would be nice to have this be PGC_SIGHUP, and set

Re: Possibility to disable `ALTER SYSTEM`

2024-02-07 Thread David G. Johnston
On Wednesday, February 7, 2024, Joel Jacobson wrote: > > On Fri, Sep 8, 2023, at 23:43, Magnus Hagander wrote: > > We need a "allowlist" of things a user can do, rather than a blocklist > > of "they can do everything they can possibly think of and a computer > > is capable of doing, except for

Re: Possibility to disable `ALTER SYSTEM`

2024-02-07 Thread Jelte Fennema-Nio
On Wed, 7 Feb 2024 at 11:16, Peter Eisentraut wrote: > On 06.02.24 16:22, Jelte Fennema-Nio wrote: > > On Tue, 30 Jan 2024 at 18:49, Robert Haas wrote: > >> I also think that using the GUC system to manage itself is a little > >> bit suspect. I wonder if it would be better to do this some other

Re: scram_iterations is undocumented GUC_REPORT

2024-02-07 Thread Daniel Gustafsson
> On 30 Jan 2024, at 15:44, Alvaro Herrera wrote: > I propose to turn the list into a > > which looks _much_ nicer to read, as in the attached screenshot of the > PDF. +1, this reads a lot better. -- Daniel Gustafsson

Re: Reducing connection overhead in pg_upgrade compat check phase

2024-02-07 Thread Daniel Gustafsson
> 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 with feedback. Please

Re: Commitfest 2024-01 first week update

2024-02-07 Thread Alvaro Herrera
On 2024-Feb-07, Daniel Gustafsson wrote: > Since the CF app knows when the last email in the thread was, the > state of the patch entry and the number of CF's which is has been > present in; maybe we can extend the app to highlight these patches in > a way which doesn't add more manual

Re: Why is subscription/t/031_column_list.pl failing so much?

2024-02-07 Thread vignesh C
On Wed, 7 Feb 2024 at 15:26, Amit Kapila wrote: > > On Wed, Feb 7, 2024 at 2:06 AM Tom Lane wrote: > > > > I wrote: > > > More to the point, aren't these proposals just band-aids that > > > would stabilize the test without fixing the actual problem? > > > The same thing is likely to happen to

Re: Commitfest 2024-01 first week update

2024-02-07 Thread Daniel Gustafsson
> On 7 Feb 2024, at 13:37, Alvaro Herrera wrote: > Maybe a new status is appropriate ... I would suggest "Stalled". Such a > patch still applies and has no pending feedback, but nobody seems > interested. Since the CF app knows when the last email in the thread was, the state of the patch

RE: Psql meta-command conninfo+

2024-02-07 Thread Maiquel Grassi
On 2024-02-07 05:13 +0100, Maiquel Grassi wrote: > On Tue, Feb 06, 2024 at 09:45:54PM +, Maiquel Grassi wrote: > > My initial idea has always been that they should continue to appear > > because \conninfo+ should show all the things that \conninfo shows and > > add more

Re: Commitfest 2024-01 first week update

2024-02-07 Thread Alvaro Herrera
On 2024-Feb-04, vignesh C wrote: > We should do something about these kinds of entries, there were few > suggestions like tagging under a new category or so, can we add a new > status to park these entries something like "Waiting for direction". > The threads which have no discussion for 6 months

Re: Psql meta-command conninfo+

2024-02-07 Thread Pavel Luzanov
This is a good idea about extended connection info. On 07.02.2024 07:13, Maiquel Grassi wrote: SELECT ... current_user AS "User", This will be inconsistent with \conninfo. \conninfo returns authenticated user (PQuser), not the current_user. It might be worth showing current_user,

Re: Synchronizing slots from primary to standby

2024-02-07 Thread Dilip Kumar
> > So now if we have such a functionality then it would be even better to > > extend it to selectively sync the slot. For example, if there is some > > issue in syncing all slots, maybe some bug or taking a long time to > > sync because there are a lot of slots but if the user needs to quickly >

  1   2   >