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

2023-11-14 Thread Michael Paquier
On Wed, Nov 15, 2023 at 11:58:38AM +0900, torikoshia wrote: > On 2023-11-15 09:47, Michael Paquier wrote: >> You have forgotten to update the errhint at the end of >> pg_stat_reset_shared(), where "slru" needs to be listed :) > > Oops, attached v2 patch. +SELECT stats_reset >

Re: Output affected rows in EXPLAIN

2023-11-14 Thread kuroda . keisuke
Hi hackers, Indeed, I think it is a little confusing that when executing EXPLAIN(ANALYZE), even though an update is actually occurring, the commandtag of the update result is not returned. However, the manual also describes the information that will be affected when EXPLAIN (ANALYZE) is

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

2023-11-14 Thread Peter Smith
Patch v15-0001 LGTM. == Kind Regards, Peter Smith. Fujitsu Australia

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

2023-11-14 Thread Andres Freund
Hi, 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 the "old" version is a use-after-free waiting to happen -

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

2023-11-14 Thread Andres Freund
Hi, 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 would trigger an Assert. > > create table t (a int primary

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

2023-11-14 Thread Bharath Rupireddy
On Wed, Nov 15, 2023 at 9:49 AM Amit Kapila wrote: > > On Wed, Nov 15, 2023 at 4:40 AM Peter Smith wrote: > > > > Thanks for addressing my previous comments. Patch v14-0001 looks good > > to me, except I have one question: > > > > The patch uses errmsg_internal() for the logging, but I noticed

Re: CREATE FUNCTION ... SEARCH { DEFAULT | SYSTEM | SESSION }

2023-11-14 Thread Jeff Davis
On Mon, 2023-09-25 at 11:30 -0400, Robert Haas wrote: > > That's what this whole thread is about: I wish it was reasonable, > > but I > > don't think the tools we provide today make it reasonable. You > > expect > > Bob to do something like: > > > >   CREATE FUNCTION ... SET search_path =

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

2023-11-14 Thread Amit Kapila
On Wed, Nov 15, 2023 at 4:40 AM Peter Smith wrote: > > Thanks for addressing my previous comments. Patch v14-0001 looks good > to me, except I have one question: > > The patch uses errmsg_internal() for the logging, but I noticed the > only other code using GUC 'log_replication_commands' has

Re: Faster "SET search_path"

2023-11-14 Thread Jeff Davis
On Thu, 2023-10-19 at 19:01 -0700, Jeff Davis wrote: > 0003: Cache for recomputeNamespacePath. Committed with some further simplification around the OOM handling. Instead of using MCXT_ALLOC_NO_OOM, it just temporarily sets the cache invalid while copying the string, and sets it valid again

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Amul Sul
On Tue, Nov 14, 2023 at 9:21 PM Nathan Bossart wrote: > On Tue, Nov 14, 2023 at 04:25:24PM +0530, Amul Sul wrote: > > Changes looks pretty much straight forward, but patch failed to apply on > the > > latest master head(b41b1a7f490) at me. > > Thanks for taking a look. Would you mind sharing

Re: typo in fallback implementation for pg_atomic_test_set_flag()

2023-11-14 Thread Andres Freund
Hi, On 2023-11-13 21:54:39 -0600, Nathan Bossart wrote: > I noticed that the fallback pg_atomic_test_set_flag_impl() implementation > that uses atomic-exchange is giving pg_atomic_exchange_u32_impl() an extra > argument. This appears to be copy/pasted from the atomic-compare-exchange > version a

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

2023-11-14 Thread torikoshia
On 2023-11-15 09:47, Michael Paquier wrote: On Tue, Nov 14, 2023 at 10:02:32PM +0900, torikoshia wrote: Attached patch. You have forgotten to update the errhint at the end of pg_stat_reset_shared(), where "slru" needs to be listed :) Oops, attached v2 patch. BTW currently the

Re: A recent message added to pg_upgade

2023-11-14 Thread Michael Paquier
On Wed, Nov 15, 2023 at 07:58:06AM +0530, Amit Kapila wrote: > I am fine with this but there is no harm in doing this before or along > with the main patch. As of now, I don't see any problem but as the > main patch is still under review, so thought we could even wait for > the patch to become

Re: A recent message added to pg_upgade

