Re: Out of memory error handling in frontend code

2023-10-06 Thread Frédéric Yhuel
Hi Daniel, Thank you for your answer. On 9/28/23 14:02, Daniel Gustafsson wrote: On 28 Sep 2023, at 10:14, Frédéric Yhuel wrote: After some time, we understood that the 20 million of large objects were responsible for the huge memory usage (more than 10 GB) by pg_dump. This sounds like a

Re: How to update unicode mapping table?

2023-10-06 Thread Peter Eisentraut
On 26.09.23 00:20, Tom Lane wrote: On a slightly related note, I noticed while preparing 3aff1d3fd that src/backend/utils/mb/Unicode/Makefile seems a little screwy. If you go into that directory and type "make distclean", you'll find it removes some files that are in git: Since this is only use

Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)

2023-10-06 Thread Heikki Linnakangas
On 06/10/2023 09:50, Michael Paquier wrote: On Fri, Oct 06, 2023 at 02:30:16PM +0900, Michael Paquier wrote: Okay, the backtrace is not that useful. I'll see if I can get something better, still it seems like this has broken the way the syslogger closes these ports. And here you go: Program t

Re: should frontend tools use syncfs() ?

2023-10-06 Thread Maxim Orlov
Back to the patch v11. I don’t understand a bit, what we should do next? Make a separate thread or put this one on commitfest? -- Best regards, Maxim Orlov.

Re: pg_rewind with cascade standby doesn't work well

2023-10-06 Thread Kuwamura Masaki
Thanks for your review! 2023年9月27日(水) 8:33 Michael Paquier : > On Tue, Sep 26, 2023 at 06:44:50PM +0300, Aleksander Alekseev wrote: > >> And also, I'm afraid that I'm not sure what kind of tests I have to make > >> for fix this behavior. Would you mind giving me some advice? > > > > Personally I

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Peter Eisentraut
On 03.10.23 21:54, Jeff Davis wrote: Here, Jeff mentions normalization, but I think it's a major issue with collation support. If new code points are added, users can put them into the database before they are known to the collation library, and then when they become known to the collation librar

Re: Use FD_CLOEXEC on ListenSockets (was Re: Refactoring backend fork+exec code)

2023-10-06 Thread Michael Paquier
On Fri, Oct 06, 2023 at 10:27:22AM +0300, Heikki Linnakangas wrote: > I did a quick test with syslogger enabled before committing, but didn't > notice the segfault. I missed it because syslogger gets restarted and then > it worked. Thanks, Heikki. -- Michael signature.asc Description: PGP signat

Re: Remove distprep

2023-10-06 Thread Michael Paquier
On Fri, Oct 06, 2023 at 08:38:31AM +0200, Peter Eisentraut wrote: > Yes, something like that. Some people wanted a tarball of just the HTML > docs for download. Similar to the PDFs currently, I suppose. I suspected so. I've marked the patch as RfC for now. -- Michael signature.asc Description

Re: Add a new BGWORKER_BYPASS_ROLELOGINCHECK flag

2023-10-06 Thread Michael Paquier
On Fri, Oct 06, 2023 at 03:29:28PM +0900, Michael Paquier wrote: > Andres, are there logs for this TAP test on serinus? Or perhaps there > is a core file that could be looked at? The other animals are not > showing anything for the moment. serinus has reported back once again, and just returned

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Peter Eisentraut
On 05.10.23 19:30, Jeff Davis wrote: Agreed, at least until we understand the set of users per-column encoding is important to. I acknowledge that the presence of per-column encoding in the standard is some kind of signal there, but not enough by itself to justify something so invasive. The per

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2023-10-06 Thread Peter Eisentraut
On 26.09.23 16:51, Nazir Bilal Yavuz wrote: Also note that there are also dependencies in the other direction. For example, the psql help is compiled from XML DocBook sources. So your other patch would also need to include similar changesInclude() clauses. If there are more cases like this, i

Re: Synchronizing slots from primary to standby

