Re: logical decoding and replication of sequences, take 2

2023-03-16 Thread John Naylor
On Wed, Mar 15, 2023 at 7:00 PM Tomas Vondra wrote: > > On 3/10/23 11:03, John Naylor wrote: > > + * When we're called via the SQL SRF there's already a transaction > > > > I see this was copied from existing code, but I found it confusing -- > > does this function have a stable name? > > What

Re: logical decoding and replication of sequences, take 2

2023-03-16 Thread John Naylor
On Wed, Mar 15, 2023 at 7:51 PM Tomas Vondra wrote: > > > > On 3/14/23 08:30, John Naylor wrote: > > I tried a couple toy examples with various combinations of use styles. > > > > Three with "automatic" reading from sequences: > > > > create table test(i serial); > > create table test(i int

Re: slapd logs to syslog during tests

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 23:52:04 -0400, Tom Lane wrote: > Andres Freund writes: > > I got sidetracked trying to make slapd stop any and all syslog access, but > > it > > doesn't look like that's possible. But working on commiting the logfile-only > > approach now. Planning to backpatch this, unless

Re: logical decoding and replication of sequences, take 2

2023-03-16 Thread vignesh C
lking about relfilenodes. For example, if > you create a sequence, add it to publication, and then in a later > transaction you do > >ALTER SEQUENCE x RESTART > > or something else that creates a new relfilenode, then the subsequent > increments are visible only in that trans

Re: psql \watch 2nd argument: iteration count

2023-03-16 Thread Andrey Borodin
On Wed, Mar 15, 2023 at 5:54 PM Michael Paquier wrote: > > On Wed, Mar 15, 2023 at 04:58:49PM +0900, Michael Paquier wrote: > > Yep. You are right. > > Fixed that and applied 0001. Great, thanks! > > +valptr++; > +if (strncmp("i", opt, strlen("i")) == 0 || > +

Re: slapd logs to syslog during tests

2023-03-16 Thread Tom Lane
Andres Freund writes: > I got sidetracked trying to make slapd stop any and all syslog access, but it > doesn't look like that's possible. But working on commiting the logfile-only > approach now. Planning to backpatch this, unless somebody protests very soon. Sadly, buildfarm seems to be having

Re: Simplify some codes in pgoutput

2023-03-16 Thread Peter Smith
On Wed, Mar 15, 2023 at 7:30 PM houzj.f...@fujitsu.com wrote: > > Hi, > > I noticed that there are some duplicated codes in pgoutput_change() function > which can be simplified, and here is an attempt to do that. > > Best Regards, > Hou Zhijie Hi Hou-san. I had a quick look at the 0001 patch.

Re: A problem about ParamPathInfo for an AppendPath

2023-03-16 Thread Richard Guo
On Fri, Mar 17, 2023 at 6:15 AM Tom Lane wrote: > Pushed. I thought the comment needed to be completely rewritten not just > tweaked, and I felt it was probably reasonable to continue to exclude > dummy paths from getting the more expensive treatment. Yes agreed. Thanks for the changes and

Re: gcc 13 warnings

2023-03-16 Thread John Naylor
On Fri, Mar 17, 2023 at 1:11 AM Andres Freund wrote: > On 2023-03-16 13:54:29 -0400, Tom Lane wrote: > So I just elected to leave it at the default for meson. In my build scripts I've been setting it to -O2, because that seemed the obvious thing to do, and assumed some later commit would get

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Amit Kapila
On Fri, Mar 17, 2023 at 6:42 AM Peter Smith wrote: > > On Thu, Mar 16, 2023 at 1:55 PM Amit Kapila wrote: > > > > On Wed, Mar 15, 2023 at 3:33 PM Melih Mutlu wrote: > > > > > > Amit Kapila , 15 Mar 2023 Çar, 12:31 tarihinde > > > şunu yazdı: > > >> > > >> On Tue, Mar 14, 2023 at 4:32 PM Melih

Re: Assert failure of the cross-check for nullingrels

2023-03-16 Thread Richard Guo
On Mon, Mar 13, 2023 at 5:44 PM Richard Guo wrote: > On Mon, Mar 13, 2023 at 5:03 PM Richard Guo > wrote: > >> Back to the original issue, if a join has more than one quals, actually >> we treat them as a whole when we check if identity 3 applies as well as >> when we adjust them to be suitable

Re: zstd compression for pg_dump

2023-03-16 Thread Tomas Vondra
On 3/16/23 05:50, Justin Pryzby wrote: > On Fri, Mar 10, 2023 at 12:48:13PM -0800, Jacob Champion wrote: >> On Wed, Mar 8, 2023 at 10:59 AM Jacob Champion >> wrote: >>> I did some smoke testing against zstd's GitHub release on Windows. To >>> build against it, I had to construct an import

RE: Allow logical replication to copy tables in binary format

2023-03-16 Thread shiy.f...@fujitsu.com
On Thu, Mar 16, 2023 9:20 PM Melih Mutlu wrote: > > Hi, > > Please see the attached v16. > Thanks for updating the patch. +# Cannot sync due to type mismatch +$node_subscriber->wait_for_log(qr/ERROR: ( [A-Z0-9]+:)? incorrect binary data format/); +# Ensure the COPY command is executed in

Re: pg_dump versus hash partitioning

2023-03-16 Thread Julien Rouhaud
On Thu, Mar 16, 2023 at 08:43:56AM -0400, Tom Lane wrote: > Julien Rouhaud writes: > > On Mon, Mar 13, 2023 at 07:39:12PM -0400, Tom Lane wrote: > >> Yeah, we need to do both. Attached find an updated patch series: > > > I didn't find a CF entry, is it intended? > > Yeah, it's there: > >

Re: Add pg_walinspect function with block info columns

2023-03-16 Thread Peter Geoghegan
On Thu, Mar 16, 2023 at 2:19 AM Bharath Rupireddy wrote: > On Wed, Mar 15, 2023 at 12:20 PM Michael Paquier wrote: > > I am not sure to get the concern here. As long as one is smart enough > > with SQL, there is no need to perform a double scan of the contents of > > pg_wal with a large scan on

Re: Add LZ4 compression in pg_dump

2023-03-16 Thread Tomas Vondra
On 3/16/23 23:58, Justin Pryzby wrote: > On Thu, Mar 16, 2023 at 11:30:50PM +0100, Tomas Vondra wrote: >> On 3/16/23 01:20, Justin Pryzby wrote: >>> But try reading the diff while looking for the cause of a bug. It's the >>> difference between reading 50, two-line changes, and reading a hunk

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Peter Smith
On Fri, Mar 17, 2023 at 12:20 AM Melih Mutlu wrote: > > Hi, > > Please see the attached v16. > > Peter Smith , 16 Mar 2023 Per, 03:03 tarihinde şunu > yazdı: >> >> Here are some review comments for v15-0001 > > > I applied your comments in the updated patch. Thanks. I checked patchv16-0001 and

Re: "current directory" in a server error message

2023-03-16 Thread Kyotaro Horiguchi
At Thu, 16 Mar 2023 12:05:32 -0400, Tom Lane wrote in > Kyotaro Horiguchi writes: > > At Thu, 16 Mar 2023 09:32:05 +0530, Bharath Rupireddy > > wrote in > >> On Thu, Mar 16, 2023 at 7:47 AM Kyotaro Horiguchi > >> wrote: > >>> Thus I think that the message should read "path must be in or

Re: Amcheck verification of GiST and GIN

2023-03-16 Thread Peter Geoghegan
On Thu, Mar 16, 2023 at 4:48 PM Peter Geoghegan wrote: > Some feedback on the GiST patch: I see that the Bloom filter that's used to implement heapallindexed verification fingerprints index tuples that are formed via calls to gistFormTuple(), without any attempt to normalize-away differences in

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Peter Smith
On Thu, Mar 16, 2023 at 1:55 PM Amit Kapila wrote: > > On Wed, Mar 15, 2023 at 3:33 PM Melih Mutlu wrote: > > > > Amit Kapila , 15 Mar 2023 Çar, 12:31 tarihinde > > şunu yazdı: > >> > >> On Tue, Mar 14, 2023 at 4:32 PM Melih Mutlu wrote: > > > > > >> > >> What purpose does this test serve

Re: slapd logs to syslog during tests

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 16:14:58 -0400, Andrew Dunstan wrote: > are you moving ahead with this? I got sidetracked trying to make slapd stop any and all syslog access, but it doesn't look like that's possible. But working on commiting the logfile-only approach now. Planning to backpatch this, unless

Re: Option to not use ringbuffer in VACUUM, using it in failsafe mode

2023-03-16 Thread Melanie Plageman
On Wed, Mar 15, 2023 at 9:03 PM Melanie Plageman wrote: > On Sat, Mar 11, 2023 at 2:16 PM Justin Pryzby wrote: > > On Sat, Mar 11, 2023 at 09:55:33AM -0500, Melanie Plageman wrote: > > This patch should add support in vacuumdb.c. And maybe a comment about > > adding support there, since it's

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Michael Paquier
On Thu, Mar 16, 2023 at 08:10:12PM -0400, Tom Lane wrote: > Maybe flush those special messages too? I'm not sure how long > they've been obsolete, though. KRB4 was switched in a159ad3 back in 2005, and KRB5 in 98de86e back in 2014 (deprecated in 8.3, so that's even older than creds). So yes,

Re: suppressing useless wakeups in logical/worker.c

2023-03-16 Thread Nathan Bossart
I've attached a minimally-updated patch that doesn't yet address the bigger topics under discussion. On Thu, Mar 16, 2023 at 03:30:37PM +0530, Amit Kapila wrote: > On Wed, Feb 1, 2023 at 5:35 AM Nathan Bossart > wrote: >> On Sat, Jan 28, 2023 at 10:26:25AM +0530, Amit Kapila wrote: >> > BTW, do

Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-16 Thread Amit Kapila
On Fri, Mar 17, 2023 at 5:41 AM Tom Lane wrote: > > Amit Kapila writes: > > On Thu, Mar 16, 2023 at 9:33 PM Önder Kalacı wrote: > >>> and backpatch the fix for dropped column to PG10. > > > You can first submit the fix for dropped columns with patches till > > v10. Once that is committed, then

Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-16 Thread Tom Lane
Amit Kapila writes: > On Thu, Mar 16, 2023 at 9:33 PM Önder Kalacı wrote: >>> and backpatch the fix for dropped column to PG10. > You can first submit the fix for dropped columns with patches till > v10. Once that is committed, then you can send the patches for > generated columns. Don't worry

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Tom Lane
Michael Paquier writes: > On Thu, Mar 16, 2023 at 10:49:45AM -0400, Tom Lane wrote: >> Also, in pg_fe_sendauth, couldn't you just let the default: case >> handle it instead of adding a bespoke error message? We're not >> really expecting that anyone is ever going to hit this, so I'm >> not

Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-16 Thread Amit Kapila
On Thu, Mar 16, 2023 at 9:33 PM Önder Kalacı wrote: > > Hi Amit, Shi Yu, > > > Generated column is introduced in PG12, and I reproduced generated column > > problem > in PG12~PG15. > > For dropped column problem, I reproduced it in PG10~PG15. (Logical > > replication > was introduced in PG10) >

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Michael Paquier
On Thu, Mar 16, 2023 at 10:49:45AM -0400, Tom Lane wrote: > In addition to the changes here, it looks like you could drop the > configure/meson probes that set HAVE_STRUCT_CMSGCRED. Right, done. > Also, in pg_fe_sendauth, couldn't you just let the default: case > handle it instead of adding a

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Amit Kapila
On Thu, Mar 16, 2023 at 6:59 PM Melih Mutlu wrote: > > Amit Kapila , 16 Mar 2023 Per, 06:25 tarihinde şunu > yazdı: >> >> On Thu, Mar 16, 2023 at 8:27 AM Euler Taveira wrote: >> > >> > On Wed, Mar 8, 2023, at 11:50 PM, Amit Kapila wrote: >> > >> > It is not clear to me which version check you

Re: Use pg_pwritev_with_retry() instead of write() in dir_open_for_write() to avoid partial writes?

2023-03-16 Thread Andres Freund
Hi, On 2023-03-07 15:44:46 +1300, Thomas Munro wrote: > On Tue, Mar 7, 2023 at 3:42 PM Thomas Munro wrote: > > Apparently ye olde GCC 4.7 on "lapwing" doesn't like the way you > > initialised that struct. I guess it wants {{0}} instead of {0}. > > Apparently old GCC was wrong about that

Re: Amcheck verification of GiST and GIN

2023-03-16 Thread Peter Geoghegan
On Sun, Feb 5, 2023 at 4:45 PM Andrey Borodin wrote: > Here's v24 == (v23 + a step for pg_amcheck). There's a lot of > shotgun-style changes, but I hope next index types will be easy to add > now. Some feedback on the GiST patch: * You forgot to initialize GistCheckState.heaptuplespresent to 0.

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
Here is a rebased patch in which I've addressed the latest feedback except for the DropRole() part that is under discussion. -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From cd6a75109471e173869a15b39342ff4882eac61f Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Thu, 26

Re: PGDOCS - Replica Identity quotes

2023-03-16 Thread Peter Smith
A rebase was needed due to the recent REPLICA IDENTITY push [1]. PSA v2. -- [1] https://github.com/postgres/postgres/commit/89e46da5e511a6970e26a020f265c9fb4b72b1d2 Kind Regards, Peter Smith. Fujitsu Australia v2-0001-PGDOCS-replica-identity-quotes.patch Description: Binary data

Re: Refactor calculations to use instr_time

2023-03-16 Thread Melanie Plageman
On Thu, Mar 09, 2023 at 04:02:44PM +0300, Nazir Bilal Yavuz wrote: > From dcd49e48a0784a95b8731df1c6ee7c3a612a8529 Mon Sep 17 00:00:00 2001 > From: Nazir Bilal Yavuz > Date: Thu, 9 Mar 2023 15:35:38 +0300 > Subject: [PATCH v5] Refactor instr_time calculations > > Also, some calculations are

Re: Add LZ4 compression in pg_dump

2023-03-16 Thread Justin Pryzby
On Thu, Mar 16, 2023 at 11:30:50PM +0100, Tomas Vondra wrote: > On 3/16/23 01:20, Justin Pryzby wrote: > > But try reading the diff while looking for the cause of a bug. It's the > > difference between reading 50, two-line changes, and reading a hunk that > > replaces 100 lines with a different

Re: Add LZ4 compression in pg_dump

2023-03-16 Thread Tomas Vondra
On 3/16/23 01:20, Justin Pryzby wrote: > On Mon, Mar 13, 2023 at 10:47:12PM +0100, Tomas Vondra wrote: >>> Rearrange functions to their original order allowing a cleaner diff to the >>> prior code; >> >> OK. I wasn't very enthusiastic about this initially, but after thinking >> about it a bit I

Re: A problem about ParamPathInfo for an AppendPath

2023-03-16 Thread Tom Lane
Richard Guo writes: > Attached is a patch for this change and the changes described upthread. Pushed. I thought the comment needed to be completely rewritten not just tweaked, and I felt it was probably reasonable to continue to exclude dummy paths from getting the more expensive treatment.

Re: slapd logs to syslog during tests

2023-03-16 Thread Thomas Munro
On Fri, Mar 17, 2023 at 9:15 AM Andrew Dunstan wrote: > On 2023-03-11 Sa 18:37, Andres Freund wrote: > On my buildfarm host (for all my animals) I noted that slapd was by far the > biggest contributor to syslog. Even though there's not normally slapd > running. It's of course the slapds started

Re: More weird compiler warnings

2023-03-16 Thread Andres Freund
On 2023-03-16 14:31:37 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2022-03-26 13:55:49 -0700, Andres Freund wrote: > >> On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > >>> but I'm wondering if we could silence the warning by changing the loop > >>> condition to > >>> while (--nb >= 0)

Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF

2023-03-16 Thread Tom Lane
Justin Pryzby writes: > On Thu, Mar 16, 2023 at 04:52:07PM -0400, Tom Lane wrote: > It is possible to use ALTER > TABLE ATTACH/DETACH PARTITION to perform these > operations with a weaker lock, thus reducing interference with > concurrent operations on the partitioned

Re: Add LZ4 compression in pg_dump

2023-03-16 Thread Tomas Vondra
On 3/16/23 18:04, gkokola...@pm.me wrote: > > --- Original Message --- > On Tuesday, March 14th, 2023 at 4:32 PM, Tomas Vondra > wrote: >> >> On 3/14/23 16:18, gkokola...@pm.me wrote: >> >>> ...> Would you mind me trying to come with a patch to address your points? >> >> >> That'd be

Re: Track IO times in pg_stat_io

2023-03-16 Thread Melanie Plageman
v5 attached mostly addresses instr_time persistence issues. On Tue, Mar 14, 2023 at 6:56 PM Andres Freund wrote: > On 2023-03-09 11:50:38 -0500, Melanie Plageman wrote: > > On Tue, Mar 7, 2023 at 1:39 PM Andres Freund wrote: > > > On 2023-03-06 11:30:13 -0500, Melanie Plageman wrote: > > > > >

Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF

2023-03-16 Thread Justin Pryzby
On Thu, Mar 16, 2023 at 04:52:07PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > On Thu, Jan 19, 2023 at 04:47:59PM -0500, Robert Treat wrote: > >> I think all of that feedback is useful, I guess the immediate question > >> becomes if Justin wants to try to proceed with his patch

Re: How to check for in-progress transactions

2023-03-16 Thread Tejasvi Kashi
On Thu, Mar 16, 2023 at 17:01, Melanie Plageman wrote: > On Thu, Mar 16, 2023 at 4:43 PM Tejasvi Kashi wrote: > > Thanks a lot for your reply. It looks like this is exactly what I need. > For my use case, I'm trying to get read-only transactions to wait for the > replication of prior writes. >

Re: How to check for in-progress transactions

2023-03-16 Thread Melanie Plageman
On Thu, Mar 16, 2023 at 4:43 PM Tejasvi Kashi wrote: > Thanks a lot for your reply. It looks like this is exactly what I need. For > my use case, I'm trying to get read-only transactions to wait for the > replication of prior writes. can't you use remote_apply?

Re: doc: mentioned CREATE+ATTACH PARTITION as an alternative to CREATE TABLE..PARTITION OF

2023-03-16 Thread Tom Lane
Justin Pryzby writes: > On Thu, Jan 19, 2023 at 04:47:59PM -0500, Robert Treat wrote: >> I think all of that feedback is useful, I guess the immediate question >> becomes if Justin wants to try to proceed with his patch implementing >> the change, or if adjusting the documentation for the current

Re: How to check for in-progress transactions

2023-03-16 Thread Tejasvi Kashi
Hi Bharath, Thanks a lot for your reply. It looks like this is exactly what I need. For my use case, I'm trying to get read-only transactions to wait for the replication of prior writes. Sincerely, Tej Kashi MMath CS, University of Waterloo Waterloo, ON, CA On Thu, 16 Mar 2023 at 01:36,

Re: slapd logs to syslog during tests

2023-03-16 Thread Andrew Dunstan
On 2023-03-11 Sa 18:37, Andres Freund wrote: Hi, On my buildfarm host (for all my animals) I noted that slapd was by far the biggest contributor to syslog. Even though there's not normally slapd running. It's of course the slapds started by various tests. Would anybody mind if I add

Re: Experiments with Postgres and SSL

2023-03-16 Thread Greg Stark
Here's an updated patch for direct SSL connections. I've added libpq client support with a new connection parameter. This allows testing it easily with psql. It's still a bit hard to see what's going on though. I'm thinking it would be good to have libpq keep a string which describes what

Re: The use of atooid() on non-Oid results

2023-03-16 Thread Daniel Gustafsson
> On 16 Mar 2023, at 15:58, Tom Lane wrote: > > Daniel Gustafsson writes: >> When looking at the report in [0] an API choice in the relevant pg_upgrade >> code >> path stood out as curious. check_is_install_user() runs this query to ensure >> that only the install user is present in the

Re: [PATCH] Add pretty-printed XML output option

2023-03-16 Thread Jim Jones
On 15.03.23 22:13, Tom Lane wrote: I wrote: It occurred to me to test v23 for memory leaks, and it had bad ones: * the "newline" node used in the CONTENT case never got freed. Making another one for each line wasn't helping, either. Oh, I did really miss that one. Thanks! Pushed with those

Re: More weird compiler warnings

2023-03-16 Thread Tom Lane
Andres Freund writes: > On 2022-03-26 13:55:49 -0700, Andres Freund wrote: >> On 2022-03-26 16:23:26 -0400, Tom Lane wrote: >>> but I'm wondering if we could silence the warning by changing the loop >>> condition to >>> while (--nb >= 0) >>> which seems like it might be marginally more readable

Re: Date-Time dangling unit fix

2023-03-16 Thread Tom Lane
Hearing no further comments on this, I adjusted DecodeTimeOnly to look more like DecodeDateTime as I recommended upthread, and pushed. regards, tom lane

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 13:54:29 -0400, Tom Lane wrote: > Andres Freund writes: > > On 2023-03-16 12:10:27 -0400, Tom Lane wrote: > >> It wouldn't be entirely surprising if meson is selecting some -W > >> switches that the configure script doesn't ... but I don't know > >> where to check or change

Default libpq connection parameter handling and copy-paste of apparently dead code for it?

2023-03-16 Thread Greg Stark
I notice a number of places in fe-connect.c have copied this idiom where if an option is present they validate the legal options and otherwise they strdup a default value. This strdup of the default option I think is being copied from sslmode's validation which is a bit special but afaics the

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Andres Freund writes: > On 2023-03-16 12:10:27 -0400, Tom Lane wrote: >> It wouldn't be entirely surprising if meson is selecting some -W >> switches that the configure script doesn't ... but I don't know >> where to check or change that. > I think it's just that meson defaults to -O3 (fwiw, I

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Tom Lane
"Jonathan S. Katz" writes: > It looks like in the po files there are a bunch of "SCM_CRED > authentication method not supported" messages that can also be removed. Those will go away in the normal course of translation maintenance, there's no need to remove them by hand. (Generally speaking,

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Jonathan S. Katz
On 3/16/23 10:49 AM, Tom Lane wrote: Michael Paquier writes: libpq has kept some code related to the support of authentication with SCM credentials for some time now, code dead in the backend since 9.1. Wouldn't it be time to let it go and remove this code entirely, erroring in libpq if

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 10:05:06 -0700, Andres Freund wrote: > I think it's just that meson defaults to -O3 (fwiw, I see substantial gains of > that over -O2). I see such warnings with autoconf as well if I make it use > -O3. WRT: In file included from

Re: More weird compiler warnings

2023-03-16 Thread Andres Freund
Hi, On 2022-03-26 13:55:49 -0700, Andres Freund wrote: > On 2022-03-26 16:23:26 -0400, Tom Lane wrote: > > serinus' experimental gcc whines about a few places in network.c: > > > > ../../../../../pgsql/src/backend/utils/adt/network.c: In function 'inetnot': > >

Re: gcc 13 warnings

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 12:10:27 -0400, Tom Lane wrote: > Pavel Stehule writes: > > čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: > >> Hmm, I do not see any warnings on HEAD with Fedora 37's gcc 12.2.1. > >> What non-default configure switches, CFLAGS, etc are you using? > > > meson build

Re: Add LZ4 compression in pg_dump

2023-03-16 Thread gkokolatos
--- Original Message --- On Tuesday, March 14th, 2023 at 4:32 PM, Tomas Vondra wrote: > > > > > On 3/14/23 16:18, gkokola...@pm.me wrote: > > > ...> Would you mind me trying to come with a patch to address your points? > > > That'd be great, thanks. Please keep it split into

RE: Initial Schema Sync for Logical Replication

2023-03-16 Thread Kumar, Sachin
Hi Peter, > Hi, > > I have a couple of questions. > > Q1. > > What happens if the subscriber already has some tables present? For > example, I did not see the post saying anything like "Only if the table does > not already exist then it will be created". > My assumption was the if subscriber

Re: Transparent column encryption

2023-03-16 Thread Andres Freund
Hi, On 2023-03-16 11:26:46 +0100, Peter Eisentraut wrote: > On 13.03.23 22:11, Andres Freund wrote: > > > It adds branches, and it makes tupledescs wider. In tight spots, such as > > > printtup, that can hurt, even if the branches aren't ever entered. > > In fact, I do see a noticable, but not

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
On Thu, Mar 16, 2023 at 04:59:53PM +0100, Peter Eisentraut wrote: > On 16.03.23 16:48, Nathan Bossart wrote: >> > I think the following change in DropRole() is incorrect: >> > >> > if (!is_admin_of_role(GetUserId(), roleid)) >> > ereport(ERROR, >> >

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Pavel Stehule writes: > čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: >> Hmm, I do not see any warnings on HEAD with Fedora 37's gcc 12.2.1. >> What non-default configure switches, CFLAGS, etc are you using? > meson build without any settings > I think so it is related to meson build, I

Re: "current directory" in a server error message

2023-03-16 Thread Tom Lane
Kyotaro Horiguchi writes: > At Thu, 16 Mar 2023 09:32:05 +0530, Bharath Rupireddy > wrote in >> On Thu, Mar 16, 2023 at 7:47 AM Kyotaro Horiguchi >> wrote: >>> Thus I think that the message should read "path must be in or below >>> the data directory" instead. >> BTW, adminpack too has the

Re: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-16 Thread Önder Kalacı
Hi Amit, Shi Yu, > Generated column is introduced in PG12, and I reproduced generated column problem in PG12~PG15. > For dropped column problem, I reproduced it in PG10~PG15. (Logical replication was introduced in PG10) So, I'm planning to split the changes into two commits. The first one fixes

Re: gcc 13 warnings

2023-03-16 Thread Pavel Stehule
čt 16. 3. 2023 v 16:43 odesílatel Tom Lane napsal: > Melanie Plageman writes: > > On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule > wrote: > >> ../src/include/varatt.h:230:36: warning: array subscript 0 is outside > array bounds of ‘char[0]’ [-Warray-bounds=] > > > I see these with gcc 12.2.0

Re: improving user.c error messages

2023-03-16 Thread Peter Eisentraut
On 16.03.23 16:48, Nathan Bossart wrote: I think the following change in DropRole() is incorrect: if (!is_admin_of_role(GetUserId(), roleid)) ereport(ERROR, (errcode(ERRCODE_INSUFFICIENT_PRIVILEGE), -errmsg("must have admin option

Re: improving user.c error messages

2023-03-16 Thread Nathan Bossart
On Thu, Mar 16, 2023 at 04:24:07PM +0100, Peter Eisentraut wrote: > I have committed two pieces that were not message changes separately. Thanks! > I think the following change in DropRole() is incorrect: > > if (!is_admin_of_role(GetUserId(), roleid)) > ereport(ERROR, >

Re: gcc 13 warnings

2023-03-16 Thread Tom Lane
Melanie Plageman writes: > On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule wrote: >> ../src/include/varatt.h:230:36: warning: array subscript 0 is outside array >> bounds of ‘char[0]’ [-Warray-bounds=] > I see these with gcc 12.2.0 also. Hmm, I do not see any warnings on HEAD with Fedora 37's

Re: improving user.c error messages

2023-03-16 Thread Peter Eisentraut
On 10.03.23 01:03, Nathan Bossart wrote: By the way, I'm not sure what the separation between 0001 and 0002 is supposed to be. I'll combine them. I first started with user.c only, but we kept finding new messages to improve. I combined the patches in v7. I have committed two pieces that

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-16 Thread Ilya Gladyshev
> 16 марта 2023 г., в 04:07, Justin Pryzby написал(а): > > On Tue, Mar 14, 2023 at 06:58:14PM +0400, Ilya Gladyshev wrote: >>> The only change from the current patch is (3). (1) still calls >>> count_leaf_partitions(), but only once. I'd prefer that to rearranging >>> the progress reporting

Re: The use of atooid() on non-Oid results

2023-03-16 Thread Tom Lane
Daniel Gustafsson writes: > When looking at the report in [0] an API choice in the relevant pg_upgrade > code > path stood out as curious. check_is_install_user() runs this query to ensure > that only the install user is present in the cluster: > res = executeQueryOrDie(conn, >

Re: Remove last traces of SCM credential auth from libpq?

2023-03-16 Thread Tom Lane
Michael Paquier writes: > libpq has kept some code related to the support of authentication with > SCM credentials for some time now, code dead in the backend since > 9.1. Wouldn't it be time to let it go and remove this code entirely, > erroring in libpq if attempting to connect to a server

Re: gcc 13 warnings

2023-03-16 Thread Melanie Plageman
On Thu, Mar 16, 2023 at 9:40 AM Pavel Stehule wrote: > [1700/2287] Compiling C object src/pl/plpgsql/src/plpgsql.so.p/pl_exec.c.o > In file included from ../src/include/access/htup_details.h:22, > from ../src/pl/plpgsql/src/pl_exec.c:21: > In function ‘assign_simple_var’, >

Re: Move defaults toward ICU in 16?

2023-03-16 Thread Peter Eisentraut
On 09.03.23 20:14, Jeff Davis wrote: Let's come back to that after dealing with the other two. Leaving 0001 open for now. I suspect making a change like this now would result in a bloodbath on the build farm that we could do without. I suggest revisiting this after the commit fest ends.

gcc 13 warnings

2023-03-16 Thread Pavel Stehule
Hi see [504/2287] Compiling C object src/backend/postgres_lib.a.p/access_transam_xlogrecovery.c.o In function ‘recoveryStopsAfter’, inlined from ‘PerformWalRecovery’ at ../src/backend/access/transam/xlogrecovery.c:1749:8: ../src/backend/access/transam/xlogrecovery.c:2737:42: warning:

FW: uuid-ossp source or binaries for Windows

2023-03-16 Thread Mark Hill
I posted this to pgsql-general but I think that's more for Postgres users. I'm trying to build Postgres with the uuid-ossp extension on Windows using the msvc toolset provided with the Postgres source in /src/tools/msvc, e.g. postgresql-14.7/src/tools/msvc. I think I need uuid-ossp

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Melih Mutlu
Amit Kapila , 16 Mar 2023 Per, 06:25 tarihinde şunu yazdı: > On Thu, Mar 16, 2023 at 8:27 AM Euler Taveira wrote: > > > > On Wed, Mar 8, 2023, at 11:50 PM, Amit Kapila wrote: > > > > It is not clear to me which version check you wanted to add because we > > seem to have a binary option in COPY

Re: Allow logical replication to copy tables in binary format

2023-03-16 Thread Melih Mutlu
Hi, Please see the attached v16. Peter Smith , 16 Mar 2023 Per, 03:03 tarihinde şunu yazdı: > Here are some review comments for v15-0001 > I applied your comments in the updated patch. shiy.f...@fujitsu.com , 16 Mar 2023 Per, 05:35 tarihinde şunu yazdı: > On Thu, Mar 16, 2023 2:26 AM Melih

Re: [BUG] Logical replica crash if there was an error in a function.

2023-03-16 Thread Anton A. Melnikov
Hello! On 15.03.2023 21:29, Gregory Stark (as CFM) wrote: These patches that are "Needs Review" and have received no comments at all since before March 1st are these. If your patch is amongst this list I would suggest any of: 1) Move it yourself to the next CF (or withdraw it) 2) Post to the

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-16 Thread Drouvot, Bertrand
On 3/16/23 12:46 PM, Michael Paquier wrote: On Thu, Mar 16, 2023 at 11:32:56AM +0100, Drouvot, Bertrand wrote: On 3/16/23 7:29 AM, Michael Paquier wrote: From what I get with this change, the number of tuples changed by DMLs have their computations done a bit earlier, Thanks for looking at

Re: pg_dump versus hash partitioning

2023-03-16 Thread Tom Lane
Julien Rouhaud writes: > On Mon, Mar 13, 2023 at 07:39:12PM -0400, Tom Lane wrote: >> Yeah, we need to do both. Attached find an updated patch series: > I didn't find a CF entry, is it intended? Yeah, it's there: https://commitfest.postgresql.org/42/4226/ > I'm not sure if you intend to keep

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-03-16 Thread Andrei Zubkov
A little comment fix in update script of a patch -- Andrei Zubkov From 52e75fa05f5dea5700d96aea81ea81d91492b018 Mon Sep 17 00:00:00 2001 From: Andrei Zubkov Date: Thu, 16 Mar 2023 13:18:59 +0300 Subject: [PATCH 1/2] pg_stat_statements tests: Add NOT NULL checking of pg_stat_statements_reset

Re: May be BUG. Periodic burst growth of the checkpoint_req counter on replica.

2023-03-16 Thread Anton A. Melnikov
Hello! On 15.03.2023 21:29, Gregory Stark (as CFM) wrote: These patches that are "Needs Review" and have received no comments at all since before March 1st are these. If your patch is amongst this list I would suggest any of: 1) Move it yourself to the next CF (or withdraw it) 2) Post to the

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

2023-03-16 Thread Amit Kapila
On Wed, Feb 8, 2023 at 9:21 AM wangw.f...@fujitsu.com wrote: > > I think this failure is caused by the recently commit (b7ae039) in the current > HEAD. Rebased the patch set and attach them. > + if (server_version >= 16) + { + appendStringInfo(, "SELECT DISTINCT N.nspname, C.relname,\n" + "

Re: proposal: possibility to read dumped table's name from file

2023-03-16 Thread Pavel Stehule
út 7. 3. 2023 v 3:47 odesílatel Julien Rouhaud napsal: > Hi, > > On Mon, Mar 06, 2023 at 10:20:32PM +0100, Daniel Gustafsson wrote: > > > On 6 Mar 2023, at 21:45, Gregory Stark (as CFM) > wrote: > > > > > > So This patch has been through a lot of commitfests. And it really > > > doesn't

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

2023-03-16 Thread Michael Paquier
On Thu, Mar 16, 2023 at 10:24:32AM +0100, Drouvot, Bertrand wrote: > My plan was to get [1] done before resuming working on the "Split > index and table statistics into different types of stats" one. Okay, I was unsure what should be the order here. Let's see about [1] first, then. -- Michael

Re: Speed-up shared buffers prewarming

2023-03-16 Thread Drouvot, Bertrand
Hi, On 3/15/23 10:40 PM, Matthias van de Meent wrote: On Wed, 15 Mar 2023 at 21:38, Konstantin Knizhnik wrote: Hi hackers, It is well known fact that queries using sequential scan can not be used to prewarm cache, because them are using ring buffer even if shared buffers are almost empty.

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-16 Thread Michael Paquier
On Thu, Mar 16, 2023 at 11:32:56AM +0100, Drouvot, Bertrand wrote: > On 3/16/23 7:29 AM, Michael Paquier wrote: >> From what I get with this change, the number of tuples changed by DMLs >> have their computations done a bit earlier, > > Thanks for looking at it! > > Right, but note this is in a

Re: Making empty Bitmapsets always be NULL

2023-03-16 Thread Yuya Watari
Hello, On Thu, Mar 16, 2023 at 10:30 AM Yuya Watari wrote: > My idea is to compute the bitwise OR of all bitmapwords of the result > Bitmapset. The bitwise OR can be represented as a single operation in > the machine code and does not require any conditional branches. If the > bitwise ORed value

Re: [PATCH] Tracking statements entry timestamp in pg_stat_statements

2023-03-16 Thread Andrei Zubkov
Hi Michael, Thank you for your attention. On Thu, 2023-03-16 at 16:13 +0900, Michael Paquier wrote: > +/* First we have to remove them from the extension */ > +ALTER EXTENSION pg_stat_statements DROP VIEW pg_stat_statements; > +ALTER EXTENSION pg_stat_statements DROP FUNCTION >

Re: logical decoding and replication of sequences, take 2

2023-03-16 Thread Amit Kapila
On Thu, Mar 16, 2023 at 1:08 PM Masahiko Sawada wrote: > > Hi, > > On Wed, Mar 15, 2023 at 9:52 PM Tomas Vondra > wrote: > > > > > > > > On 3/14/23 08:30, John Naylor wrote: > --- > I got an assertion failure. The reproducible steps are: > > 1. On publisher > alter system set

Re: [EXTERNAL] Support load balancing in libpq

2023-03-16 Thread Daniel Gustafsson
In general I think this feature makes sense (which has been echoed many times in the thread), and the implementation strikes a good balance of robustness and simplicity. Reading this I think it's very close to being committable, but I have a few comments on the patch series: +sent to the

RE: Dropped and generated columns might cause wrong data on subs when REPLICA IDENTITY FULL

2023-03-16 Thread shiy.f...@fujitsu.com
On Thu, Mar 16, 2023 5:23 PM Amit Kapila wrote: > > On Mon, Mar 13, 2023 at 6:26 PM Önder Kalacı > wrote: > > > > Attaching v2 > > > > Can we change the comment to: "Ignore dropped and generated columns as > the publisher doesn't send those."? After your change, att = >

Re: Add a hook to allow modification of the ldapbindpasswd

2023-03-16 Thread Andrew Dunstan
On 2023-03-15 We 18:18, Andrew Dunstan wrote: On 2023-03-15 We 17:50, Tom Lane wrote: Andrew Dunstan writes: pushed. drongo is not happy with this, but I'm kind of baffled as to why: "c:\\prog\\bf\\root\\HEAD\\pgsql.build\\pgsql.sln" (default target) (1) ->

Re: Reconcile stats in find_tabstat_entry() and get rid of PgStat_BackendFunctionEntry

2023-03-16 Thread Drouvot, Bertrand
Hi, On 3/16/23 7:29 AM, Michael Paquier wrote: On Mon, Mar 06, 2023 at 08:33:15AM +0100, Drouvot, Bertrand wrote: Thanks for having looked at it! Looking at that, I have a few comments. +tabentry = (PgStat_TableStatus *) entry_ref->pending; +tablestatus =

  1   2   >