2023-11-14 Thread Amit Kapila
On Mon, Nov 13, 2023 at 10:19 AM Michael Paquier wrote: > > On Mon, Nov 13, 2023 at 08:45:12AM +0530, Amit Kapila wrote: > > I think we can be specific about logical replication stuff. I have not > > done any study on autovacuum behavior related to this, so we can > > update about it separately

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

2023-11-14 Thread zhihuifan1213
Damir Belyalov writes: > Here is a very straw-man-level sketch of what I think might work. > The option to COPY FROM looks something like > >ERRORS TO other_table_name (item [, item [, ...]]) > > I tried to implement the patch using a table and came across a number of > questions.

Re: Tab completion for CREATE TABLE ... AS

2023-11-14 Thread Michael Paquier
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", MatchAny, "AS") || > +

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

2023-11-14 Thread Michael Paquier
On Tue, Nov 14, 2023 at 10:02:32PM +0900, torikoshia wrote: > Attached patch. You have forgotten to update the errhint at the end of pg_stat_reset_shared(), where "slru" needs to be listed :) > BTW currently the documentation explains all the arguments of > pg_stat_reset_shared() in one line and

Re: meson documentation build open issues

2023-11-14 Thread Andres Freund
Hi, On 2023-11-14 16:22:31 -0800, Andres Freund wrote: > > v2-0004-meson-Add-world-target.patch > > > > AFAICT, this world target doesn't include the man target. (Again, this > > would all work better if we added "man" to "docs".) > > I agree with that sentiment - I only moved to the current

Re: meson documentation build open issues

2023-11-14 Thread Andres Freund
Hi, On 2023-11-14 11:58:53 +0100, Peter Eisentraut wrote: > On 09.11.23 18:52, Andres Freund wrote: > > I think if we want to do this, we'd need a configure time check for being > > able > > to validate a document with > > > V4.5//EN""http://www.oasis-open.org/docbook/xml/4.5/docbookx.dtd;... >

Re: meson documentation build open issues

2023-11-14 Thread Andres Freund
Hi, On 2023-11-14 21:16:13 +0100, Peter Eisentraut wrote: > Some comments on your patches: > > v2-0001-meson-Change-default-of-selinux-feature-option-to.patch > > Ok > > v2-0002-docs-Document-with-selinux-Dselinux-options-centr.patch > > Ok, but "selinux" should be "SELinux" when referring to

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

2023-11-14 Thread Andres Freund
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 information, so update only the upper-level slots > > * covering that block

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

2023-11-14 Thread Jeff Davis
On Wed, 2023-11-15 at 00:52 +0100, Matthias van de Meent wrote: > That doesn't really answer the question for me. Why would you have a > primary key that has different collation rules (which include > equality > rules) The equality rules for all deterministic collations are the same: if the bytes

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

2023-11-14 Thread Matthias van de Meent
On Wed, 15 Nov 2023 at 00:28, Jeff Davis wrote: > > On Tue, 2023-11-14 at 14:47 -0500, Tom Lane wrote: > > Why should that ever be different from the column's own declared > > collation? > > Because an index with the "C" collation is more efficient in terms of > building/maintaining/searching the

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

2023-11-14 Thread Jeff Davis
On Tue, 2023-11-14 at 14:47 -0500, Tom Lane wrote: > Why should that ever be different from the column's own declared > collation? Because an index with the "C" collation is more efficient in terms of building/maintaining/searching the index, and it also doesn't carry risks of corrupting your PK

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

2023-11-14 Thread Peter Smith
Hi, Thanks for addressing my previous comments. Patch v14-0001 looks good to me, except I have one question: The patch uses errmsg_internal() for the logging, but I noticed the only other code using GUC 'log_replication_commands' has errmsg() instead of errmsg_internal(). Isn't it better to be

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-14 Thread Tom Lane
Peter Eisentraut writes: > On 05.10.23 22:55, Tom Lane wrote: >> I found another bit of fun we'll need to deal with: on my F38 >> platform, pgcrypto/3des fails as attached. Some googling finds >> this relevant info: >> https://github.com/pyca/cryptography/issues/6875 >> That is, FIPS deprecation

Re: Issue with launching PGAdmin 4 on Mac OC

2023-11-14 Thread Kanmani Thamizhanban
Thanks for your email Erik! I’ll check it out. Regards, Kanmani On Tue, Nov 14, 2023 at 12:40 PM Erik Wienhold wrote: > On 2023-11-14 18:13 +0100, Kanmani Thamizhanban wrote: > > Good day! I'm not able to launch Postgres PGAdmin 4 in my MAC OS, I have > > tried with both versions 15 and 16,

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