2023-10-06 Thread Alvaro Herrera
On 2023-Sep-27, Peter Smith wrote: > 3. get_local_synced_slot_names > > + for (int i = 0; i < max_replication_slots; i++) > + { > + ReplicationSlot *s = &ReplicationSlotCtl->replication_slots[i]; > + > + /* Check if it is logical synchronized slot */ > + if (s->in_use && SlotIsLogical(s) && s->da

Re: remaining sql/json patches

2023-10-06 Thread Amit Langote
On Wed, Oct 4, 2023 at 10:26 PM Amit Langote wrote: > On Tue, Oct 3, 2023 at 10:11 PM Amit Langote wrote: > > On Mon, Oct 2, 2023 at 2:26 PM Amit Langote wrote: > > > On Mon, Oct 2, 2023 at 1:24 PM Amit Langote > > > wrote: > > > > Pushed this 30 min ago (no email on -committers yet!) and am l

Re: Included xid in restoring reorder buffer changes from disk log message

2023-10-06 Thread vignesh C
On Fri, 30 Apr 2021 at 11:53, Dilip Kumar wrote: > > On Thu, Apr 29, 2021 at 9:45 PM vignesh C wrote: > > > > Hi, > > > > While debugging one of the logical decoding issues, I found that xid was > > not included in restoring reorder buffer changes from disk log messages. > > Attached a patch f

typo in couple of places

2023-10-06 Thread vignesh C
Hi, I noticed a couple of typos in code. "the the" should have been "the", attached patch has the changes for the same. Regards, Vignesh From 83d3ccf7e0bb7732c70da825bfcfb8d0e453c207 Mon Sep 17 00:00:00 2001 From: Vignesh C Date: Fri, 6 Oct 2023 15:24:12 +0530 Subject: [PATCH] Fix typo in couple

Re: remaining sql/json patches

2023-10-06 Thread Alvaro Herrera
On 2023-Oct-06, Amit Langote wrote: > 2. Assignment of op->d.iocoerce.escontext needed to be changed like this: > > v_params[4] = l_ptr_const(op->d.iocoerce.escontext, > - > l_ptr(StructErrorSaveContext)); > + l_ptr(StructNod

Re: Checks in RegisterBackgroundWorker.()

2023-10-06 Thread Thomas Munro
On Thu, Sep 28, 2023 at 9:46 AM Heikki Linnakangas wrote: > Here's a new version of these patches. I fixed one comment and ran > pgindent, no other changes. > Subject: [PATCH v2 1/3] Clarify the checks in RegisterBackgroundWorker. LGTM. I see it passes on CI, and I also tested locally with EXEC

Re: Synchronizing slots from primary to standby

2023-10-06 Thread shveta malik
On Fri, Oct 6, 2023 at 2:07 PM Alvaro Herrera wrote: > > On 2023-Sep-27, Peter Smith wrote: > > > 3. get_local_synced_slot_names > > > > + for (int i = 0; i < max_replication_slots; i++) > > + { > > + ReplicationSlot *s = &ReplicationSlotCtl->replication_slots[i]; > > + > > + /* Check if it is log

Re: Make --help output fit within 80 columns per line

2023-10-06 Thread Peter Eisentraut
On 25.09.23 08:27, torikoshia wrote: So in summary, I think 80 is a decent soft limit, but let's not stress out about some lines going over that, and make a hard limit of perhaps 120. +1. It may be a good compromise. For enforcing the hard limit, is it better to add a regression test like pat

Re: wal recycling problem

2023-10-06 Thread Fabrice Chapuis
Thanks Christoph for your message. Now I understand why the wals are preserved if logical replication is configured and enabled. The problem is that when a large volume of data is loaded into a database, for example during a pg_restore, the wal sender process associated with the logical replication

Re: Request for comment on setting binary format output per session

2023-10-06 Thread Peter Eisentraut
On 04.10.23 18:26, Merlin Moncure wrote: On Wed, Oct 4, 2023 at 9:17 AM Peter Eisentraut > wrote: I think intuitively, this facility ought to work like client_encoding. There, the client declares its capabilities, and the server has to format the output a

Re: Request for comment on setting binary format output per session

2023-10-06 Thread Peter Eisentraut
On 04.10.23 20:30, Dave Cramer wrote: We need to figure out what is the right way to globally identify types, like either by fully-qualified name, by base name, some combination, how does it work with extensions, or do we need a new mechanism like UUIDs.  I think that

Re: Request for comment on setting binary format output per session

2023-10-06 Thread Peter Eisentraut
On 04.10.23 21:10, Robert Haas wrote: On Wed, Oct 4, 2023 at 10:17 AM Peter Eisentraut wrote: I think intuitively, this facility ought to work like client_encoding. I hadn't really considered client_encoding as a precedent for this setting. A lot of my discomfort with the proposed mechanism a

Re: remaining sql/json patches

2023-10-06 Thread Amit Langote
On Fri, Oct 6, 2023 at 19:01 Alvaro Herrera wrote: > On 2023-Oct-06, Amit Langote wrote: > > > 2. Assignment of op->d.iocoerce.escontext needed to be changed like this: > > > > v_params[4] = > l_ptr_const(op->d.iocoerce.escontext, > > - > > l_ptr(StructErrorSaveContext));

Re: More new SQL/JSON item methods

2023-10-06 Thread Peter Eisentraut
On 29.08.23 09:05, Jeevan Chalke wrote: v1-0001-Implement-jsonpath-.bigint-.integer-and-.number-m.patch This commit implements jsonpath .bigint(), .integer(), and .number() methods.  The JSON string or a numeric value is converted to the bigint, int4, and numeric type representation. A comment

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-10-06 Thread vignesh C
On Wed, 4 Oct 2023 at 17:01, Shlok Kyal wrote: > > On Wed, 4 Oct 2023 at 16:56, Peter Smith wrote: > > > > On Tue, Oct 3, 2023 at 5:42 PM vignesh C wrote: > > > > > > Thanks for the comments, the attached v6 version patch has the changes > > > for the same. > > > > > > > v6 LGTM. > > > I have ve

Re: FDW pushdown of non-collated functions

2023-10-06 Thread Ashutosh Bapat
Hi Jean-Christophe, On Fri, Sep 8, 2023 at 11:30 PM Jean-Christophe Arnu wrote: > > Maybe we could add another condition to the first if statement in order to > allow a “no-collation” function to be pushed down even if they have > “collatable” parameters. I’m not sure about the possible regress

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

2023-10-06 Thread Peter Eisentraut
On 28.08.23 11:54, Amul Sul wrote: Thanks for the review comments, I have fixed those in the attached version. In addition to that, extended syntax to have the STORE keyword as suggested by Vik. An additional comment: When you change the generation expression, you need to run ON UPDATE trigge

Re: Two Window aggregate node for logically same over clause

2023-10-06 Thread Ashutosh Bapat
On Thu, Oct 5, 2023 at 8:53 PM "Anitha S" wrote: > > > > Hi team, > > We have observed that for logically same over clause two different > window aggregate nodes are created in plan. > The below query contains two window functions. Both Over clause contain the > same partition & order clau

Re: Make --help output fit within 80 columns per line

2023-10-06 Thread torikoshia
On 2023-09-25 15:27, torikoshia wrote: Ugh, regression tests failed and it appears to be due to reasons related to meson. I'm going to investigate it. ISTM On 2023-10-06 19:49, Peter Eisentraut wrote: On 25.09.23 08:27, torikoshia wrote: So in summary, I think 80 is a decent soft limit, but

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

2023-10-06 Thread Ashutosh Bapat
On Fri, Oct 6, 2023 at 6:06 PM Peter Eisentraut wrote: > > On 28.08.23 11:54, Amul Sul wrote: > > Thanks for the review comments, I have fixed those in the attached > > version. In > > addition to that, extended syntax to have the STORE keyword as suggested by > > Vik. > > An additional comment: W

Re: RFC: Logging plan of the running query

2023-10-06 Thread torikoshia
On 2023-10-04 03:00, James Coleman wrote: On Thu, Sep 7, 2023 at 2:09 AM torikoshia wrote: On 2023-09-06 11:17, James Coleman wrote: >> > I've never been able to reproduce it (haven't tested the new version, >> > but v28 at least) on my M1 Mac; where I've reproduced it is on Debian >> > (firs

RE: [PoC] pg_upgrade: allow to upgrade publisher nodeHayato Kuroda (Fujitsu)

2023-10-06 Thread Hayato Kuroda (Fujitsu)
Dear hackers, Based on comments, I revised my patch. PSA the file. > > > Today, I discussed this problem with Andres at PGConf NYC and he > > suggested as following. To verify, if there is any pending unexpected > > WAL after shutdown, we can have an API like > > pg_logical_replication_slot_adva

Re: Opportunistically pruning page before update

2023-10-06 Thread James Coleman
Hi, Thanks for taking a look! On Fri, Oct 6, 2023 at 1:18 AM Dilip Kumar wrote: > > On Thu, Oct 5, 2023 at 2:35 AM James Coleman wrote: > > > > I talked to Andres and Peter again today, and out of that conversation > > I have some observations and ideas for future improvements. > > > > 1. The m

Re: RFC: Logging plan of the running query

2023-10-06 Thread James Coleman
On Fri, Oct 6, 2023 at 8:58 AM torikoshia wrote: > > On 2023-10-04 03:00, James Coleman wrote: > > On Thu, Sep 7, 2023 at 2:09 AM torikoshia > > wrote: > >> > >> On 2023-09-06 11:17, James Coleman wrote: > >> > >> >> > I've never been able to reproduce it (haven't tested the new version, > >> >>

Add const to values and nulls arguments

2023-10-06 Thread Peter Eisentraut
There are a lot of Datum *values, bool *nulls argument pairs that should really be const. The 0001 patch makes those changes. Some of these hunks depend on each other. The 0002 patch, which I'm not proposing to commit at this time, makes similar changes but in a way that breaks the table and

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

2023-10-06 Thread Peter Eisentraut
On 06.10.23 14:57, Ashutosh Bapat wrote: On Fri, Oct 6, 2023 at 6:06 PM Peter Eisentraut wrote: On 28.08.23 11:54, Amul Sul wrote: Thanks for the review comments, I have fixed those in the attached version. In addition to that, extended syntax to have the STORE keyword as suggested by Vik.

Re: Allow tests to pass in OpenSSL FIPS mode

2023-10-06 Thread Peter Eisentraut
On 05.10.23 22:04, Tom Lane wrote: On the way to testing this, I discovered that we have a usability regression with recent OpenSSL releases. The Fedora 35 installation I used to use for testing FIPS-mode behavior would produce errors like +ERROR: could not compute MD5 hash: disabled for FIP

Re: Allow tests to pass in OpenSSL FIPS mode

2023-10-06 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.

Custom tstzrange with importance factored in

2023-10-06 Thread Rares Pop (Treelet)
Hi, I want to make a custom range (and multirange type) that carries a few useful details. Looks like I may have to implement the operators, custom functions and my own aggregator. Where can I find the code SQL code for anything that relates to the tstzrange range type? Or would you recommend

Re: Build the docs if there are changes in docs and don't run other tasks if the changes are only in docs

2023-10-06 Thread Tom Lane
Peter Eisentraut writes: > I don't have a good sense of what you are trying to optimize for. If > it's the mainline build-on-every-commit type, then I wonder how many > commits would really be affected by this. Like, how many commits touch > only a README file. If it's for things like the cf

Problem, partition pruning for prepared statement with IS NULL clause.

2023-10-06 Thread Sergei Glukhov
Hello postgres hackers, I noticed that combination of prepared statement with generic plan and 'IS NULL' clause could lead partition pruning to crash. Affected versions start from 12 it seems. 'How to repeat' below and an attempt to fix it is in attachment. Data set: -- create function pa

Re: Two Window aggregate node for logically same over clause

2023-10-06 Thread Tom Lane
Ashutosh Bapat writes: > On Thu, Oct 5, 2023 at 8:53 PM "Anitha S" wrote: >> We have observed that for logically same over clause two different window >> aggregate nodes are created in plan. >> The below query contains two window functions. Both Over clause contain the >> same partition & order

Re: Add const to values and nulls arguments

2023-10-06 Thread Aleksander Alekseev
Hi, > There are a lot of Datum *values, bool *nulls argument pairs that should > really be const. The 0001 patch makes those changes. Some of these > hunks depend on each other. > > The 0002 patch, which I'm not proposing to commit at this time, makes > similar changes but in a way that breaks t

Re: pg16: invalid page/page verification failed

2023-10-06 Thread Justin Pryzby
On Fri, Oct 06, 2023 at 09:20:05AM +0900, Michael Paquier wrote: > On Thu, Oct 05, 2023 at 11:45:18AM -0500, Justin Pryzby wrote: > > This table is what it sounds like: a partition into which CSV logs are > > COPY'ed. It would've been created around 8am. There's no special > > params set for the

Re: typo in couple of places

2023-10-06 Thread Dagfinn Ilmari Mannsåker
vignesh C writes: > Hi, > > I noticed a couple of typos in code. "the the" should have been "the", > attached patch has the changes for the same. This made me curious about other duplicate word occurrences, and after a few minutes of increasingly-elaborate regexing to exclude false postives, I f

Re: Parallel Bitmap Heap Scan reports per-worker stats in EXPLAIN ANALYZE

2023-10-06 Thread Dmitry Dolgov
> On Wed, Sep 20, 2023 at 03:42:43PM +0200, David Geier wrote: > Another, not yet discussed, option I can see work is: > > 4. Allocate a fixed amount of memory for the instrumentation stats based on > MAX_PARALLEL_WORKER_LIMIT: MAX_PARALLEL_WORKER_LIMIT is 1024 and used as the > limit of the max_pa

Re: pg16: invalid page/page verification failed

2023-10-06 Thread Andres Freund
Hi, On 2023-10-06 09:20:05 +0900, Michael Paquier wrote: > On Thu, Oct 05, 2023 at 11:45:18AM -0500, Justin Pryzby wrote: > > This table is what it sounds like: a partition into which CSV logs are > > COPY'ed. It would've been created around 8am. There's no special > > params set for the table n

Re: RFC: Logging plan of the running query

2023-10-06 Thread Andres Freund
Hi, On 2023-10-06 21:58:46 +0900, torikoshia wrote: > Yeah, I think it's a straightforward workaround. > And I'm also concerned that the condition of being in the process > of acquiring some kind of lock is too strict and will make it almost > impossible to output a running plan. How so? We shoul

FDW LIM IT pushdown

2023-10-06 Thread Michał Kłeczek
Hello hackers, First timer here with a question: I’ve searched through various e-mail threads and documents and could not find if pushdown of LIMIT clauses to FDW is implemented. Seen some conversation about that a couple of years ago when that was treated as a feature request but nothing sinc

Re: document the need to analyze partitioned tables

2023-10-06 Thread Bruce Momjian
On Mon, Oct 2, 2023 at 04:48:20AM +0200, Laurenz Albe wrote: > On Fri, 2023-09-29 at 22:34 -0400, Bruce Momjian wrote: > > Very good point! Updated patch attached. > > Thanks! Some small corrections: > > > diff --git a/doc/src/sgml/maintenance.sgml b/doc/src/sgml/maintenance.sgml > > index 9c

Re: Synchronizing slots from primary to standby

2023-10-06 Thread Amit Kapila
On Wed, Oct 4, 2023 at 5:34 PM Drouvot, Bertrand wrote: > > On 10/4/23 1:50 PM, shveta malik wrote: > > On Wed, Oct 4, 2023 at 5:00 PM Amit Kapila wrote: > >> > >> On Wed, Oct 4, 2023 at 11:55 AM Drouvot, Bertrand > >> wrote: > >>> > >>> On 10/4/23 6:26 AM, shveta malik wrote: > On Wed, Oct

Re: document the need to analyze partitioned tables

2023-10-06 Thread Laurenz Albe
On Fri, 2023-10-06 at 12:20 -0400, Bruce Momjian wrote: > Good points, updated patch attached. That patch is good to go, as far as I am concerned. Yours, Laurenz Albe

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Jeff Davis
On Fri, 2023-10-06 at 09:58 +0200, Peter Eisentraut wrote: > If you want to be rigid about it, you also need to consider whether > the > Unicode version used by the ICU library in use matches the one used > by > the in-core tables. What problem are you concerned about here? I thought about it an

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Robert Haas
On Thu, Oct 5, 2023 at 3:15 PM Nico Williams wrote: > Text+encoding can be just like bytea with a one- or two-byte prefix > indicating what codeset+encoding it's in. That'd be how to encode > such text values on the wire, though on disk the column's type should > indicate the codeset+encoding, so

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Nico Williams
On Fri, Oct 06, 2023 at 01:33:06PM -0400, Robert Haas wrote: > On Thu, Oct 5, 2023 at 3:15 PM Nico Williams wrote: > > Text+encoding can be just like bytea with a one- or two-byte prefix > > indicating what codeset+encoding it's in. That'd be how to encode > > such text values on the wire, though

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Jeff Davis
On Thu, 2023-10-05 at 14:52 -0500, Nico Williams wrote: > This is just how you encode the type of the string.  You have any > number > of options.  The point is that already PG can encode binary data, so > if > how to encode text of disparate encodings on the wire, building on > top > of the encodi

Re: New WAL record to detect the checkpoint redo location

2023-10-06 Thread Robert Haas
On Thu, Oct 5, 2023 at 2:34 PM Andres Freund wrote: > If I add an unlikely around if (rechdr->xl_rmid == RM_XLOG_ID), the > performance does improve. But that "only" brings it up to 322.406. Not sure > what the rest is. I don't really think this is worth worrying about. A sub-one-percent regressi

Re: FDW LIM IT pushdown

2023-10-06 Thread Michał Kłeczek
Sorry, I wasn’t precise - my question is about foreign partitions - LIMIT on ordinary tables is supported. Thanks, Michal > On 6 Oct 2023, at 18:02, Michał Kłeczek wrote: > > Hello hackers, > > First timer here with a question: > > I’ve searched through various e-mail threads and documents a

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Robert Haas
On Fri, Oct 6, 2023 at 1:38 PM Nico Williams wrote: > On Fri, Oct 06, 2023 at 01:33:06PM -0400, Robert Haas wrote: > > On Thu, Oct 5, 2023 at 3:15 PM Nico Williams wrote: > > > Text+encoding can be just like bytea with a one- or two-byte prefix > > > indicating what codeset+encoding it's in. Tha

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Nico Williams
On Fri, Oct 06, 2023 at 02:17:32PM -0400, Robert Haas wrote: > On Fri, Oct 6, 2023 at 1:38 PM Nico Williams wrote: > > On Fri, Oct 06, 2023 at 01:33:06PM -0400, Robert Haas wrote: > > > On Thu, Oct 5, 2023 at 3:15 PM Nico Williams > > > wrote: > > > > Text+encoding can be just like bytea with a

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Robert Haas
On Fri, Oct 6, 2023 at 2:25 PM Nico Williams wrote: > > > > Well, that would be making the encoding a per-value property, rather > > > > than a per-column property like collation as I proposed. I can't see > > > > > > On-disk it would be just a property of the type, not part of the value. > > > >

Re: Index range search optimization

2023-10-06 Thread Konstantin Knizhnik
On 04/10/2023 3:00 am, Alexander Korotkov wrote: On Wed, Oct 4, 2023 at 12:59 AM Pavel Borisov wrote: I've looked through the patch v8. I think it's good enough to be pushed if Peter has no objections. Thank you, Pavel. I'll push this if there are no objections. -- Regards, Alexander Ko

Re: Remove distprep

2023-10-06 Thread Andres Freund
Hi, On 2023-10-05 17:46:46 +0200, Peter Eisentraut wrote: > The attached updated patch is also split up like Andres suggested nearby. Thanks. > (Not sure if it would be good to commit it that way, but it's easier to look > at for now for sure.) I'd push together, but I think the split is usefu

Re: Index range search optimization

2023-10-06 Thread Pavel Borisov
Hi, Konstantin! On Fri, 6 Oct 2023 at 22:44, Konstantin Knizhnik wrote: > > > On 04/10/2023 3:00 am, Alexander Korotkov wrote: > > On Wed, Oct 4, 2023 at 12:59 AM Pavel Borisov > > wrote: > >> I've looked through the patch v8. I think it's good enough to be > >> pushed if Peter has no objection

Re: Annoying build warnings from latest Apple toolchain

2023-10-06 Thread Andres Freund
Hi, On 2023-10-05 13:37:38 -0400, Tom Lane wrote: > Andres Freund writes: > > I think you can just pass c_args directly to executable() here, I think > > adding > > c_args to default_bin_args would be a bad idea. > > Hm. IIUC that would result in an error if someone did try to > put some c_arg

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Jeff Davis
On Fri, 2023-10-06 at 13:33 -0400, Robert Haas wrote: > What I think people really want is a whole column in > some encoding that isn't the normal one for that database. Do people really want that? I'd be curious to know why. A lot of modern projects are simply declaring UTF-8 to be the "one true

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Isaac Morland
On Fri, 6 Oct 2023 at 15:07, Jeff Davis wrote: > On Fri, 2023-10-06 at 13:33 -0400, Robert Haas wrote: > > What I think people really want is a whole column in > > some encoding that isn't the normal one for that database. > > Do people really want that? I'd be curious to know why. > > A lot of m

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-06 Thread Nathan Bossart
On Thu, Oct 05, 2023 at 01:09:36PM -0700, Jeff Davis wrote: > On Thu, 2023-10-05 at 14:04 -0500, Nathan Bossart wrote: >> That way, we needn't restrict this feature to 2 passwords for >> everyone.  Perhaps 2 should be the default, but in any case, IMO we >> shouldn't design to only support 2. > >

Re: should frontend tools use syncfs() ?

2023-10-06 Thread Nathan Bossart
On Fri, Oct 06, 2023 at 10:50:11AM +0300, Maxim Orlov wrote: > Back to the patch v11. I don’t understand a bit, what we should do next? > Make a separate thread or put this one on commitfest? >From a quick skim, this one looks pretty good to me. Would you mind adding it to the commitfest so that

Re: Where can I find the doxyfile?

2023-10-06 Thread Bogdan Mart
On 2008-06-02 18:33:42 Stefan Kaltenbrunner wrote: > > Zdenek Kotala wrote: > > Xin Wang napsal(a): > >> Hi, > >> I don't know where I can find the doxyfile which generate > >> "doxygen.postgresql.org" web site. I found that when reading code the > >> doxygen source code is quite helpful. However,

Re: Good News Everyone! + feature proposal

2023-10-06 Thread Bruce Momjian
On Thu, Oct 5, 2023 at 05:10:37AM -0700, Gurjeet Singh wrote: > I wish there was a directory of IRC identities that pointed to real > identities (at least for folks who don't mind this mapping available > in the open), so that when we converse in IRC, we have a face to go > with the IRC handles. A

Re: Restoring default privileges on objects

2023-10-06 Thread Laurenz Albe
On Wed, 2023-08-30 at 12:00 +0200, Peter J. Holzer wrote: > On 2023-08-29 14:44:48 -0600, Stuart McGraw wrote: > > On 8/29/23 13:27, Tom Lane wrote: > > > Fixing \dp to honor "\pset null" for this might be a reasonable > > > thing to do too.  I'm actually a bit surprised that that doesn't > > > wor

Re: Restoring default privileges on objects

2023-10-06 Thread Laurenz Albe
On Fri, 2023-10-06 at 22:16 +0200, Laurenz Albe wrote: > Here is a patch that does away with the special handling of NULL values > in psql backslash commands. Erm, I forgot to attach the patch. Yours, Laurenz Albe From 6c67f15f011ddf1e309cb7e84580b266d674a1e2 Mon Sep 17 00:00:00 2001 From: Lauren

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-06 Thread Jeff Davis
On Fri, 2023-10-06 at 14:26 -0500, Nathan Bossart wrote: > I guess it's more of the latter.  Perhaps one potential use case > would be > short-lived credentials that are created on demand.  Such a password > might > only be valid for something like 15 minutes, and many users might > have the > abil

Re: Restoring default privileges on objects

2023-10-06 Thread Laurenz Albe
On Fri, 2023-10-06 at 22:18 +0200, Laurenz Albe wrote: > On Fri, 2023-10-06 at 22:16 +0200, Laurenz Albe wrote: > > Here is a patch that does away with the special handling of NULL values > > in psql backslash commands. > > Erm, I forgot to attach the patch. I just realize that there is a conflic

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-06 Thread Jeff Davis
On Thu, 2023-10-05 at 14:28 -0700, Gurjeet Singh wrote: > This way there's a notion of a 'new' and 'old' passwords. IIUC, you are proposing that there are exactly two slots, NEW and OLD. When adding a password, OLD must be unset and it moves NEW to OLD, and adds the new password in NEW. DROP only

Re: Fix output of zero privileges in psql

2023-10-06 Thread Laurenz Albe
On Sun, 2023-09-17 at 21:31 +0200, Erik Wienhold wrote: > I wrote a patch to change psql's display of zero privileges after a user's > reported confusion with the psql output for zero vs. default privileges [1]. > Admittedly, zero privileges is a rare use case [2] but I think psql should not > conf

Re: [PoC/RFC] Multiple passwords, interval expirations

2023-10-06 Thread Bruce Momjian
On Fri, Oct 6, 2023 at 01:20:03PM -0700, Jeff Davis wrote: > The basic problem, as I see it, is: how do we keep users from > accidentally dropping the wrong password? Generated unique names or I thought we could auto-remove old password if the valid-until date is in the past. You would need a se

Re: Problem, partition pruning for prepared statement with IS NULL clause.

2023-10-06 Thread Bruce Momjian
On Fri, Oct 6, 2023 at 06:09:45PM +0400, Sergei Glukhov wrote: > Test case: > -- > set plan_cache_mode to force_generic_plan; > prepare stmt AS select * from hp where a is null and b = $1; > explain execute stmt('xxx'); > -- I can confirm the crash in git master. -- Bruce Momjian

Re: Problem, partition pruning for prepared statement with IS NULL clause.

2023-10-06 Thread Bruce Momjian
On Fri, Oct 6, 2023 at 05:00:54PM -0400, Bruce Momjian wrote: > On Fri, Oct 6, 2023 at 06:09:45PM +0400, Sergei Glukhov wrote: > > Test case: > > -- > > set plan_cache_mode to force_generic_plan; > > prepare stmt AS select * from hp where a is null and b = $1; > > explain execute stmt('xxx');

Re: Where can I find the doxyfile?

2023-10-06 Thread Bruce Momjian
On Fri, Oct 6, 2023 at 10:50:25PM +0300, Bogdan Mart wrote: > On 2008-06-02 18:33:42 Stefan Kaltenbrunner wrote: > > > > Zdenek Kotala wrote: > > > Xin Wang napsal(a): > > >> Hi, > > >> I don't know where I can find the doxyfile which generate > > >> "doxygen.postgresql.org" web site. I found that

Re: Where can I find the doxyfile?

2023-10-06 Thread mart . bogdan
On 07.10.23 00:06, Bruce Momjian wrote: On Fri, Oct 6, 2023 at 10:50:25PM +0300, Bogdan Mart wrote: > On 2008-06-02 18:33:42 Stefan Kaltenbrunner wrote: >> >> Zdenek Kotala wrote: >>> Xin Wang napsal(a): Hi, I don't know where I can find the doxyfile which generate "doxygen.pos

RE: Where can I find the doxyfile?

2023-10-06 Thread postgres
Sometime earlier, I created a filter to annotate regular C comments as doxy comments. I'll attach it along with a sample doxyfile for running it. Just in case it looks useful. I've never been a big fan of Doxygen, but it seems to have gotten better over time. Now that some IDEs display doxy comm

Re: pg16: invalid page/page verification failed

2023-10-06 Thread Justin Pryzby
On Fri, Oct 06, 2023 at 08:47:39AM -0700, Andres Freund wrote: > Hi, > > On 2023-10-06 09:20:05 +0900, Michael Paquier wrote: > > On Thu, Oct 05, 2023 at 11:45:18AM -0500, Justin Pryzby wrote: > > > This table is what it sounds like: a partition into which CSV logs are > > > COPY'ed. It would've

RE: Where can I find the doxyfile?

2023-10-06 Thread john.morris
Sometime earlier, I created a filter to annotate regular C comments as doxy comments. I'll attach it along with a sample doxyfile for running it. Just in case it looks useful. I've never been a big fan of Doxygen, but it seems to have gotten better over time. Now that some editors are display

Re: remaining sql/json patches

2023-10-06 Thread Andres Freund
Hi, On 2023-09-29 13:57:46 +0900, Amit Langote wrote: > Thanks. I will push the attached 0001 shortly. Sorry for not looking at this earlier. Have you done benchmarking to verify that 0001 does not cause performance regressions? I'd not be suprised if it did. I'd split the soft-error path into

Re: [PoC] pg_upgrade: allow to upgrade publisher nodeHayato Kuroda (Fujitsu)

2023-10-06 Thread Amit Kapila
On Fri, Oct 6, 2023 at 6:30 PM Hayato Kuroda (Fujitsu) wrote: > > Based on comments, I revised my patch. PSA the file. > > > > > > Today, I discussed this problem with Andres at PGConf NYC and he > > > suggested as following. To verify, if there is any pending unexpected > > > WAL after shutdown,

Re: Where can I find the doxyfile?

2023-10-06 Thread Bohdan Mart
On 07.10.23 00:29, postg...@coyotebush.net wrote: Sometime earlier, I created a filter to annotate regular C comments as doxy comments. I'll attach it along with a sample doxyfile for running it. Just in case it looks useful. I've never been a big fan of Doxygen, but it seems to have gotten

Re: Pre-proposal: unicode normalized text

2023-10-06 Thread Matthias van de Meent
On Fri, 6 Oct 2023, 21:08 Jeff Davis, wrote: > On Fri, 2023-10-06 at 13:33 -0400, Robert Haas wrote: > > What I think people really want is a whole column in > > some encoding that isn't the normal one for that database. > > Do people really want that? I'd be curious to know why. > One reason so

Re: [PoC] pg_upgrade: allow to upgrade publisher node

2023-10-06 Thread Amit Kapila
On Thu, Oct 5, 2023 at 6:43 PM Bharath Rupireddy wrote: > > On Thu, Oct 5, 2023 at 1:48 AM Amit Kapila wrote: > > > > > The other potential problem Andres pointed out is that during shutdown > > if due to some reason, the walreceiver goes down, we won't be able to > > send the required WAL and us

Re: typo in couple of places

2023-10-06 Thread Amit Kapila
On Fri, Oct 6, 2023 at 8:52 PM Dagfinn Ilmari Mannsåker wrote: > > vignesh C writes: > > > Hi, > > > > I noticed a couple of typos in code. "the the" should have been "the", > > attached patch has the changes for the same. > > This made me curious about other duplicate word occurrences, and after

Re: Add support for AT LOCAL

2023-10-06 Thread Vik Fearing
On 10/6/23 07:05, Michael Paquier wrote: I haven't yet finished my review of the patch, still looking at it. I realized that my regression tests are not exercising what I originally intended them to after this change. They are supposed to show that calling the function explicitly or using A

Re: Invalidate the subscription worker in cases where a user loses their superuser status

2023-10-06 Thread Amit Kapila
On Tue, Oct 3, 2023 at 12:12 PM vignesh C wrote: > > Thanks for the comments, the attached v6 version patch has the changes > for the same. > Few comments: = 1. /* Is the use of a password mandatory? */ must_use_password = MySubscription->passwordrequired && - !superuser_arg(MySubsc

Re: typo in couple of places

2023-10-06 Thread vignesh C
On Fri, 6 Oct 2023 at 20:50, Dagfinn Ilmari Mannsåker wrote: > > vignesh C writes: > > > Hi, > > > > I noticed a couple of typos in code. "the the" should have been "the", > > attached patch has the changes for the same. > > This made me curious about other duplicate word occurrences, and after a

Re: Fix output of zero privileges in psql

2023-10-06 Thread Erik Wienhold
On 2023-10-06 22:32 +0200, Laurenz Albe write: > On Sun, 2023-09-17 at 21:31 +0200, Erik Wienhold wrote: > > I wrote a patch to change psql's display of zero privileges after a user's > > reported confusion with the psql output for zero vs. default privileges [1]. > > Admittedly, zero privileges is

CREATE DATABASE with filesystem cloning

2023-10-06 Thread Thomas Munro
Hello hackers, Here is an experimental POC of fast/cheap database cloning. For clones from little template databases, no one cares much, but it might be useful to be able to create a snapshot or fork of very large database for testing/experimentation like this: create database foodb_snapshot20