Re: Add new option 'all' to pg_stat_reset_shared()

2023-11-15 Thread Michael Paquier
On Wed, Nov 15, 2023 at 04:25:14PM +0900, Michael Paquier wrote: > Other than that, it looks OK. Tweaked the queries of this one slightly, and applied. So I think that we are now good for this thread. Thanks, all! -- Michael signature.asc Description: PGP signature

Re: Infinite Interval

2023-11-15 Thread Ashutosh Bapat
On Tue, Nov 14, 2023 at 4:39 PM Dean Rasheed wrote: > > On Thu, 9 Nov 2023 at 12:49, Dean Rasheed wrote: > > > > OK, I have pushed 0001 and 0002. Here's the remaining (main) patch. > > > > OK, I have now pushed the main patch. Thanks a lot Dean. -- Best Wishes, Ashutosh Bapat

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-15 Thread Amul Sul
On Wed, Nov 15, 2023 at 9:26 PM Nathan Bossart wrote: > On Wed, Nov 15, 2023 at 09:27:18AM +0530, Amul Sul wrote: > > Nevermind, I usually use git apply or git am, here are those errors: > > > > PG/ - (master) $ git apply > ~/Downloads/retire_compatibility_macro_v1.patch > > error: patch failed:

Re: Adding facility for injection points (or probe points?) for more advanced tests

2023-11-15 Thread Michael Paquier
On Wed, Nov 15, 2023 at 12:21:40PM +0100, Alvaro Herrera wrote: > On 2023-Nov-15, Michael Paquier wrote: > Oh, I think you're overthinking what my comment was. I was saying, just > name it "InjectionPointsHash". Since there appears to be no room for > another hash table for injection points, then

Re: Synchronizing slots from primary to standby