2023-11-14 Thread Michael Paquier
On Tue, Nov 14, 2023 at 02:11:50PM +0100, Alvaro Herrera wrote: > Good stuff here, I also have a bunch of bugfix commits that ended up not > having a test because of the need for a debugger or other interaction, > so let's move forward. > > I think the docs (and the macro/function naming)

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 08:20:08PM +0100, Alvaro Herrera wrote: > Oh, I don't. (But I wouldn't mind putting pg_attribute_deprecated to > good use elsewhere ... not that I have any specific examples handy.) Agreed. > Your S key seems to be doing some funny business. I seem to have accidentally

Re: meson documentation build open issues

2023-11-14 Thread Peter Eisentraut
Some comments on your patches: v2-0001-meson-Change-default-of-selinux-feature-option-to.patch Ok v2-0002-docs-Document-with-selinux-Dselinux-options-centr.patch Ok, but "selinux" should be "SELinux" when referring to the product. v2-0003-meson-docs-Add-doc-html-man-targets.patch We have

Re: pgsql: doc: fix wording describing the checkpoint_flush_after GUC

2023-11-14 Thread Andres Freund
Hi, On 2023-11-14 17:49:59 +0100, Alvaro Herrera wrote: > On 2023-Nov-13, Andres Freund wrote: > > On 2023-11-13 12:31:42 +0100, Alvaro Herrera wrote: > > > On 2023-Nov-09, Bruce Momjian wrote: > > > > > > > doc: fix wording describing the checkpoint_flush_after GUC > > > > > > Hmm. Is this new

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

2023-11-14 Thread Tom Lane
Jeff Davis writes: > On Tue, 2023-11-14 at 17:15 +0100, Peter Eisentraut wrote: >> The problem is that the user has no way to declare whether they just >> want this. > We should add a way to declare that a primary key should create an > index in a particular collation. Why should that ever be

Re: Implement missing join selectivity estimation for range types

2023-11-14 Thread Tom Lane
Schoemans Maxime writes: > You can find attached a new version of the patch that can be applied on > the current master branch of postgres. I took a brief look through this very interesting work. I concur with Tomas that it feels a little odd that range join selectivity would become smarter

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

2023-11-14 Thread Jeff Davis
On Tue, 2023-11-14 at 17:15 +0100, Peter Eisentraut wrote: > On 14.11.23 02:58, Jeff Davis wrote: > > If the user just wants PK/FK constraints, and equality lookups, > > then an > > index with the "C" collation makes a lot of sense to serve those > > purposes. > > The problem is that the user has

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Alvaro Herrera
On 2023-Nov-14, Nathan Bossart wrote: > On Tue, Nov 14, 2023 at 12:10:41PM -0500, Tom Lane wrote: > > FWIW, I think it's fine to just nuke MemoryContextResetAndDeleteChildren. > > We ask extension authors to deal with much more significant API changes > > than that in every release, and versions

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 10:46:25PM +0530, Bharath Rupireddy wrote: > FWIW, there are other backward compatibility macros out there like > tuplestore_donestoring which was introduced by commit dd04e95 21 years > ago and SPI_push() and its friends which were made no-ops macros by > commit 1833f1a 7

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 12:10:41PM -0500, Tom Lane wrote: > FWIW, I think it's fine to just nuke MemoryContextResetAndDeleteChildren. > We ask extension authors to deal with much more significant API changes > than that in every release, and versions where the updated code wouldn't > work are long

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

2023-11-14 Thread Tom Lane
Aleksander Alekseev writes: >> There are a couple of points worth bikeshedding perhaps. I didn't >> spend much thought on the wrapper functions' names, but it's surely >> true that the semantic difference between contain_mutable_functions >> and ContainMutableFunctions is quite un-apparent from

Re: Issue with launching PGAdmin 4 on Mac OC

2023-11-14 Thread Erik Wienhold
On 2023-11-14 18:13 +0100, Kanmani Thamizhanban wrote: > Good day! I'm not able to launch Postgres PGAdmin 4 in my MAC OS, I have > tried with both versions 15 and 16, but nothing is working. It says that it > has quit unexpectedly (screenshot attached). I have attached the bug report > as well

Re: Fix output of zero privileges in psql

