Re: Simplify some codes in pgoutput

2023-03-29 Thread Amit Kapila
On Thu, Mar 30, 2023 at 11:12 AM Peter Smith wrote: > > > > > > > 5. > > > AFAIK, the "if (change->data.tp.oldtuple)" can only be true for UPDATE > > > or DELETE, so the code would be better to include a sanity Assert. > > > > > > SUGGESTION > > > if (change->data.tp.oldtuple) > > > { > > >

Re: Minimal logical decoding on standbys

2023-03-29 Thread Jeff Davis
On Thu, 2023-03-02 at 23:58 -0800, Jeff Davis wrote: > On Thu, 2023-03-02 at 11:45 -0800, Jeff Davis wrote: > > In this case it looks easier to add the right API than to be sure > > about > > whether it's needed or not. > > I attached a sketch of one approach. I'm not very confident that it's >

Re: Simplify some codes in pgoutput

2023-03-29 Thread Peter Smith
Hi Hou-san, I looked again at v4-0001. On Thu, Mar 30, 2023 at 2:01 PM houzj.f...@fujitsu.com wrote: > > On Thursday, March 30, 2023 9:15 AM Peter Smith wrote: > > ... > > > > 2. > > /* Convert tuple if needed. */ > > if (relentry-> attrmap) > > { > > ... > > } > > > > The "Convert tuple

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-29 Thread John Naylor
On Thu, Mar 30, 2023 at 10:02 AM Andres Freund wrote: > Attached is v6. Changes: 0006: +ereport(ERROR, +errcode_for_file_access(), +errmsg("could not extend file \"%s\" with posix_fallocate(): %m", + FilePathName(v->mdfd_vfd)), +

Re: running logical replication as the subscription owner

2023-03-29 Thread Jeff Davis
On Wed, 2023-03-29 at 16:00 -0400, Robert Haas wrote: > Here's a new patch set to show how this would work. 0001 is as > before. The following special case ("unless they can SET ROLE..."): /* * Try to prevent the user to which we're switching from assuming the * privileges of the current

Re: ALTER TABLE SET ACCESS METHOD on partitioned tables

2023-03-29 Thread Justin Pryzby
On Mon, Mar 27, 2023 at 11:34:36PM -0500, Justin Pryzby wrote: > On Tue, Mar 28, 2023 at 09:13:10AM +0900, Michael Paquier wrote: > > On Mon, Mar 20, 2023 at 09:30:50AM +0900, Michael Paquier wrote: > > > Did you check dump and restore flows with partition > > > trees and --no-table-access-method?

Re: Doc: Rework contrib appendix -- informative titles, tweaked sentences

2023-03-29 Thread Noah Misch
On Sun, Jan 22, 2023 at 02:42:46PM -0600, Karl O. Pinc wrote: > v10-0001-List-trusted-and-obsolete-extensions.patch > + > + These modules and extensions are obsolete: > + > + > + > + > + > + Commit a013738 incorporated this change. Since xml2 is the only in-tree way to use

Re: fix stats_fetch_consistency value in postgresql.conf.sample

2023-03-29 Thread Justin Pryzby
On Wed, Jul 13, 2022 at 04:49:00PM -0700, Andres Freund wrote: > On 2022-07-14 08:46:02 +0900, Michael Paquier wrote: > > On Wed, Jul 13, 2022 at 12:30:00PM -0500, Justin Pryzby wrote: > > > How did you make this list ? Was it by excluding things that failed for > > > you ? > > > > > > cfbot is

Re: PGdoc: add ID attribute to create_publication.sgml

2023-03-29 Thread Peter Smith
Hi Kuroda-san. This patch had already gone through several review cycles when it was known as v5-0002, in the previous thread [1], so it is already LGTM. Just to be sure, I applied it again, rebuilt the HTML docs, and re-checked all the rendering. I have marked the CF entry for this patch as

Re: Add pg_walinspect function with block info columns

2023-03-29 Thread Bharath Rupireddy
On Thu, Mar 30, 2023 at 5:15 AM Peter Geoghegan wrote: > > On Wed, Mar 29, 2023 at 12:47 PM Peter Geoghegan wrote: > > A couple of small tweaks to this appear in the attached revision, v8. > > I spent some time on the documentation today, too. Attached is v9, > which seems pretty close to being

Re: logical decoding and replication of sequences, take 2

2023-03-29 Thread Masahiko Sawada
On Thu, Mar 30, 2023 at 12:01 PM Amit Kapila wrote: > > On Wed, Mar 29, 2023 at 7:58 PM Tomas Vondra > wrote: > > > > On 3/29/23 11:51, Amit Kapila wrote: > > >> > > >> It's not clear to me what should be the exact behavior? > > >> > > >> I mean, imagine we're opening a connection for logical

Re: logical decoding and replication of sequences, take 2

2023-03-29 Thread Amit Kapila
On Wed, Mar 29, 2023 at 7:58 PM Tomas Vondra wrote: > > On 3/29/23 11:51, Amit Kapila wrote: > >> > >> It's not clear to me what should be the exact behavior? > >> > >> I mean, imagine we're opening a connection for logical replication, and > >> the subscriber does not handle sequences. What

RE: Simplify some codes in pgoutput

2023-03-29 Thread houzj.f...@fujitsu.com
On Thursday, March 30, 2023 9:15 AM Peter Smith wrote: > > Hi Hou-san, > > I tried to compare the logic of patch v3-0001 versus the original HEAD code. > > IMO this patch logic is not exactly the same as before -- there are > some subtle differences. I am not sure if these differences

RE: PGdoc: add ID attribute to create_publication.sgml

2023-03-29 Thread Hayato Kuroda (Fujitsu)
Dear Peter, > > This thread is motivated from [1]. This patch adds some links that refer > publication options. > > > > Is this the correct attachment? Opps, I attached wrong one. Here is currect. Best Regards, Hayato Kuroda FUJITSU LIMITED

Re: Should vacuum process config file reload more often

2023-03-29 Thread Masahiko Sawada
Hi, Thank you for updating the patches. On Thu, Mar 30, 2023 at 5:01 AM Melanie Plageman wrote: > > Thanks for the detailed review! > > On Tue, Mar 28, 2023 at 11:09 PM Kyotaro Horiguchi > wrote: > > > > At Tue, 28 Mar 2023 20:35:28 -0400, Melanie Plageman > > wrote in > > > On Tue, Mar 28,

Re: PGdoc: add ID attribute to create_publication.sgml

2023-03-29 Thread Peter Smith
On Thu, Mar 30, 2023 at 12:57 PM Hayato Kuroda (Fujitsu) wrote: > > Dear hackers, > > This thread is motivated from [1]. This patch adds some links that refer > publication options. > Is this the correct attachment? -- Kind Regards, Peter Smith, Fujitsu Australia

Re: ICU locale validation / canonicalization

2023-03-29 Thread Jeff Davis
On Tue, 2023-03-28 at 08:41 +0200, Peter Eisentraut wrote: > [PATCH v9 1/5] Fix error inconsistency in older ICU versions. > > ok Committed 0001. > [PATCH v9 2/5] initdb: replace check_icu_locale() with >   default_icu_locale(). > > I would keep the #ifdef USE_ICU inside the lower-level

PGdoc: add ID attribute to create_publication.sgml

2023-03-29 Thread Hayato Kuroda (Fujitsu)
Dear hackers, This thread is motivated from [1]. This patch adds some links that refer publication options. While adding missing ID attributes to create_subscription.sgml, we found that this could extend to create_publication.sgml. In the file no entries have an XML ID attribute, but I think

RE: [EXTERNAL] Support load balancing in libpq

2023-03-29 Thread Hayato Kuroda (Fujitsu)
Dear Daniel, Jelte Thank you for creating a good feature! While checking the buildfarm, I found a failure on NetBSD caused by the added code[1]: ``` fe-connect.c: In function 'libpq_prng_init': fe-connect.c:1048:11: error: cast from pointer to integer of different size

RE: Initial Schema Sync for Logical Replication

2023-03-29 Thread Kumar, Sachin
> From: Masahiko Sawada > > > > One related idea is that currently, we fetch the table list > > corresponding to publications in subscription and create the entries > > for those in pg_subscription_rel during Create Subscription, can we > > think of postponing that work till after the initial

Re: Transparent column encryption

2023-03-29 Thread Andres Freund
Hi, On 2023-03-29 19:08:25 +0200, Peter Eisentraut wrote: > On 29.03.23 18:24, Andres Freund wrote: > > On 2023-03-29 18:08:29 +0200, Peter Eisentraut wrote: > > > On 24.03.23 19:12, Andres Freund wrote: > > > > > I thought about this some more. I think we could get rid of > > > > >

Re: Simplify some codes in pgoutput

2023-03-29 Thread Peter Smith
Hi Hou-san, I tried to compare the logic of patch v3-0001 versus the original HEAD code. IMO this patch logic is not exactly the same as before -- there are some subtle differences. I am not sure if these differences represent real problems or not. Below are all my review comments: == 1.

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-29 Thread Andres Freund
Hi, On 2023-03-29 20:51:04 -0400, Melanie Plageman wrote: > > > +if (returnCode == 0) > > > +return 0; > > > + > > > +/* for compatibility with %m printing etc */ > > > +errno = returnCode; > > > + > > > +/* > > > +* Return in cases of a "real" failure, if fallocate is

Re: refactoring relation extension and BufferAlloc(), faster COPY

2023-03-29 Thread Melanie Plageman
On Tue, Mar 28, 2023 at 11:47 PM Andres Freund wrote: > > On 2023-03-26 17:42:45 -0400, Melanie Plageman wrote: > > +{ > > +/* if errno is unset, assume problem is no disk space */ > > +if (errno == 0) > > +errno = ENOSPC; > > +return -1; > > +} > > > >

Re: Add pg_walinspect function with block info columns

2023-03-29 Thread Peter Geoghegan
On Wed, Mar 29, 2023 at 12:47 PM Peter Geoghegan wrote: > A couple of small tweaks to this appear in the attached revision, v8. I spent some time on the documentation today, too. Attached is v9, which seems pretty close to being committable. I hope to commit what I have here (or something very

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-03-29 Thread Yurii Rashkovskii
Hi Tom, Thank you for your feedback. Below are my comments. On Wed, Mar 29, 2023 at 6:55 PM Tom Lane wrote: > Yurii Rashkovskii writes: > > I would like to suggest a patch against master (although it may be worth > > backporting it) that makes it possible to listen on any unused port. > > I

Re: what should install-world do when docs are not available?

2023-03-29 Thread Justin Pryzby
> +Enables the building of documentation in HTML and > +man format. It defaults to auto. > + > +Enables the building of documentation in PDF > +format. It defaults to auto. These sound awkward. Recommend: Enables building the documentation in PDF format. It

Re: what should install-world do when docs are not available?

2023-03-29 Thread Andres Freund
Hi, On 2023-03-29 18:39:27 +0200, Peter Eisentraut wrote: > On 29.03.23 18:25, Andres Freund wrote: > > On 2023-03-29 18:15:02 +0200, Peter Eisentraut wrote: > > > On 25.03.23 21:14, Andres Freund wrote: > > > > I wonder if, for meson, the best behaviour would be to make 'docs' a > > > > feature

Re: Temporary tables versus wraparound... again

2023-03-29 Thread Justin Pryzby
On Thu, Feb 2, 2023, 15:47 Alvaro Herrera wrote: > Are you still at this? CFbot says the meson tests failed last time for > some reason: > http://commitfest.cputube.org/greg-stark.html On Sat, Feb 04, 2023 at 05:12:36PM +0100, Greg Stark wrote: > I think that was spurious. It looked good when

Re: is_superuser is not documented

2023-03-29 Thread Bruce Momjian
On Thu, Mar 2, 2023 at 12:00:43PM -0500, Joseph Koshakow wrote: > > > On Thu, Mar 2, 2023 at 11:53 AM Fujii Masao > wrote: > > > >    On 2022/09/14 14:27, bt22kawamotok wrote: > >    > I update patch to reflect master update. > > > >    Thanks for updating the patch! > > > >    +       > >    

Re: [EXTERNAL] Support load balancing in libpq

2023-03-29 Thread Daniel Gustafsson
I took another couple of looks at this and pushed it after a few small tweaks to the docs. -- Daniel Gustafsson

Re: TAP output format in pg_regress

2023-03-29 Thread Daniel Gustafsson
> On 29 Mar 2023, at 21:14, Daniel Gustafsson wrote: > Ugh, I clearly should've stayed on the couch yesterday. Maybe today as well, just as I had sent this I realized there is mention of the output format in the docs that I had missed. The attached changes that as well to match the new format.

Re: Should vacuum process config file reload more often

2023-03-29 Thread Melanie Plageman
Thanks for the detailed review! On Tue, Mar 28, 2023 at 11:09 PM Kyotaro Horiguchi wrote: > > At Tue, 28 Mar 2023 20:35:28 -0400, Melanie Plageman > wrote in > > On Tue, Mar 28, 2023 at 4:21 AM Kyotaro Horiguchi > > wrote: > > > > > > At Mon, 27 Mar 2023 14:12:03 -0400, Melanie Plageman > >

Re: running logical replication as the subscription owner

2023-03-29 Thread Robert Haas
On Tue, Mar 28, 2023 at 6:48 PM Jeff Davis wrote: > That's not strictly true. See the example at the bottom of this email. Yeah, we're very casual about repeated user switching in all kinds of contexts, and that's really pretty scary. I don't know how to fix that without removing capabilities

Re: Add pg_walinspect function with block info columns

2023-03-29 Thread Peter Geoghegan
On Mon, Mar 27, 2023 at 7:40 PM Peter Geoghegan wrote: > Attached revision v7 adjusts the column order. This is still WIP, but > gives a good idea of the direction I'm going in. A couple of small tweaks to this appear in the attached revision, v8. Now it looks like this: pg@regression:5432

Re: TAP output format in pg_regress

2023-03-29 Thread Daniel Gustafsson
> On 29 Mar 2023, at 09:08, Peter Eisentraut > wrote: > > On 28.03.23 15:56, Daniel Gustafsson wrote: >>> On 28 Mar 2023, at 15:26, Daniel Gustafsson wrote: >>> I think the attached is a good candidate for going in, but I would like to >>> see it >>> for another spin in the CF bot first. >>

Re: TAP tests for psql \g piped into program

2023-03-29 Thread Daniel Verite
Peter Eisentraut wrote: > So for your patch, I would just do the path adjustment ad hoc in-line. > It's just one additional line. Here's the patch updated that way. Best regards, -- Daniel Vérité https://postgresql.verite.pro/ Twitter: @DanielVerite diff --git

Re: Add pg_walinspect function with block info columns

2023-03-29 Thread Peter Geoghegan
On Tue, Mar 28, 2023 at 3:34 PM Michael Paquier wrote: > I disagree with this argument. Personally, I have a *much* better > experience with textual representation because there is no need to > cross-check the internals of the code in case you don't remember what > a given number means in an

Re: pgindent vs. git whitespace check

2023-03-29 Thread Daniel Gustafsson
> On 29 Mar 2023, at 19:18, Bruce Momjian wrote: > On Thu, Feb 23, 2023 at 09:36:00AM +0100, Daniel Gustafsson wrote: >>> On 23 Feb 2023, at 05:48, Tom Lane wrote: >>> Mass conversion of /* to // style would answer that, >>> but would also create an impossible back-patching problem. >> >>

Re: SQL/JSON revisited

2023-03-29 Thread Alexander Lakhin
Hi, 29.03.2023 13:27, Alvaro Herrera wrote: ... and pushed it now, after some more meddling. I'll rebase the rest of the series now. Please look at the several minor issues/inconsistencies, I've spotted in the commit: 1) s/JSON_ARRRAYAGG/JSON_ARRAYAGG/ 2) check_key_uniqueness vs

Re: POC: Lock updated tuples in tuple_update() and tuple_delete()

2023-03-29 Thread Alexander Korotkov
Andres, On Mon, Mar 27, 2023 at 1:49 PM Alexander Korotkov wrote: > On Fri, Mar 24, 2023 at 3:39 AM Andres Freund wrote: > > On 2023-03-23 23:24:19 +0300, Alexander Korotkov wrote: > > > On Thu, Mar 23, 2023 at 8:06 PM Andres Freund wrote: > > > > I seriously doubt that solving this at the

Re: pgindent vs. git whitespace check

2023-03-29 Thread Bruce Momjian
On Thu, Feb 23, 2023 at 09:36:00AM +0100, Daniel Gustafsson wrote: > > On 23 Feb 2023, at 05:48, Tom Lane wrote: > > > For my own taste, I really don't have any objection to // in isolation -- > > the problem with it is just that we've got megabytes of code in the other > > style. I fear it'd

Re: Transparent column encryption

2023-03-29 Thread Peter Eisentraut
On 29.03.23 18:24, Andres Freund wrote: Hi, On 2023-03-29 18:08:29 +0200, Peter Eisentraut wrote: On 24.03.23 19:12, Andres Freund wrote: I thought about this some more. I think we could get rid of attusertypmod and just hardcode it as -1. The idea would be that if you ask for an encrypted

Re: Support logical replication of DDLs

2023-03-29 Thread Zheng Li
On Wed, Mar 29, 2023 at 5:13 AM Amit Kapila wrote: > > On Wed, Mar 29, 2023 at 2:49 AM Zheng Li wrote: > > > > > > I agree that a full fledged DDL deparser and DDL replication is too > > big of a task for one patch. I think we may consider approaching this > > feature in the following ways: > >

Re: what should install-world do when docs are not available?

2023-03-29 Thread Peter Eisentraut
On 29.03.23 18:25, Andres Freund wrote: On 2023-03-29 18:15:02 +0200, Peter Eisentraut wrote: On 25.03.23 21:14, Andres Freund wrote: I wonder if, for meson, the best behaviour would be to make 'docs' a feature set to auto. If docs set to enabled, and the necessary tools are not available,

Re: what should install-world do when docs are not available?

2023-03-29 Thread Andres Freund
Hi, On 2023-03-29 18:15:02 +0200, Peter Eisentraut wrote: > On 25.03.23 21:14, Andres Freund wrote: > > I wonder if, for meson, the best behaviour would be to make 'docs' a feature > > set to auto. If docs set to enabled, and the necessary tools are not > > available, fail at that time, instead

Re: Transparent column encryption

2023-03-29 Thread Andres Freund
Hi, On 2023-03-29 18:08:29 +0200, Peter Eisentraut wrote: > On 24.03.23 19:12, Andres Freund wrote: > > > I thought about this some more. I think we could get rid of attusertypmod > > > and just hardcode it as -1. The idea would be that if you ask for an > > > encrypted column of type, say,

Re: what should install-world do when docs are not available?

2023-03-29 Thread Peter Eisentraut
On 25.03.23 21:14, Andres Freund wrote: I wonder if, for meson, the best behaviour would be to make 'docs' a feature set to auto. If docs set to enabled, and the necessary tools are not available, fail at that time, instead of doing so while building. Makes sense to me. If that's what we

Re: Transparent column encryption

2023-03-29 Thread Peter Eisentraut
On 24.03.23 19:12, Andres Freund wrote: I thought about this some more. I think we could get rid of attusertypmod and just hardcode it as -1. The idea would be that if you ask for an encrypted column of type, say, varchar(500), the server isn't able to enforce that anyway, so we could just

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

2023-03-29 Thread Jeff Davis
On Wed, 2023-03-29 at 08:17 -0400, Dave Cramer wrote: > I'm starting to wonder about the utility of the protocol extension > mechanism?  I'm starting to agree that the awkwardness around connection poolers is a problem. If that's the case, I'm wondering if the protocol extensions will ever be

Re: doc: add missing "id" attributes to extension packaging page

2023-03-29 Thread Brar Piening
On 29.03.2023 at 06:52, Hayato Kuroda (Fujitsu) wrote: FYI - my patch is pushed Thanks! Could you please rebase your patch? Done and tested. Patch is attached. Regards, Brar diff --git a/doc/src/sgml/config.sgml b/doc/src/sgml/config.sgml index fcb53c6997..5c50347c58 100644 ---

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

2023-03-29 Thread Jelte Fennema
On Wed, 29 Mar 2023 at 10:43, Denis Laxalde wrote: > More importantly, not having PQcancelSend() creating the PGcancelConn > makes reuse of that value, passing through PQcancelReset(), more > intuitive. E.g., in the tests: You convinced me. Attached is an updated patch where PQcancelSend takes

Re: Initial Schema Sync for Logical Replication

2023-03-29 Thread Masahiko Sawada
On Wed, Mar 29, 2023 at 7:57 PM Kumar, Sachin wrote: > > > > > > From: Amit Kapila > > > > > > I think we won't be able to use same snapshot because the > > > > > > transaction will be committed. > > > > > > In CreateSubscription() we can use the transaction snapshot from > > > > > >

Re: zstd compression for pg_dump

2023-03-29 Thread Jacob Champion
On Wed, Mar 29, 2023 at 6:35 AM Justin Pryzby wrote: > If you have a zstd library with thread support, you could test with > -Z zstd:workers=3. But I think threads aren't enabled in the common > libzstd packages. Jacob figured out how to compile libzstd easily using > "meson wraps" - but I

Re: logical decoding and replication of sequences, take 2

2023-03-29 Thread Peter Eisentraut
On 29.03.23 16:28, Tomas Vondra wrote: Perhaps it'd be reasonable to tie the "protocol version" to subscriber capabilities, so that a protocol version guarantees what message types the subscriber understands. So we could increment the protocol version, check it in pgoutput_startup and then

Re: cataloguing NOT NULL constraints

2023-03-29 Thread Peter Eisentraut
On 27.03.23 15:55, Peter Eisentraut wrote: The information schema should be updated.  I think the following views: - CHECK_CONSTRAINTS - CONSTRAINT_COLUMN_USAGE - DOMAIN_CONSTRAINTS - TABLE_CONSTRAINTS It looks like these have no test coverage; maybe that could be addressed at the same time.

Re: logical decoding and replication of sequences, take 2

2023-03-29 Thread Tomas Vondra
On 3/29/23 11:51, Amit Kapila wrote: > On Wed, Mar 29, 2023 at 12:04 AM Tomas Vondra > wrote: >> >> On 3/28/23 18:34, Masahiko Sawada wrote: >>> On Mon, Mar 27, 2023 at 11:46 PM Tomas Vondra >>> wrote: > > Apart from that, how does the publication having sequences work with >

Re: zstd compression for pg_dump

2023-03-29 Thread Justin Pryzby
On Tue, Mar 28, 2023 at 02:03:49PM -0400, Kirk Wolak wrote: > On Tue, Mar 28, 2023 at 12:23 PM Tomas Vondra > wrote: > > On 3/27/23 19:28, Justin Pryzby wrote: > > > On Fri, Mar 17, 2023 at 03:43:31AM +0100, Tomas Vondra wrote: > > >> On 3/16/23 05:50, Justin Pryzby wrote: > > >>> On Fri, Mar

Re: BufmgrCommit no-op since 2008, remaining uses?

2023-03-29 Thread Tom Lane
Matthias van de Meent writes: > Then, the attached trivial patch removes the function and all > references I could find. Pushed after a bit of fooling with adjacent comments. regards, tom lane

Re: Autogenerate some wait events code and documentation

2023-03-29 Thread Drouvot, Bertrand
Hi, On 3/29/23 11:44 AM, Drouvot, Bertrand wrote: Looking forward to your feedback, Just realized that more polishing was needed. Done in V2 attached. Regards, -- Bertrand Drouvot PostgreSQL Contributors Team RDS Open Source Databases Amazon Web Services: https://aws.amazon.comFrom

Re: SQL/JSON revisited

2023-03-29 Thread Erik Rijkers
Op 3/29/23 om 12:27 schreef Alvaro Herrera: On 2023-Mar-28, Erik Rijkers wrote: In the json_arrayagg() description, it says: 'If ABSENT ON NULL is specified, any NULL values are omitted.' That's true, but as omitting NULL values is the default (i.e., also without that clause) maybe it's better

Re: BufmgrCommit no-op since 2008, remaining uses?

2023-03-29 Thread Matthias van de Meent
On Wed, 29 Mar 2023 at 14:12, Tom Lane wrote: > > Matthias van de Meent writes: > > BufmgrCommit does exactly nothing; it is an empty function and has > > been since commit 33960006 in late 2008 when it stopped calling > > smgrcommit(). > > All two usages of the function (in our code base) seem

Re: Tab completion for AT TIME ZONE

2023-03-29 Thread Pavel Stehule
st 29. 3. 2023 v 12:28 odesílatel Dagfinn Ilmari Mannsåker < ilm...@ilmari.org> napsal: > Hi hackers, > > A while back we added support for completing time zone names after SET > TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. > Here's a trivial patch for that. > +1 Pavel

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

2023-03-29 Thread Dave Cramer
On Tue, 28 Mar 2023 at 19:01, Jeff Davis wrote: > On Tue, 2023-03-28 at 10:22 -0400, Dave Cramer wrote: > > OK, IIUC what you are proposing here is that there would be a > > separate pool for > > database, user, and OIDs. This doesn't seem too flexible. For > > instance if I create a UDT and

Re: BufmgrCommit no-op since 2008, remaining uses?

2023-03-29 Thread Tom Lane
Matthias van de Meent writes: > BufmgrCommit does exactly nothing; it is an empty function and has > been since commit 33960006 in late 2008 when it stopped calling > smgrcommit(). > All two usages of the function (in our code base) seem to be in > xact.c. Are we maintaining it for potential

Re: [PATCH] Allow Postgres to pick an unused port to listen

2023-03-29 Thread Tom Lane
Yurii Rashkovskii writes: > I would like to suggest a patch against master (although it may be worth > backporting it) that makes it possible to listen on any unused port. I think this is a bad idea, mainly because this: > Instead, with this patch, one can specify `port` as `0` (the "wildcard"

BufmgrCommit no-op since 2008, remaining uses?

2023-03-29 Thread Matthias van de Meent
Hi, Whilst reading up on the transaction commit code, I noticed the following lines: /* Tell bufmgr and smgr to prepare for commit */ BufmgrCommit(); BufmgrCommit does exactly nothing; it is an empty function and has been since commit 33960006 in late 2008 when it stopped calling

Re: Initial Schema Sync for Logical Replication

2023-03-29 Thread Amit Kapila
On Tue, Mar 28, 2023 at 8:30 PM Masahiko Sawada wrote: > > On Tue, Mar 28, 2023 at 6:47 PM Amit Kapila wrote: > > > > > > > > > > > > I think we can have same issues as you mentioned New table t1 is > > > > > > added > > > > > > to the publication , User does a refresh publication. > > > > > >

RE: Initial Schema Sync for Logical Replication

2023-03-29 Thread Kumar, Sachin
> > > > From: Amit Kapila > > > > > I think we won't be able to use same snapshot because the > > > > > transaction will be committed. > > > > > In CreateSubscription() we can use the transaction snapshot from > > > > > walrcv_create_slot() till walrcv_disconnect() is called.(I am > > > > > not

Tab completion for AT TIME ZONE

2023-03-29 Thread Dagfinn Ilmari Mannsåker
Hi hackers, A while back we added support for completing time zone names after SET TIMEZONE, but we failed to do the same for the AT TIME ZONE operator. Here's a trivial patch for that. - ilmari >From 57138e851552a99174d00a0e48ce55ca3170df75 Mon Sep 17 00:00:00 2001 From:

Re: SQL/JSON revisited

2023-03-29 Thread Alvaro Herrera
On 2023-Mar-28, Erik Rijkers wrote: > In the json_arrayagg() description, it says: > 'If ABSENT ON NULL is specified, any NULL values are omitted.' > That's true, but as omitting NULL values is the default (i.e., also without > that clause) maybe it's better to say: > 'Any NULL values are omitted

Re: Schema variables - new implementation for Postgres 15

2023-03-29 Thread Peter Eisentraut
On 24.03.23 08:04, Pavel Stehule wrote: Maybe I can divide the  patch 0002-session-variables to three sections - related to memory management, planning and execution? Personally, I find the existing split not helpful. There is no value (to me) in putting code, documentation, and tests in

Re: Add SPLIT PARTITION/MERGE PARTITIONS commands

2023-03-29 Thread stephane tachoires
The following review has been posted through the commitfest application: make installcheck-world: tested, passed Implements feature: tested, passed Spec compliant: tested, passed Documentation:tested, failed Hi, Just a minor warning with documentation patch git apply

Re: logical decoding and replication of sequences, take 2

2023-03-29 Thread Amit Kapila
On Wed, Mar 29, 2023 at 12:04 AM Tomas Vondra wrote: > > On 3/28/23 18:34, Masahiko Sawada wrote: > > On Mon, Mar 27, 2023 at 11:46 PM Tomas Vondra > > wrote: > >>> > >>> Apart from that, how does the publication having sequences work with > >>> subscribers who are not able to handle sequence

Autogenerate some wait events code and documentation

2023-03-29 Thread Drouvot, Bertrand
Hi hackers, In another thread [1], Thomas had the idea to $SUBJECT in a similar way to what is currently done with src/backend/storage/lmgr/lwlocknames.txt. Doing so, like in the attached patch proposal, would help to avoid: - wait event without documentation like observed in [2] - orphaned

Re: XID formatting and SLRU refactorings (was: Add 64-bit XIDs into PostgreSQL 15)

2023-03-29 Thread Aleksander Alekseev
Hi, > As suggested before by Heikki Linnakangas, I've added a patch for making 2PC > transaction state 64-bit. > At first, my intention was to rebuild all twophase interface to use > FullTransactionId. But doing this in a proper > manner would lead to switching from TransactionId to

Re: Support logical replication of DDLs

2023-03-29 Thread Amit Kapila
On Wed, Mar 29, 2023 at 2:49 AM Zheng Li wrote: > > > I agree that a full fledged DDL deparser and DDL replication is too > big of a task for one patch. I think we may consider approaching this > feature in the following ways: > 1. Phased development and testing as discussed in other emails. >

Re: Commitfest 2023-03 starting tomorrow!

2023-03-29 Thread Aleksander Alekseev
Hi, > * Pluggable toaster > - This seems to have digressed from the original patch. There were > patches early on and a lot of feedback. Is the result that the > original patches are Rejected or are they still live? We agreed to work on a completely new RFC which is currently discussed within

Re: Data is copied twice when specifying both child and parent table in publication

2023-03-29 Thread Amit Kapila
On Tue, Mar 28, 2023 at 11:14 PM Jacob Champion wrote: > > On Tue, Mar 28, 2023 at 2:59 AM wangw.f...@fujitsu.com > > > > Would it > > > be enough to just replace that whole thing with gpt.attrs? > > > > Make sense. > > Changed as suggested. > > LGTM, by inspection. Thanks! > Pushed. -- With

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

2023-03-29 Thread Denis Laxalde
Jelte Fennema a écrit : > > Namely, I wonder why it returns a PGcancelConn and what's the > > point of requiring the user to call PQcancelStatus() to see if something > > got wrong. Maybe it could be defined as: > > > > int PQcancelSend(PGcancelConn *cancelConn); > > > > where the return value

Re: Should vacuum process config file reload more often

2023-03-29 Thread Kyotaro Horiguchi
At Wed, 29 Mar 2023 13:21:55 +0900 (JST), Kyotaro Horiguchi wrote in > So, sorry for the noise. I'll review it while this into cnosideration. 0003: It's not this patche's fault, but I don't like the fact that the variables used for GUC, VacuumCostDelay and VacuumCostLimit, are updated outside

Re: "variable not found in subplan target list"

2023-03-29 Thread Amit Langote
On Wed, Mar 29, 2023 at 3:39 AM Tom Lane wrote: > Alvaro Herrera writes: > > So I'm back home and found a couple more weird errors in the log: > > > ERROR: mismatching PartitionPruneInfo found at part_prune_index 0 > > DETALLE: plan node relids (b 1), pruneinfo relids (b 36) > > This one

Re: gcc 13 warnings

2023-03-29 Thread Peter Eisentraut
On 22.03.23 10:45, Peter Eisentraut wrote: On 18.03.23 00:54, Andres Freund wrote: I think a good compromise would be buildtype=debugoptimized, which is -O2 with debug symbols, which also sort of matches the default in the autoconf world. Looks like that'd result in a slightly worse build

Re: TAP output format in pg_regress

2023-03-29 Thread Peter Eisentraut
On 28.03.23 15:56, Daniel Gustafsson wrote: On 28 Mar 2023, at 15:26, Daniel Gustafsson wrote: I think the attached is a good candidate for going in, but I would like to see it for another spin in the CF bot first. Another candidate due to a thinko which raised a compiler warning. This

[POC] Allow an extension to add data into Query and PlannedStmt nodes

2023-03-29 Thread Andrey Lepikhov
Hi, Previously, we read int this mailing list some controversial opinions on queryid generation and Jumbling technique. Here we don't intend to solve these problems but help an extension at least don't conflict with others on the queryId value. Extensions could need to pass some

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-29 Thread Michael Paquier
On Thu, Mar 23, 2023 at 01:54:05PM +, Imseih (AWS), Sami wrote: > Yes, that is possible but we will need to add a libpq API > that allows the caller to pass in a "fetch size". > PQsendQueryParams does not take in a "fetch size", > so it returns all rows, through PQsendQueryParams > >

Re: PGdoc: add missing ID attribute to create_subscription.sgml

2023-03-29 Thread Amit Kapila
On Wed, Mar 29, 2023 at 6:31 AM Hayato Kuroda (Fujitsu) wrote: > > Dear Amit-san, > > > There is no need to break the link line. See attached. > > I understood your saying. I think it's better. > Pushed. -- With Regards, Amit Kapila.

Re: Should vacuum process config file reload more often

2023-03-29 Thread Kyotaro Horiguchi
At Wed, 29 Mar 2023 13:21:55 +0900 (JST), Kyotaro Horiguchi wrote in > autovacuum.c:2893 > /* >* If any of the cost delay parameters has been set > individually for >* this table, disable the balancing algorithm. >*/ >