2023-11-15 Thread shveta malik
On Tue, Nov 14, 2023 at 7:56 PM Drouvot, Bertrand wrote: > > Hi, > > On 11/13/23 2:57 PM, Zhijie Hou (Fujitsu) wrote: > > On Friday, November 10, 2023 4:16 PM Drouvot, Bertrand > > wrote: > >> Yeah good point, agree to just error out in all the case then (if we > >> discard the > >> sync_ reser

RE: Random pg_upgrade test failure on drongo

2023-11-15 Thread Hayato Kuroda (Fujitsu)
Dear hackers, > While tracking a buildfarm, I found that drongo failed the test > pg_upgrade/003_logical_slots [1]. > A strange point is that the test passed in the next iteration. Currently I'm > not > sure the reason, but I will keep my eye for it and will investigate if it > happens again.

Re: remaining sql/json patches

2023-11-15 Thread Amit Langote
Hi Erik, On Thu, Nov 16, 2023 at 13:52 Erik Rijkers wrote: > Op 11/15/23 om 14:00 schreef Amit Langote: > > Hi, > > [..] > > > Attached updated patch. The version of 0001 that I posted on Oct 11 > > to add the error-safe version of CoerceViaIO contained many > > unnecessary bits that are now re

Re: remaining sql/json patches

2023-11-15 Thread Erik Rijkers
Op 11/15/23 om 14:00 schreef Amit Langote: Hi, [..] Attached updated patch. The version of 0001 that I posted on Oct 11 to add the error-safe version of CoerceViaIO contained many unnecessary bits that are now removed. -- Thanks, Amit Langote EDB: http://www.enterprisedb.com > [v24-0001-A

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Peter Smith
On Thu, Nov 16, 2023 at 12:18 PM Amit Kapila wrote: > > On Thu, Nov 16, 2023 at 3:48 AM Peter Smith wrote: > > > > ~ > > > > SUGGESTION (#1a and #1b) > > > > ereport(log_replication_commands ? LOG : DEBUG1, > > errmsg(SlotIsLogical(s) > >? "acquired logical replication slo

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Peter Smith
On Thu, Nov 16, 2023 at 12:36 PM Amit Kapila wrote: > > On Wed, Nov 15, 2023 at 3:58 PM Alvaro Herrera > wrote: > > > > Translation-wise, this doesn't work, because you're building a string. > > There's no reason to think that the words "logical" and "physical" > > should stay untranslated; the

Re: pg_upgrade and logical replication

2023-11-15 Thread Peter Smith
Here are some review comments for patch v14-0001 == src/backend/utils/adt/pg_upgrade_support.c 1. binary_upgrade_replorigin_advance + /* lock to prevent the replication origin from vanishing */ + LockRelationOid(ReplicationOriginRelationId, RowExclusiveLock); + originid = replorigin_by_name(

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Amit Kapila
On Wed, Nov 15, 2023 at 3:58 PM Alvaro Herrera wrote: > > Translation-wise, this doesn't work, because you're building a string. > There's no reason to think that the words "logical" and "physical" > should stay untranslated; the message would make no sense, or at least > would be very ugly. > > Y

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Amit Kapila
On Thu, Nov 16, 2023 at 3:48 AM Peter Smith wrote: > > ~ > > SUGGESTION (#1a and #1b) > > ereport(log_replication_commands ? LOG : DEBUG1, > errmsg(SlotIsLogical(s) >? "acquired logical replication slot \"%s\"" >: "acquired physical replication slot \"%s\"",

Re: Remove MSVC scripts from the tree

2023-11-15 Thread Michael Paquier
On Wed, Nov 15, 2023 at 11:27:13AM +0100, Peter Eisentraut wrote: > (Note, however, that your rebase didn't pick up commits e7814b40d0 and > b41b1a7f49 that I did yesterday. Please check that again.) Indeed. I need to absorb that properly. -- Michael signature.asc Description: PGP signature

Re: Tab completion for CREATE TABLE ... AS

2023-11-15 Thread Michael Paquier
On Wed, Nov 15, 2023 at 05:26:58PM +0300, Gilles Darold wrote: > Right, I don't know how I have missed the sql-createtableas page in the > documentation. > > Patched v2 fixes the keyword list, I have also sorted by alphabetical order > the CREATE TABLE completion (AS was at the end of the list). >

Re: [HACKERS] Allow INSTEAD OF DELETE triggers to modify the tuple for RETURNING

2023-11-15 Thread jian he
On Fri, Nov 3, 2023 at 12:34 AM Marko Tiikkaja wrote: > > I am now. Thanks! :-) Will try to keep an eye on the builds in the future. > > Attached v4 of the patch which should fix the issue. > doc seems to still have an issue. https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest%2

Re: POC PATCH: copy from ... exceptions to: (was Re: VLDB Features)

2023-11-15 Thread jian he
On Thu, Nov 9, 2023 at 4:12 AM Tom Lane wrote: > > Daniel Gustafsson writes: > >> On 8 Nov 2023, at 19:18, Tom Lane wrote: > >> I think an actually usable feature of this sort would involve > >> copying all the failed lines to some alternate output medium, > >> perhaps a second table with a TEXT

Re: Add minimal C example and SQL registration example for custom table access methods.

2023-11-15 Thread Roberto Mello
Suggestion: In the C example you added you mention in the comment: + /* Methods from TableAmRoutine omitted from example, but all + non-optional ones must be provided here. */ Perhaps you could provide a "see " to point the reader finding your example where he could find these non-optional

Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM

2023-11-15 Thread Andres Freund
Hi, On 2023-11-15 16:32:48 -0500, Robert Haas wrote: > On Mon, Nov 13, 2023 at 8:26 PM Andres Freund wrote: > > I think this undersells the situation a bit. We right now do > > FreeSpaceMapVacuumRange() for 8GB of data (VACUUM_FSM_EVERY_PAGES) in the > > main > > fork, while holding an exclusive

Re: WaitEventSet resource leakage

2023-11-15 Thread Tom Lane
Heikki Linnakangas writes: > On 09/03/2023 20:51, Tom Lane wrote: >> After further thought that seems like a pretty ad-hoc solution. >> We probably can do no better in the back branches, but shouldn't >> we start treating WaitEventSets as ResourceOwner-managed resources? >> Otherwise, transient Wa

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tom Lane
Thomas Munro writes: > Idea #1 > For output, which happens with sprintf(ptr, "%.15g%s", ...) in > execute.c, perhaps we could use our in-tree Ryu routine instead? > For input, which happens with strtod() in data.c, rats, we don't have > a parser and I understand that it is not for the faint of h

Re: WaitEventSet resource leakage

2023-11-15 Thread Heikki Linnakangas
(Alexander just reminded me of this off-list) On 09/03/2023 20:51, Tom Lane wrote: In [1] I wrote: PG Bug reporting form writes: The following script: [ leaks a file descriptor per error ] Yeah, at least on platforms where WaitEventSets own kernel file descriptors. I don't think it's post

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Thomas Munro
On Thu, Nov 16, 2023 at 10:17 AM Tom Lane wrote: > Thomas Munro writes: > > The other uses of uselocale() are in ECPG code that must > > be falling back to the setlocale() path. In other words, isn't it the > > case that we don't require uselocale() to compile ECPG stuff, but it'll > > probably

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Peter Smith
Some minor comments for v17-0001. == 1. + ereport(log_replication_commands ? LOG : DEBUG1, + SlotIsLogical(s) + /* translator: %s is name of the replication slot */ + ? errmsg("acquired logical replication slot \"%s\"", +NameStr(

Re: Popcount optimization using AVX512

2023-11-15 Thread Nathan Bossart
On Wed, Nov 15, 2023 at 08:27:57PM +, Shankaran, Akash wrote: > AVX512 has light and heavy instructions. While the heavy AVX512 > instructions have clock frequency implications, the light instructions > not so much. See [0] for more details. We captured EMON data for the > benchmark used in thi

Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM

2023-11-15 Thread Robert Haas
On Mon, Nov 13, 2023 at 8:26 PM Andres Freund wrote: > I think this undersells the situation a bit. We right now do > FreeSpaceMapVacuumRange() for 8GB of data (VACUUM_FSM_EVERY_PAGES) in the main > fork, while holding an exclusive page level lock. That sounds fairly horrific? -- Robert Haas ED

Re: lazy_scan_heap() should release lock on buffer before vacuuming FSM

2023-11-15 Thread Melanie Plageman
On Tue, Nov 14, 2023 at 7:15 PM Andres Freund wrote: > > Hi, > > On 2023-11-14 07:46:10 -0500, Melanie Plageman wrote: > > > FreeSpaceMapVacuumRange()'s comment says: > > > * As above, but assume that only heap pages between start and end-1 > > > inclusive > > > * have new free-space informatio

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-11-15 Thread Peter Eisentraut
On 15.11.23 13:26, Amul Sul wrote: Question: Why are you using AT_PASS_ADD_OTHERCONSTR?  I don't know if it's right or wrong, but if you have a specific reason, it would be good to know. I referred to ALTER COLUMN DEFAULT and used that. Hmm, I'm not sure if that is a good compa

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tom Lane
Thomas Munro writes: > Currently pg_locale.c requires systems to have *either* uselocale() or > mbstowcs_l()/wcstombs_l(), but NetBSD satisfies the second > requirement. Check. > The other uses of uselocale() are in ECPG code that must > be falling back to the setlocale() path. In other words,

Re: typo in fallback implementation for pg_atomic_test_set_flag()

2023-11-15 Thread Nathan Bossart
On Wed, Nov 15, 2023 at 09:52:34AM -0600, Nathan Bossart wrote: > On Tue, Nov 14, 2023 at 07:17:32PM -0800, Andres Freund wrote: >> Are you planning to apply the fix? > > Yes, I'll take care of it. Committed and back-patched. I probably could've skipped back-patching this one since it doesn't se

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Thomas Munro
On Thu, Nov 16, 2023 at 9:51 AM Tom Lane wrote: > Thomas Munro writes: > > On Thu, Nov 16, 2023 at 6:45 AM Tom Lane wrote: > >> You would need to do some research and try to prove that that won't > >> be a problem on any modern platform. Presumably it once was a problem, > >> or we'd not have b

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tom Lane
Thomas Munro writes: > On Thu, Nov 16, 2023 at 6:45 AM Tom Lane wrote: >> You would need to do some research and try to prove that that won't >> be a problem on any modern platform. Presumably it once was a problem, >> or we'd not have bothered with a configure check. > According to data I scra

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-15 Thread Tom Lane
Daniel Gustafsson writes: > Since the 3DES/DES deprecations aren't limited to FIPS, do we want to do > anything for pgcrypto where we have DES/3DES encryption? Maybe a doc patch > which mentions the deprecation with a link to the SP could be in order? A docs patch that marks both MD5 and 3DES as

Re: Some performance degradation in REL_16 vs REL_15

2023-11-15 Thread Andres Freund
Hi, On 2023-11-15 10:09:06 -0500, Tom Lane wrote: > "Anton A. Melnikov" writes: > > I can't understand why i get the opposite results on my pc and on the > > server. It is clear that the absolute > > TPS values will be different for various configurations. This is normal. > > But differences? >

Re: [PoC] Federated Authn/z with OAUTHBEARER

2023-11-15 Thread Jacob Champion
On Thu, Nov 9, 2023 at 5:43 PM Andrey Chudnovsky wrote: > Do you plan to support adding an extension hook to validate the token? > > It would allow a more efficient integration, then spinning a separate process. I think an API in the style of archive modules might probably be a good way to go, ye

Re: pg_dump needs SELECT privileges on irrelevant extension table

2023-11-15 Thread Jacob Champion
> commit a70f2a57f233244c0a780829baf48c624187d456 > Author: Tom Lane > Date: Mon Nov 13 17:04:10 2023 -0500 > >Don't try to dump RLS policies or security labels for extension objects. (Thanks Tom!) --Jacob

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-15 Thread Nathan Bossart
Committed. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Thomas Munro
On Thu, Nov 16, 2023 at 7:42 AM Dagfinn Ilmari Mannsåker wrote: > Tom Lane writes: > > > "Tristan Partin" writes: > >> I would like to propose removing HAVE_USELOCALE, and just have WIN32, > >> which means that Postgres would require uselocale(3) on anything that > >> isn't WIN32. > > > > You wo

Re: Why do indexes and sorts use the database collation?

2023-11-15 Thread Jeff Davis
On Tue, 2023-11-14 at 13:01 +0100, Tomas Vondra wrote: > Presumably we'd no generate incorrect > results, but we'd not be able use an index, causing performance > issues. Couldn't use the index for its pathkeys or range scans, but could use it for equality. > AFAICS this is a trade-off between k

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tom Lane
=?utf-8?Q?Dagfinn_Ilmari_Manns=C3=A5ker?= writes: > Tom Lane writes: >> "Tristan Partin" writes: >>> I would like to propose removing HAVE_USELOCALE, and just have WIN32, >>> which means that Postgres would require uselocale(3) on anything that >>> isn't WIN32. >> You would need to do some re

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > "Tristan Partin" writes: >> I would like to propose removing HAVE_USELOCALE, and just have WIN32, >> which means that Postgres would require uselocale(3) on anything that >> isn't WIN32. > > You would need to do some research and try to prove that that won't > be a problem o

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Thomas Munro
On Thu, Nov 16, 2023 at 6:45 AM Tom Lane wrote: > "Tristan Partin" writes: > > I would like to propose removing HAVE_USELOCALE, and just have WIN32, > > which means that Postgres would require uselocale(3) on anything that > > isn't WIN32. > > You would need to do some research and try to prove t

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Bharath Rupireddy
On Wed, Nov 15, 2023 at 3:58 PM Alvaro Herrera wrote: > > Translation-wise, this doesn't work, because you're building a string. > There's no reason to think that the words "logical" and "physical" > should stay untranslated; the message would make no sense, or at least > would be very ugly. > > Y

Re: pg_upgrade and logical replication

2023-11-15 Thread vignesh C
On Mon, 13 Nov 2023 at 17:49, Amit Kapila wrote: > > On Mon, Nov 13, 2023 at 5:01 PM Amit Kapila wrote: > > > > On Fri, Nov 10, 2023 at 7:26 PM vignesh C wrote: > > > > > > Thanks for the comments, the attached v13 version patch has the > > > changes for the same. > > > > > > > + > > + Replicati

Re: pg_upgrade and logical replication

2023-11-15 Thread vignesh C
On Mon, 13 Nov 2023 at 17:02, Amit Kapila wrote: > > On Fri, Nov 10, 2023 at 7:26 PM vignesh C wrote: > > > > Thanks for the comments, the attached v13 version patch has the > > changes for the same. > > > > + > + ReplicationOriginNameForLogicalRep(subid, InvalidOid, originname, > sizeof(originna

Re: Some performance degradation in REL_16 vs REL_15

2023-11-15 Thread Andres Freund
Hi, On 2023-11-15 11:33:44 +0300, Anton A. Melnikov wrote: > The configure options and test scripts on my pc and server were the same: > export CFLAGS="-O2" > ./configure --enable-debug --with-perl --with-icu --enable-depend > --enable-tap-tests > #reinstall > #reinitdb > #create database bench >

Re: pg_upgrade and logical replication

2023-11-15 Thread vignesh C
On Mon, 13 Nov 2023 at 13:52, Peter Smith wrote: > > Here are some review comments for patch v13-0001 > > == > src/bin/pg_dump/pg_dump.c > > 1. getSubscriptionTables > > + int i_srsublsn; > + int i; > + int cur_rel = 0; > + int ntups; > > What is the difference between 'i' and 'cur_rel'? > > A

Re: Potential use-after-free in partion related code

2023-11-15 Thread Alvaro Herrera
On 2023-Nov-15, Andres Freund wrote: > partConstraint = list_concat(partBoundConstraint, > > RelationGetPartitionQual(rel)); > > At this point partBoundConstraint may not be used anymore, because > list_concat() might have real

Re: On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tom Lane
"Tristan Partin" writes: > I would like to propose removing HAVE_USELOCALE, and just have WIN32, > which means that Postgres would require uselocale(3) on anything that > isn't WIN32. You would need to do some research and try to prove that that won't be a problem on any modern platform. Presu

Re: pg_basebackup check vs Windows file path limits

2023-11-15 Thread Andrew Dunstan
On 2023-11-15 We 06:34, Alvaro Herrera wrote: On 2023-Nov-13, Andrew Dunstan wrote: size? https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-deviceiocontrol Hmm, here's what that page says - I can't see it saying what you're suggesting here - am I missing something?:

Re: remaining sql/json patches

2023-11-15 Thread Andres Freund
On 2023-11-15 09:11:19 -0800, Andres Freund wrote: > On 2023-11-15 22:00:41 +0900, Amit Langote wrote: > > > This causes a nontrivial increase in the size of the parser (~5% in an > > > optimized build here), I wonder if we can do better. > > > > Hmm, sorry if I sound ignorant but what do you mean

Re: remaining sql/json patches

2023-11-15 Thread Andres Freund
Hi, Thanks, this looks like a substantial improvement. I don't quite have time to look right now, but I thought I'd answer one question below. On 2023-11-15 22:00:41 +0900, Amit Langote wrote: > > This causes a nontrivial increase in the size of the parser (~5% in an > > optimized build here), I

Potential use-after-free in partion related code

2023-11-15 Thread Andres Freund
Hi, A while back I had proposed annotations for palloc() et al that let the compiler know about which allocators pair with what freeing functions. One thing that allows the compiler to do is to detect use after free. One such complaint is: ../../../../../home/andres/src/postgresql/src/backend/co

Re: Explicitly skip TAP tests under Meson if disabled

2023-11-15 Thread Andres Freund
On 2023-11-15 11:02:19 +0100, Peter Eisentraut wrote: > On 04.11.23 01:51, Andres Freund wrote: > > I'd just use a single test() invocation here, and add an argument to > > testwrap > > indicating that it should print out the skipped message. That way we a) > > don't > > need two test() invocatio

Re: BUG #18097: Immutable expression not allowed in generated at

2023-11-15 Thread Aleksander Alekseev
Hi, > True, but from the perspective of the affected code, the question is > basically "did you call expression_planner() yet". So I like this > naming for that connection, whereas something based on "transformation" > doesn't really connect to anything in existing function names. Fair enough.

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-15 Thread Nathan Bossart
On Wed, Nov 15, 2023 at 09:27:18AM +0530, Amul Sul wrote: > Nevermind, I usually use git apply or git am, here are those errors: > > PG/ - (master) $ git apply ~/Downloads/retire_compatibility_macro_v1.patch > error: patch failed: src/backend/access/brin/brin.c:297 > error: src/backend/access/brin

Re: typo in fallback implementation for pg_atomic_test_set_flag()

2023-11-15 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 07:17:32PM -0800, Andres Freund wrote: > Are you planning to apply the fix? Yes, I'll take care of it. >> I'd ordinarily suggest removing this section of code since it doesn't seem >> to have gotten much coverage > > Which section precisely? The lines below this:

Re: BUG #18097: Immutable expression not allowed in generated at

2023-11-15 Thread Tom Lane
Aleksander Alekseev writes: >>> Oh no! We encountered one of the most difficult problems in computer >>> science [1]. >> Indeed :-(. Looking at it again this morning, I'm thinking of >> using "contain_mutable_functions_after_planning" --- what do you >> think of that? > It's better but creates

Re: Fix documentation for pg_stat_statements JIT deform_counter

2023-11-15 Thread Julien Rouhaud
On Wed, Nov 15, 2023 at 01:53:13PM +0100, Daniel Gustafsson wrote: > > On 11 Nov 2023, at 10:26, Julien Rouhaud wrote: > > > I was adding support for the new pg_stat_statements JIT deform_counter in > > PoWA > > when I realized that those were added after jit_generation_time in the > > documentat

Re: Some performance degradation in REL_16 vs REL_15

2023-11-15 Thread Tom Lane
"Anton A. Melnikov" writes: > I can't understand why i get the opposite results on my pc and on the server. > It is clear that the absolute > TPS values will be different for various configurations. This is normal. But > differences? > Is it unlikely that some kind of reference configuration is

Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'

2023-11-15 Thread Alexander Korotkov
On Wed, Nov 15, 2023 at 8:02 AM Andres Freund wrote: > On 2023-11-14 19:14:57 +0800, Richard Guo wrote: > > While working on BUG #18187 [1], I noticed that we also have issues with > > how SJE replaces join clauses involving the removed rel. As an example, > > consider the query below, which woul

Re: Assert failure on 'list_member_ptr(rel->joininfo, restrictinfo)'

2023-11-15 Thread Alexander Korotkov
On Wed, Nov 15, 2023 at 8:04 AM Andres Freund wrote: > > On 2023-11-14 14:42:13 +0200, Alexander Korotkov wrote: > > It's possibly dumb option, but what about just removing the assert? > > That's not at all an option - the in-place bms_* functions can free their > input. So a dangling pointer to t

Re: Tab completion for CREATE TABLE ... AS

2023-11-15 Thread Gilles Darold
Le 15/11/2023 à 03:58, Michael Paquier a écrit : On Thu, Nov 02, 2023 at 07:27:02PM +0300, Gilles Darold wrote: Look like the tab completion for CREATE TABLE ... AS is not proposed. + /* Complete CREATE TABLE AS with list of keywords */ + else if (TailMatches("CREATE", "TABLE", Mat

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-15 Thread Daniel Gustafsson
> On 15 Nov 2023, at 12:44, Peter Eisentraut wrote: > > On 15.11.23 00:07, Tom Lane wrote: >> I'm more concerned about the 3DES situation. Fedora might be a bit >> ahead of the curve here, but according to the link above, everybody is >> supposed to be in compliance by the end of 2023. So I'd b

Re: [PATCH] pgbench log file headers

2023-11-15 Thread Adam Hendel
Hello On Mon, Nov 13, 2023 at 6:01 PM Andres Freund wrote: > Hi, > > On 2023-11-13 11:55:07 -0600, Adam Hendel wrote: > > Currently, pgbench will log individual transactions to a logfile when the > > `--log` parameter flag is provided. The logfile, however, does not > include > > column header.

Re: trying again to get incremental backup

2023-11-15 Thread Jakub Wartak
Hi Robert, [..spotted the v9 patchset..] so I've spent some time playing still with patchset v8 (without the 6/6 testing patch related to wal_level=minimal), with the exception of - patchset v9 - marked otherwise. 1. On compile time there were 2 warnings to shadowing variable (at least with gcc

Re: Fix documentation for pg_stat_statements JIT deform_counter

2023-11-15 Thread Daniel Gustafsson
> On 11 Nov 2023, at 10:26, Julien Rouhaud wrote: > I was adding support for the new pg_stat_statements JIT deform_counter in PoWA > when I realized that those were added after jit_generation_time in the > documentation while they're actually at the end of the view. Nice catch, that was indeed a

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-11-15 Thread Amul Sul
On Wed, Nov 15, 2023 at 5:09 PM Peter Eisentraut wrote: > On 14.11.23 11:40, Amul Sul wrote: > > Please have a look at the attached version, updating the syntax to have > "AS" > > after EXPRESSION and other changes suggested previously. > > The code structure looks good to me now. > Thank you fo

Re: RFC: Pluggable TOAST

2023-11-15 Thread Matthias van de Meent
On Tue, 14 Nov 2023, 14:12 Nikita Malakhov, wrote: > > Hi! > > Matthias, regarding your message above, I have a question to ask. > On typed TOAST implementations - we thought that TOAST method used > for storing data could depend not only on data type, but on the flow or > workload, > like out by

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-15 Thread Peter Eisentraut
On 15.11.23 00:07, Tom Lane wrote: I'm more concerned about the 3DES situation. Fedora might be a bit ahead of the curve here, but according to the link above, everybody is supposed to be in compliance by the end of 2023. So I'd be inclined to guess that the 3DES-is-rejected case is going to be

Re: BUG #18097: Immutable expression not allowed in generated at

2023-11-15 Thread Aleksander Alekseev
Hi, > > Oh no! We encountered one of the most difficult problems in computer > > science [1]. > > Indeed :-(. Looking at it again this morning, I'm thinking of > using "contain_mutable_functions_after_planning" --- what do you > think of that? It's better but creates an impression that the actua

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-11-15 Thread Peter Eisentraut
On 14.11.23 11:40, Amul Sul wrote: Please have a look at the attached version, updating the syntax to have "AS" after EXPRESSION and other changes suggested previously. The code structure looks good to me now. Question: Why are you using AT_PASS_ADD_OTHERCONSTR? I don't know if it's right or

Re: MERGE ... RETURNING

2023-11-15 Thread Dean Rasheed
On Mon, 13 Nov 2023 at 05:29, jian he wrote: > > v13 works fine. all tests passed. The code is very intuitive. played > with multi WHEN clauses, even with before/after row triggers, work as > expected. > Thanks for the review and testing! > I don't know when replace_outer_merging will be invoked

Re: pg_basebackup check vs Windows file path limits

2023-11-15 Thread Alvaro Herrera
On 2023-Nov-13, Andrew Dunstan wrote: > > size? > > > > https://learn.microsoft.com/en-us/windows/win32/api/ioapiset/nf-ioapiset-deviceiocontrol > > Hmm, here's what that page says - I can't see it saying what you're > suggesting here - am I missing something?: I don't think so. I think I just

Re: Adding facility for injection points (or probe points?) for more advanced tests

2023-11-15 Thread Alvaro Herrera
On 2023-Nov-15, Michael Paquier wrote: > On Tue, Nov 14, 2023 at 02:11:50PM +0100, Alvaro Herrera wrote: > > You named the hash table InjectionPointHashByName, which seems weird. > > Is there any *other* way to locate an injection point that is not by > > name? > > I am not sure what you mean he

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Alvaro Herrera
Translation-wise, this doesn't work, because you're building a string. There's no reason to think that the words "logical" and "physical" should stay untranslated; the message would make no sense, or at least would be very ugly. You should do something like if (am_walsender) { ereport(log

On non-Windows, hard depend on uselocale(3)

2023-11-15 Thread Tristan Partin
I have been working on adding using thread-safe locale APIs within Postgres where appropriate[0]. The patch that I originally submitted crashed during initdb (whoops!), so I worked on fixing the crash, which led me to having to touch some code in chklocale.c, which became a frustrating experien

Re: Remove MSVC scripts from the tree

2023-11-15 Thread Peter Eisentraut
On 15.11.23 05:49, Michael Paquier wrote: Attached is a v4. I'm happy with that. (Note, however, that your rebase didn't pick up commits e7814b40d0 and b41b1a7f49 that I did yesterday. Please check that again.)

Re: Fix some memory leaks in ecpg.addons

2023-11-15 Thread Tristan Partin
On Wed Nov 8, 2023 at 11:52 AM CST, Tom Lane wrote: "Tristan Partin" writes: > On Wed Nov 8, 2023 at 11:18 AM CST, Michael Meskes wrote: >> Agreed, it's not exactly uncommon for tools like ecpg to not worry >> about memory. After all it gets freed when the program ends. > In the default configu

Re: ResourceOwner refactoring

2023-11-15 Thread Heikki Linnakangas
On 13/11/2023 01:08, Thomas Munro wrote: On Mon, Nov 13, 2023 at 11:16 AM Heikki Linnakangas wrote: On 11/11/2023 14:00, Alexander Lakhin wrote: 10.11.2023 17:26, Heikki Linnakangas wrote: I think that is surprising behavior from the DSA facility. When you make allocations with dsa_allocate(

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-15 Thread Daniel Gustafsson
> On 15 Nov 2023, at 00:07, Tom Lane wrote: > (In reality, people running FIPS mode are probably pretty > accustomed to seeing this error, so maybe it's not worth the > trouble to improve it.) In my experience this holds a lot of truth, this is a common error pattern and while all improvements t

Re: Explicitly skip TAP tests under Meson if disabled

2023-11-15 Thread Peter Eisentraut
On 04.11.23 01:51, Andres Freund wrote: I'd just use a single test() invocation here, and add an argument to testwrap indicating that it should print out the skipped message. That way we a) don't need two test() invocations, b) could still see the test name etc in the test invocation. Here is a

Re: add log messages when replication slots become active and inactive (was Re: Is it worth adding ReplicationSlot active_pid to ReplicationSlotPersistentData?)

2023-11-15 Thread Amit Kapila
On Wed, Nov 15, 2023 at 11:00 AM Bharath Rupireddy wrote: > > PSA v15 patch. > The patch looks good to me. I have slightly modified the translator message and commit message in the attached. I'll push this tomorrow unless there are any comments. -- With Regards, Amit Kapila. v16-0001-Log-mess

Re: Some performance degradation in REL_16 vs REL_15

2023-11-15 Thread Anton A. Melnikov
On 30.10.2023 22:51, Andres Freund wrote: There's really no point in comparing peformance with assertions enabled (leaving aside assertions that cause extreme performance difference, making development harder). We very well might have added assertions making things more expensive, without affect