2023-11-14 Thread Erik Wienhold
On 2023-11-13 21:49 +0100, Tom Lane wrote: > Patch pushed with minor adjustments, mainly rewriting some comments. Thanks a lot! -- Erik

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Bharath Rupireddy
On Tue, Nov 14, 2023 at 9:50 PM Alvaro Herrera wrote: > > On 2023-Nov-13, Nathan Bossart wrote: > > > Shall we retire this backwards compatibility macro at this point? A search > > of https://codesearch.debian.net/ does reveal a few external uses, so we > > could alternatively leave it around

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Tom Lane
Nathan Bossart writes: >> It might be worth introducing pg_attribute_deprecated() in c.h. I'm not >> too worried about this particular macro, but it seems handy in general. > Huh, this was brought up before [0]. > [0] https://postgr.es/m/20200825183002.fkvzxtneijsdgrfv%40alap3.anarazel.de

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 11:01:15AM -0600, Nathan Bossart wrote: > On Tue, Nov 14, 2023 at 04:36:44PM +, Dagfinn Ilmari Mannsåker wrote: >> There's also __attribute__((deprecated)) (and and __declspec(deprecated) >> for MSVC), but that can AFAIK only be attached to functions and >> variables,

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 04:36:44PM +, Dagfinn Ilmari Mannsåker wrote: > Is there a preprocessor symbol that is defined when building Postgres > itself (and extensions in /contrib/), but not third-party extensions (or > vice versa)? If so, the macro could be guarded by that, so that uses >

Re: pgsql: doc: fix wording describing the checkpoint_flush_after GUC

2023-11-14 Thread Alvaro Herrera
Hola-hallo, On 2023-Nov-13, Andres Freund wrote: > On 2023-11-13 12:31:42 +0100, Alvaro Herrera wrote: > > On 2023-Nov-09, Bruce Momjian wrote: > > > > > doc: fix wording describing the checkpoint_flush_after GUC > > > > Hmm. Is this new wording really more clear than the original wording? > >

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Dagfinn Ilmari Mannsåker
Alvaro Herrera writes: > On 2023-Nov-13, Nathan Bossart wrote: > >> Shall we retire this backwards compatibility macro at this point? A search >> of https://codesearch.debian.net/ does reveal a few external uses, so we >> could alternatively leave it around and just update Postgres to stop

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 05:20:16PM +0100, Alvaro Herrera wrote: > Let's leave the macro around and just remove its uses in PGDG-owned > code. Having the macro around hurts nothing, and we can remove it in 15 > years or so. WFM -- Nathan Bossart Amazon Web Services: https://aws.amazon.com

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Alvaro Herrera
On 2023-Nov-13, Nathan Bossart wrote: > Shall we retire this backwards compatibility macro at this point? A search > of https://codesearch.debian.net/ does reveal a few external uses, so we > could alternatively leave it around and just update Postgres to stop using > it, but I don't think it

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

2023-11-14 Thread Peter Eisentraut
On 14.11.23 02:58, Jeff Davis wrote: If the user just wants PK/FK constraints, and equality lookups, then an index with the "C" collation makes a lot of sense to serve those purposes. The problem is that the user has no way to declare whether they just want this. The default assumption is

Re: should check collations when creating partitioned index

2023-11-14 Thread Tom Lane
Peter Eisentraut writes: > On 13.11.23 21:04, Laurenz Albe wrote: >> This will be backpatched, right? What if somebody already created an index >> like that? >> Does this warrant an entry in the "however" for the release notes, or is the >> case >> exotic enough that we can assume that nobody

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 10:59:04AM -0500, Tom Lane wrote: > Nathan Bossart writes: >> On Tue, Nov 14, 2023 at 04:25:24PM +0530, Amul Sul wrote: >>> Changes looks pretty much straight forward, but patch failed to apply on the >>> latest master head(b41b1a7f490) at me. > >> Thanks for taking a

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

2023-11-14 Thread Peter Eisentraut
On 13.11.23 17:49, Jeff Davis wrote: On Mon, 2023-11-13 at 13:43 +0100, Peter Eisentraut wrote: On 11.11.23 01:03, Jeff Davis wrote: But the database collation is always deterministic, So far! Yeah, if we did that, clearly the index collation would need to match that of the database to be

Re: should check collations when creating partitioned index

