RE: Is this a problem in GenericXLogFinish()?

2024-02-04 Thread Hayato Kuroda (Fujitsu)
Dear Amit, > > @@ -692,6 +697,9 @@ _hash_freeovflpage(Relation rel, Buffer bucketbuf, > Buffer ovflbuf, > if (!xlrec.is_prev_bucket_same_wrt) > wbuf_flags |= REGBUF_NO_CHANGE; > XLogRegisterBuffer(1, wbuf, wbuf_flags); > + > + /* Track the registration status for later use */ > +

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-02-04 Thread Dilip Kumar
On Sun, Feb 4, 2024 at 7:10 PM Alvaro Herrera wrote: > > On 2024-Feb-02, Dilip Kumar wrote: > > > I have checked the patch and it looks fine to me other than the above > > question related to memory barrier usage one more question about the > > same, basically below to instances 1 and 2 look

Re: cfbot does not list patches in 'Current commitfest'

2024-02-04 Thread Daniel Gustafsson
> On 5 Feb 2024, at 08:00, Richard Guo wrote: > > ... and the patches in CF #47 (currently open) are listed in 'Next > commitfest'. I guess we need to manually create a "next" commitfest? I've added a years worth of commitfests to the CF app, but I don't know how to update the CFBot (it might

Re: pg_column_toast_chunk_id: a function to get a chunk ID of a TOASTed value

2024-02-04 Thread Yugo NAGATA
On Thu, 1 Feb 2024 17:59:56 +0800 jian he wrote: > On Thu, Feb 1, 2024 at 12:45 PM Yugo NAGATA wrote: > > > > Here is a updated patch, v6. > > v6 patch looks good. Thank you for your review and updating the status to RwC! Regards, Yugo Nagata -- Yugo NAGATA

Re: cataloguing NOT NULL constraints

2024-02-04 Thread Michael Paquier
On Fri, Feb 02, 2024 at 07:00:01PM +0300, Alexander Lakhin wrote: > results in: > NOTICE:  merging definition of column "i" for child "b" > NOTICE:  merging definition of column "i" for child "c" > ERROR:  tuple already updated by self > > (This is similar to bug #18297, but ATExecAddColumn()

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

2024-02-04 Thread Michael Paquier
On Fri, Feb 02, 2024 at 05:46:18PM +0900, Sutou Kouhei wrote: > Hi, > > In > "Re: Make COPY format extendable: Extract COPY TO format implementations" > on Fri, 2 Feb 2024 17:04:28 +0900, > Michael Paquier wrote: > > > One idea I was considering is whether we should use a special value in

cfbot does not list patches in 'Current commitfest'

2024-02-04 Thread Richard Guo
... and the patches in CF #47 (currently open) are listed in 'Next commitfest'. I guess we need to manually create a "next" commitfest? Thanks Richard

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

2024-02-04 Thread Masahiko Sawada
On Mon, Feb 5, 2024 at 10:29 AM Sutou Kouhei wrote: > > Hi, > > catalog/syscache_ids.h is referred by utils/syscache.h but > it's not installed with Meson. > > FYI: > * 9b1a6f50b91dca6610932650c8c81a3c924259f9 > It uses catalog/syscache_ids.h in utils/syscache.h but > catalog/syscache_ids.h

Re: Is this a problem in GenericXLogFinish()?

2024-02-04 Thread Amit Kapila
On Mon, Feb 5, 2024 at 10:00 AM Hayato Kuroda (Fujitsu) wrote: > > > > > Amit, this has been applied as of 861f86beea1c, and I got pinged about > > the fact this triggers inconsistencies because we always set the LSN > > of the write buffer (wbuf in _hash_freeovflpage) but > >

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-02-04 Thread jian he
On Mon, Feb 5, 2024 at 10:29 AM torikoshia wrote: > > Hi, > > On 2024-02-03 15:22, jian he wrote: > > The idea of on_error is to tolerate errors, I think. > > if a column has a not null constraint, let it cannot be used with > > (on_error 'null') > > > + /* > > +* we can specify

Re: Synchronizing slots from primary to standby

2024-02-04 Thread Ajin Cherian
On Mon, Feb 5, 2024 at 1:29 PM Zhijie Hou (Fujitsu) wrote: > On Monday, February 5, 2024 10:17 AM Zhijie Hou (Fujitsu) < > houzj.f...@fujitsu.com> wrote: > > There was one miss in the doc that cause CFbot failure, > attach the correct version V77_2 here. There are no code changes compared > to

Re: src/bin/pg_upgrade/t/004_subscription.pl test comment fix

2024-02-04 Thread Amit Kapila
On Mon, Feb 5, 2024 at 2:42 AM Peter Smith wrote: > > On Sat, Feb 3, 2024 at 5:28 PM Amit Kapila wrote: > > > > On Thu, Feb 1, 2024 at 5:58 AM Peter Smith wrote: > > > > > > OK. Now using your suggested 2nd sentence: > > > > > > +# The subscription's running status and failover option should be

RE: Is this a problem in GenericXLogFinish()?

2024-02-04 Thread Hayato Kuroda (Fujitsu)
Dear Michael, Amit, > > Amit, this has been applied as of 861f86beea1c, and I got pinged about > the fact this triggers inconsistencies because we always set the LSN > of the write buffer (wbuf in _hash_freeovflpage) but > XLogRegisterBuffer() would *not* be called when the two following >

RE: Synchronizing slots from primary to standby

2024-02-04 Thread Zhijie Hou (Fujitsu)
On Thursday, February 1, 2024 12:20 PM Amit Kapila wrote: > > On Thu, Feb 1, 2024 at 8:15 AM Euler Taveira wrote: > > > > On Mon, Jan 29, 2024, at 10:17 AM, Zhijie Hou (Fujitsu) wrote: > > > > Attach the V72-0001 which addressed above comments, other patches will > be > > rebased and posted

Re: Synchronizing slots from primary to standby

2024-02-04 Thread Peter Smith
On Fri, Feb 2, 2024 at 11:18 PM shveta malik wrote: > > On Fri, Feb 2, 2024 at 12:25 PM Peter Smith wrote: > > > > Here are some review comments for v750002. > > Thanks for the feedback Peter. Addressed all in v76 except one. > > > (this is a WIP but this is what I found so far...) > > > I

Re: Where can I find the doxyfile?

2024-02-04 Thread John Morris
>> I wish you'd stop proposing the lex filter so that we can discuss the >> Doxyfile.in file and the accompanying Meson rule. I see no obstacle to discussing Doxyfile.in and the meson.build file. Your suggestions are welcome. If you can find the original Doxyfile, it would make sense to

Re: Reordering DISTINCT keys to match input path's pathkeys

2024-02-04 Thread Richard Guo
cfbot reminds that this patch does not apply any more. So I've rebased it on master, and also adjusted the test cases a bit. Thanks Richard v2-0001-Reordering-DISTINCT-keys-to-match-input-path-s-pathkeys.patch Description: Binary data

Encoding protection for pgcrypto

2024-02-04 Thread shihao zhong
Hi hackers, Currently, pgp_sym_decrypt_text and pgp_pub_decrypt_text doesn't enforce database encoding validation even when returning text. This patch adds validation and dedicated tests to verify its effectiveness. Additionally, some existing unit tests were moved to the new tests as they

Re: Small fix on COPY ON_ERROR document

2024-02-04 Thread Yugo NAGATA
On Sat, 3 Feb 2024 01:51:56 +0200 Alexander Korotkov wrote: > On Fri, Feb 2, 2024 at 10:07 PM David G. Johnston > wrote: > > On Thu, Feb 1, 2024 at 11:59 PM Yugo NAGATA wrote: > >> > >> > >> I attached a updated patch including fixes you pointed out above. > >> > > > > Removed "which"; changed

Re: Change COPY ... ON_ERROR ignore to ON_ERROR ignore_row

2024-02-04 Thread torikoshia
Hi, On 2024-02-03 15:22, jian he wrote: The idea of on_error is to tolerate errors, I think. if a column has a not null constraint, let it cannot be used with (on_error 'null') + /* +* we can specify on_error 'null', but it can only apply to columns +* don't have not

Re: An improvement on parallel DISTINCT

2024-02-04 Thread Richard Guo
On Fri, Feb 2, 2024 at 7:36 PM David Rowley wrote: > Now for the other stuff you had. I didn't really like this part: > > + /* > + * Set target for partial_distinct_rel as generate_useful_gather_paths > + * requires that the input rel has a valid reltarget. > + */ > +

Re: An improvement on parallel DISTINCT

2024-02-04 Thread Richard Guo
On Fri, Feb 2, 2024 at 6:39 PM David Rowley wrote: > So the gains increase with more parallel workers due to pushing more > work to the worker. Amdahl's law approves of this. > > I'll push the patch shortly. Thanks for the detailed testing and pushing the patch! Thanks Richard

meson: catalog/syscache_ids.h isn't installed

2024-02-04 Thread Sutou Kouhei
Hi, catalog/syscache_ids.h is referred by utils/syscache.h but it's not installed with Meson. FYI: * 9b1a6f50b91dca6610932650c8c81a3c924259f9 It uses catalog/syscache_ids.h in utils/syscache.h but catalog/syscache_ids.h isn't installed. * 6eb6086faa3842c2a38a1ee2f97bf9a42ce27610 It changes

Re: Grant read-only access to exactly one database amongst many

2024-02-04 Thread David G. Johnston
On Sun, Feb 4, 2024 at 5:04 PM Graham Leggett wrote: > Hi all, > > I have a postgresql 15 instance with two databases in it, and I have a > need to grant read-only access to one of those databases to a given user. > > To do this I created a dedicated role for readonly access to the database >

Re: Grant read-only access to exactly one database amongst many

2024-02-04 Thread Tom Lane
Graham Leggett writes: > Trouble is, I can create tables in db1 which is write access. I can also > connect to db2 (bad), and I can enumerate the tables in db2 (bad), although > the queries of the contents say access is denied. You need to read the docs about default privileges: see about

Re: to_regtype() Raises Error

2024-02-04 Thread Erik Wienhold
On 2024-02-04 20:20 +0100, David E. Wheeler wrote: > On Feb 2, 2024, at 15:33, David E. Wheeler wrote: > > > Anyway, I’m happy to submit a documentation patch along the lines you > > suggested. > > How’s this? > > --- a/doc/src/sgml/func.sgml > +++ b/doc/src/sgml/func.sgml > @@ -25460,11

Grant read-only access to exactly one database amongst many

2024-02-04 Thread Graham Leggett
Hi all, I have a postgresql 15 instance with two databases in it, and I have a need to grant read-only access to one of those databases to a given user. To do this I created a dedicated role for readonly access to the database db1: CREATE ROLE "dv_read_db1" GRANT CONNECT ON DATABASE db1 TO

Re: [PATCH] ltree hash functions

2024-02-04 Thread jian he
On Thu, Feb 1, 2024 at 11:11 PM vignesh C wrote: > > On Wed, 6 Dec 2023 at 04:08, Tommy Pavlicek wrote: > > > > Thanks. > > > > I've attached the latest version that updates the naming in line with > > the convention. > > > > On Mon, Dec 4, 2023 at 12:46 AM jian he wrote: > > > > > > On Fri,

Re: On login trigger: take three

2024-02-04 Thread Alexander Korotkov
On Tue, Jan 23, 2024 at 11:52 PM Alexander Korotkov wrote: > On Tue, Jan 23, 2024 at 8:00 PM Alexander Lakhin wrote: > > Please look at the following query, which triggers an assertion failure on > > updating the field dathasloginevt for an entry in pg_database: > > SELECT format('CREATE

Re: src/bin/pg_upgrade/t/004_subscription.pl test comment fix

2024-02-04 Thread Peter Smith
On Sat, Feb 3, 2024 at 5:28 PM Amit Kapila wrote: > > On Thu, Feb 1, 2024 at 5:58 AM Peter Smith wrote: > > > > OK. Now using your suggested 2nd sentence: > > > > +# The subscription's running status and failover option should be preserved > > +# in the upgraded instance. So regress_sub1 should

Re: to_regtype() Raises Error

2024-02-04 Thread David E. Wheeler
On Feb 2, 2024, at 15:33, David E. Wheeler wrote: > Anyway, I’m happy to submit a documentation patch along the lines you > suggested. How’s this? --- a/doc/src/sgml/func.sgml +++ b/doc/src/sgml/func.sgml @@ -25460,11 +25460,12 @@ SELECT collation for ('foo' COLLATE "de_DE"); regtype

Re: Patch: Add parse_type Function

2024-02-04 Thread David E. Wheeler
On Feb 4, 2024, at 13:52, Pavel Stehule wrote: > not yet, but I'll do it Nice, thank you. I put it into the Commitfest. https://commitfest.postgresql.org/47/4807/ Best, David

Re: Draft release notes for minor releases are up

2024-02-04 Thread Noah Misch
On Sun, Feb 04, 2024 at 01:13:53PM -0500, Tom Lane wrote: > I now have this text for your CREATE DATABASE fixes: > > > Ensure durability of CREATE DATABASE (Noah Misch) > > > > If an operating system crash occurred during or shortly > after CREATE DATABASE,

Re: Patch: Add parse_type Function

2024-02-04 Thread Pavel Stehule
ne 4. 2. 2024 v 19:30 odesílatel David E. Wheeler napsal: > On Feb 4, 2024, at 13:02, Pavel Stehule wrote: > > > I thinks so proposed functionality can be useful > > Great, thank you! > > Is that a review? :-) > not yet, but I'll do it Pavel > > D > > >

Re: Patch: Add parse_type Function

2024-02-04 Thread David E. Wheeler
On Feb 4, 2024, at 13:02, Pavel Stehule wrote: > I thinks so proposed functionality can be useful Great, thank you! Is that a review? :-) D

Re: Draft release notes for minor releases are up

2024-02-04 Thread Tom Lane
Noah Misch writes: > On Fri, Feb 02, 2024 at 08:18:50PM -0500, Tom Lane wrote: >> Noah Misch writes: >>> Shall the top of the notes advise to reindex GIN indexes? >> I thought about that, but it's a pretty low-probability failure >> I think, so I didn't write that advice. Maybe I misjudged it.

Re: Patch: Add parse_type Function

2024-02-04 Thread Pavel Stehule
Hi ne 4. 2. 2024 v 18:51 odesílatel David E. Wheeler napsal: > Hackers, > > Attached is a patch to add a new function, `parse_type()`. It parses a > type string and returns a record with the typid and typmod for the type, or > raises an error if the type is invalid. It’s effectively a thin

Re: Clean up command argument assembly

2024-02-04 Thread Tom Lane
Peter Eisentraut writes: > Should anything outside of libpq be using PQExpBuffer? Perhaps not. PQExpBuffer's behavior for OOM cases is designed specifically for libpq, where exit-on-OOM is not okay and we can hope to include failure checks wherever needed. For most of our application code,

Patch: Add parse_type Function

2024-02-04 Thread David E. Wheeler
Hackers, Attached is a patch to add a new function, `parse_type()`. It parses a type string and returns a record with the typid and typmod for the type, or raises an error if the type is invalid. It’s effectively a thin layer over the parser’s parseTypeString() function. The purpose of this

Re: Clean up command argument assembly

2024-02-04 Thread Peter Eisentraut
On 05.07.23 07:22, Peter Eisentraut wrote: It's a bit bogus to use PQExpBuffer for these. If you run out of memory, you silently get an empty string instead. StringInfo, which exits the process on OOM, would be more appropriate. We have tons of such inappropriate uses of PQExpBuffer in all our

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-02-04 Thread Andrey M. Borodin
> On 4 Feb 2024, at 18:38, Alvaro Herrera wrote: > > In other words, these barriers are fully useless. +1. I've tried to understand ideas behind barriers, but latest_page_number is heuristics that does not need any guarantees at all. It's also is used in safety check which can fire only

Re: Collation version tracking for macOS

2024-02-04 Thread Jeff Davis
On Thu, 2024-02-01 at 15:58 -0500, Robert Haas wrote: > Not that I'm the most qualified person to have an opinion on this > topic, but did you intend to attach this stuff to this email, or is > it > somewhere else? The previous patch is here:

Re: [EXTERNAL] Re: Add non-blocking version of PQcancel

2024-02-04 Thread Alvaro Herrera
On 2024-Feb-02, Jelte Fennema-Nio wrote: > The only reasonable thing I can think of to make that situation better > is to move that part of the function outside of PQcancelPoll and > create a dedicated PQcancelStart function for it. It introduces an > extra function, but it does seem more in line

Re: Commitfest 2024-01 first week update

2024-02-04 Thread vignesh C
On Sun, 4 Feb 2024 at 14:32, Alvaro Herrera wrote: > > On 2024-Jan-10, Daniel Gustafsson wrote: > > > > On 9 Jan 2024, at 23:18, Robert Haas wrote: > > > > > I think we need to be more aggressive about marking things returned > > > with feedback when they don't get updated. > > > > I very much

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-02-04 Thread Alvaro Herrera
Sorry, brown paper bag bug there. Here's the correct one. -- Álvaro Herrera 48°01'N 7°57'E — https://www.EnterpriseDB.com/ "I can't go to a restaurant and order food because I keep looking at the fonts on the menu. Five minutes later I realize that it's also talking about food"

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-02-04 Thread Alvaro Herrera
In short, I propose the attached. -- Álvaro HerreraBreisgau, Deutschland — https://www.EnterpriseDB.com/ >From b4ba8135f8044e0077a27fcf6ad18451380cbcb3 Mon Sep 17 00:00:00 2001 From: Alvaro Herrera Date: Wed, 31 Jan 2024 12:27:51 +0100 Subject: [PATCH v2] Use atomics for

Re: SLRU optimization - configurable buffer pool and partitioning the SLRU lock

2024-02-04 Thread Alvaro Herrera
On 2024-Feb-02, Dilip Kumar wrote: > I have checked the patch and it looks fine to me other than the above > question related to memory barrier usage one more question about the > same, basically below to instances 1 and 2 look similar but in 1 you > are not using the memory write_barrier whereas

Re: Commitfest 2024-01 first week update

2024-02-04 Thread Alvaro Herrera
On 2024-Jan-10, Daniel Gustafsson wrote: > > On 9 Jan 2024, at 23:18, Robert Haas wrote: > > > I think we need to be more aggressive about marking things returned > > with feedback when they don't get updated. > > I very much agree. Having marked quite a lot of patches as RwF when being CFM >

Re: Where can I find the doxyfile?

2024-02-04 Thread Alvaro Herrera
On 2024-Feb-02, John Morris wrote: > Here is the updated patch. It should fix the meson issue when no > doxygen is present. I wish you'd stop proposing the lex filter so that we can discuss the Doxyfile.in file and the accompanying Meson rule. I think there's pretty much zero chance that we'd