2023-11-14 Thread Peter Eisentraut
On 13.11.23 21:04, Laurenz Albe wrote: On Mon, 2023-11-13 at 10:24 +0100, Peter Eisentraut wrote: * If this table is partitioned and we're creating a unique index, primary * key, or exclusion constraint, make sure that the partition key is a * subset of the index's columns.

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Tom Lane
Nathan Bossart writes: > On Tue, Nov 14, 2023 at 04:25:24PM +0530, Amul Sul wrote: >> Changes looks pretty much straight forward, but patch failed to apply on the >> latest master head(b41b1a7f490) at me. > Thanks for taking a look. Would you mind sharing the error(s) you are > seeing? The

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Nathan Bossart
On Tue, Nov 14, 2023 at 04:25:24PM +0530, Amul Sul wrote: > Changes looks pretty much straight forward, but patch failed to apply on the > latest master head(b41b1a7f490) at me. Thanks for taking a look. Would you mind sharing the error(s) you are seeing? The patch applies fine on cfbot and my

Re: Synchronizing slots from primary to standby

2023-11-14 Thread Drouvot, Bertrand
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_ reserved wording proposal, which seems to be the case as probably not worth the extra

Re: Array initialisation notation in syscache.c

2023-11-14 Thread Alvaro Herrera
On 2023-Nov-14, Thomas Munro wrote: > I suppose we could also supply a set of macros with the numbers that > map straight onto the numberless ones, with a note that they will be > deleted after N releases. Maybe just keep compatibility ones with 1 and 2 arguments (the ones most used) forever, or

Re: trying again to get incremental backup

2023-11-14 Thread Alvaro Herrera
0001 looks OK to push, and since it stands on its own I would get it out of the way soon rather than waiting for the rest of the series to be further reviewed. 0002: This moves bin/pg_verifybackup/parse_manifest.c to common/parse_manifest.c, where it's not clear that it's for backup manifests

Re: RFC: Pluggable TOAST

2023-11-14 Thread Nikita Malakhov
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 bytea appendable toaster which is much (hundreds of times) faster on

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

2023-11-14 Thread Alvaro Herrera
Hello, Good stuff here, I also have a bunch of bugfix commits that ended up not having a test because of the need for a debugger or other interaction, so let's move forward. I think the docs (and the macro/function naming) describe things backwards. In my mind, it is INJECTION_POINT_RUN() that

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

2023-11-14 Thread torikoshia
On 2023-11-13 13:15, torikoshia wrote: On 2023-11-12 16:46, Michael Paquier wrote: On Fri, Nov 10, 2023 at 01:15:50PM +0900, Michael Paquier wrote: The comments added could be better grammatically, but basically LGTM. I'll take care of that if there are no objections. The documentation also

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

2023-11-14 Thread Melanie Plageman
On Mon, Nov 13, 2023 at 8:26 PM Andres Freund wrote: > On 2023-11-13 17:13:32 -0500, Melanie Plageman wrote: > > diff --git a/src/backend/access/heap/vacuumlazy.c > > b/src/backend/access/heap/vacuumlazy.c > > index 6985d299b2..8b729828ce 100644 > > --- a/src/backend/access/heap/vacuumlazy.c > >

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

2023-11-14 Thread Alexander Korotkov
Hi! Thank you for spotting this and dealing with this. On Tue, Nov 14, 2023 at 1:15 PM 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 would

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

2023-11-14 Thread Aleksander Alekseev
Hi, I noticed that the patchset needs a review and decided to take a look. > There are a couple of points worth bikeshedding perhaps. I didn't > spend much thought on the wrapper functions' names, but it's surely > true that the semantic difference between contain_mutable_functions > and

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

2023-11-14 Thread Tomas Vondra
On 11/14/23 02:58, Jeff Davis wrote: > On Mon, 2023-11-13 at 22:36 +0100, Tomas Vondra wrote: >> Yeah. I don't quite agree with the initial argument that not >> specifying >> the collation explicitly in CREATE TABLE or a query means the user >> does >> not care about the collation. > > I

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

2023-11-14 Thread Michael Paquier
On Fri, Nov 10, 2023 at 06:32:27PM -0800, Andres Freund wrote: > I would like to see a few example tests using this facility - without that > it's a bit hard to judge how the impact on core code would be and how easy > tests are to write. Sure. I was wondering if people would be interested in

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

2023-11-14 Thread Richard Guo
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 would trigger an Assert. create table t (a int primary key, b int); explain (costs off) select * from t t1 inner

Re: Infinite Interval

2023-11-14 Thread Dean Rasheed
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. Regards, Dean

Re: meson documentation build open issues

2023-11-14 Thread Peter Eisentraut
On 09.11.23 18:52, Andres Freund wrote: Besides giving you a quick validity check of the XML, this also builds the doc_generated, which draw from non-doc source files, so this would also serve to check that those are sound and didn't mess up the docs. Unfortunately presence of xmllint doesn't

Re: retire MemoryContextResetAndDeleteChildren backwards compatibility macro

2023-11-14 Thread Amul Sul
On Tue, Nov 14, 2023 at 12:30 AM Nathan Bossart wrote: > I just found myself researching the difference between MemoryContextReset() > and MemoryContextResetAndDeleteChildren(), and it turns out that as of > commit eaa5808 (2015), there is none. > MemoryContextResetAndDeleteChildren() is just a

Re: Allow tests to pass in OpenSSL FIPS mode

2023-11-14 Thread Peter Eisentraut
On 05.10.23 22:55, Tom Lane wrote: I found another bit of fun we'll need to deal with: on my F38 platform, pgcrypto/3des fails as attached. Some googling finds this relevant info: https://github.com/pyca/cryptography/issues/6875 That is, FIPS deprecation of 3DES is happening even as we speak.

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

2023-11-14 Thread Amul Sul
On Mon, Nov 13, 2023 at 9:09 PM Peter Eisentraut wrote: > On 13.11.23 14:07, Amul Sul wrote: > > Also, it seems to me that the SET EXPRESSION variant should just do > an > > update of the catalog table instead of a drop and re-insert. > > > > I am not sure if that is sufficient; we need

Re: building with meson on windows with ssl

2023-11-14 Thread Dave Cramer
On Mon, 13 Nov 2023 at 20:56, Andres Freund wrote: > Hi, > > On 2023-11-12 11:41:15 -0500, Dave Cramer wrote: > > On Sun, 12 Nov 2023 at 07:57, Dave Cramer wrote: > > > I am getting the following error > > > building on HEAD > > > > > > Library crypto found: YES > > > Checking for function

Re: Remove MSVC scripts from the tree

2023-11-14 Thread Peter Eisentraut
Other than the documentation details and the business about Gen_dummy_probes, which has been dealt with separately, this patch looks solid to me. On 12.10.23 07:23, Michael Paquier wrote: On Thu, Oct 05, 2023 at 09:38:51AM +0200, Peter Eisentraut wrote: - I think we can't just delete

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

2023-11-14 Thread Alena Rybakina
Hi! On 14.11.2023 13:10, Damir Belyalov wrote:  Here is a very straw-man-level sketch of what I think might work.  The option to COPY FROM looks something like       ERRORS TO other_table_name (item [, item [, ...]]) I tried to implement the patch using a table and came across a

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

2023-11-14 Thread Damir Belyalov
> Here is a very straw-man-level sketch of what I think might work. > The option to COPY FROM looks something like > > ERRORS TO other_table_name (item [, item [, ...]]) > I tried to implement the patch using a table and came across a number of questions. Which table should we implement

Re: Remove MSVC scripts from the tree

2023-11-14 Thread Peter Eisentraut
On 13.11.23 06:30, Michael Paquier wrote: On Fri, Nov 10, 2023 at 08:38:21AM +0100, Peter Eisentraut wrote: How about this patch as a comprehensive solution? 8 files changed, 26 insertions(+), 339 deletions(-) Thanks for the patch. The numbers are here, and the patch looks sensible. The

Re: trying again to get incremental backup

2023-11-14 Thread Dilip Kumar
On Tue, Nov 14, 2023 at 2:10 AM Robert Haas wrote: > > On Mon, Nov 13, 2023 at 11:25 AM Alvaro Herrera > wrote: > > Great stuff you got here. I'm doing a first pass trying to grok the > > whole thing for more substantive comments, but in the meantime here are > > some cosmetic ones. > >

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

2023-11-14 Thread Drouvot, Bertrand
Hi, On 11/13/23 9:44 PM, Andres Freund wrote: Hi, On 2023-11-13 09:26:56 +0100, Drouvot, Bertrand wrote: --- a/src/backend/storage/buffer/bufmgr.c +++ b/src/backend/storage/buffer/bufmgr.c @@ -799,11 +799,19 @@ ReadBufferExtended(Relation reln, ForkNumber forkNum, BlockNumber blockNum,