Re: Orphaned wait event

2023-03-23 Thread Bharath Rupireddy
On Thu, Mar 23, 2023 at 7:43 AM Thomas Munro wrote: > > Hi, > > Commit dee663f7 made WAIT_EVENT_SLRU_FLUSH_SYNC redundant, so here's a > patch to remove it. Yeah, commit [1] removed the last trace of it. I wonder if we can add a WAIT_EVENT_SLRU_FLUSH_SYNC wait event in SlruSyncFileTag(), similar

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

2023-03-23 Thread Brar Piening
On 23.03.2023 at 04:09, Karl O. Pinc wrote: You're quite right. I clearly didn't have my XSLT turned on. Importing only works when templates are matched, not called by name. Sorry for the extra work I've put you through. No problem. As always I've learnt something which may help me in the fu

Re: pg_upgrade and logical replication

2023-03-23 Thread Masahiko Sawada
On Wed, Mar 1, 2023 at 3:55 PM Julien Rouhaud wrote: > > On Wed, Mar 01, 2023 at 11:51:49AM +0530, Amit Kapila wrote: > > On Tue, Feb 28, 2023 at 10:18 AM Julien Rouhaud wrote: > > > > > > Well, as I mentioned I'm *not* interested in a logical-replication-only > > > scenario. Logical replication

Re: Allow logical replication to copy tables in binary format

2023-03-23 Thread Melih Mutlu
Hi, Amit Kapila , 23 Mar 2023 Per, 08:48 tarihinde şunu yazdı: > Pushed the 0001. It may be better to start a separate thread for 0002. > Great! Thanks. Best, -- Melih Mutlu Microsoft

Re: pg_upgrade and logical replication

2023-03-23 Thread Julien Rouhaud
Hi, On Thu, Mar 23, 2023 at 04:27:28PM +0900, Masahiko Sawada wrote: > > I might be missing something but is there any reason why you created a > subscription before pg_upgrade? > > Steps like doing pg_upgrade, then creating missing tables, and then > creating a subscription (with copy_data = fals

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 07:51:37AM +0100, Drouvot, Bertrand wrote: > Thank you both for your keen eye! I just did another check too and did not > find more than the ones you've just reported. This matches what I have, thanks! -- Michael signature.asc Description: PGP signature

Re: Improve logging when using Huge Pages

2023-03-23 Thread Kyotaro Horiguchi
At Thu, 23 Mar 2023 07:23:28 +0900, Michael Paquier wrote in > On Wed, Mar 22, 2023 at 05:18:28PM -0500, Justin Pryzby wrote: > > Wow, good point. I think to make it work we'd need put > > huge_pages_active into BackendParameters and handle it in > > save_backend_variables(). If so, that'd be

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-23 Thread Drouvot, Bertrand
Hi, On 3/22/23 10:35 PM, Imseih (AWS), Sami wrote: What about using an uint64 for calls? That seems more appropriate to me (even if queryDesc->totaltime->calls will be passed (which is int64), but that's already also the case for the "rows" argument and queryDesc->totaltime->rows_processed) Th

Re: Error "initial slot snapshot too large" in create replication slot

2023-03-23 Thread Dilip Kumar
On Thu, Mar 23, 2023 at 10:53 AM Kyotaro Horiguchi wrote: > > At Wed, 22 Mar 2023 14:27:40 +0900 (JST), Kyotaro Horiguchi > wrote in > > At Mon, 20 Mar 2023 13:46:51 -0400, "Gregory Stark (as CFM)" > > wrote in > > > Kyotoro Horiguchi, any chance you'll be able to work on this for this > > > c

Re: Refactoring SysCacheGetAttr to know when attr cannot be NULL

2023-03-23 Thread David Rowley
On Tue, 14 Mar 2023 at 02:19, Daniel Gustafsson wrote: > Rebased v3 on top of recent conflicting ICU changes causing the patch to not > apply anymore. Also took another look around the tree to see if there were > missed callsites but found none new. I had a look at this. It generally seems like

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

2023-03-23 Thread wangw.f...@fujitsu.com
On Thu, Mar 23, 2023 at 12:27 PM Peter Smith wrote: > Here are some review comments for patch v20-0001. Thanks for your comments. > == > src/backend/commands/subscriptioncmds.c > > 3. fetch_table_list > > + /* Get the list of tables from the publisher. */ > + if (server_version >= 16)

Re: Should we remove vacuum_defer_cleanup_age?

2023-03-23 Thread Daniel Gustafsson
> On 22 Mar 2023, at 18:00, Andres Freund wrote: > It wasn't actually that much work to write a patch to remove > vacuum_defer_cleanup_age, see the attached. -and provide protection against +provides protection against relevant rows being removed by vacuum, but the former provides

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 09:33:16AM +0100, Drouvot, Bertrand wrote: > Thanks! LGTM and also do confirm that, with the patch, the JDBC test > does show the correct results. How does JDBC test that? Does it have a dependency on pg_stat_statements? > > That said, not having a test (for the reasons y

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

2023-03-23 Thread Peter Smith
Hi, I had a quick look at the v7 patch. You might consider to encapsulate some of this logic in new functions like: void LogReplicationSlotAquired(bool is_physical, char *slotname) { loglevel = log_replication_commands ? LOG : DEBUG3; if (is_physical) ereport(loglevel,

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

2023-03-23 Thread Alvaro Herrera
Thanks, Brar and Karl, I hope we can get this done soon. As with the patch, we'll need to patch the CSS used in the website for the docs too, as that's the most important place where docs are visited. See this commit for an example: https://git.postgresql.org/gitweb/?p=pgweb.git;a=commitdiff;h=0

Re: Doc: Improve note about copying into postgres_fdw foreign tables in batch

2023-03-23 Thread Etsuro Fujita
On Wed, Mar 22, 2023 at 9:13 PM Daniel Gustafsson wrote: > Patch looks good to me, but I agree with Tatsuo downthread that "similar way > to > the insert case" reads better. Ok, I removed "in". > Theoretically the number could be different > from 1000 if MAX_BUFFERED_TUPLES was changed in the b

Re: Doc: Improve note about copying into postgres_fdw foreign tables in batch

2023-03-23 Thread Daniel Gustafsson
> On 23 Mar 2023, at 10:51, Etsuro Fujita wrote: > seems more appropriate to me as well in this context, so I > left it alone. And just to be clear, I think you are right in leaving it alone given the context. > Attached is an updated version of the patch. LGTM. -- Daniel Gustafsson

Re: Improve the performance of nested loop join in the case of partitioned inner table

2023-03-23 Thread David Rowley
On Thu, 23 Mar 2023 at 19:46, Alexandr Nikulin wrote: > I propose to slightly improve the performance of nested loop join in the case > of partitioned inner table. > As I see in the code, the backend looks for the partition of the inner table > each time after fetch a new row from the outer tabl

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

2023-03-23 Thread Alvaro Herrera
On 2023-Mar-22, Amit Kapila wrote: > I see that you have modified the patch to address the comments from > Alvaro. Personally, I feel it would be better to add such a message at > a centralized location instead of spreading these in different callers > of slot acquire/release functionality to avoi

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

2023-03-23 Thread Brar Piening
On 23.03.2023 at 10:35, Alvaro Herrera wrote: As with the patch, we'll need to patch the CSS used in the website for the docs too, as that's the most important place where docs are visited. See this commit for an example: https://git.postgresql.org/gitweb/?p=pgweb.git;a=commitdiff;h=0b89ea0fff2

Re: Initial Schema Sync for Logical Replication

2023-03-23 Thread Amit Kapila
On Wed, Mar 15, 2023 at 11:12 PM Kumar, Sachin wrote: > > > Concurrent DDL :- > > User can execute a DDL command to table t1 at the same time when subscriber > is trying to sync > > it. pictorial representation https://imgur.com/a/ivrIEv8 [1] > > > > In tablesync process, it makes a connection to

Re: Initial Schema Sync for Logical Replication

2023-03-23 Thread Amit Kapila
On Thu, Mar 23, 2023 at 2:48 AM Euler Taveira wrote: > > On Tue, Mar 21, 2023, at 8:18 AM, Amit Kapila wrote: > > Now, how do we avoid these problems even if we have our own version of > functionality similar to pg_dump for selected objects? I guess we will > face similar problems. If so, we may n

Re: Memory leak from ExecutorState context?

2023-03-23 Thread Melanie Plageman
On Fri, Mar 10, 2023 at 1:51 PM Jehan-Guillaume de Rorthais wrote: > > So I guess the best thing would be to go through these threads, see what > > the status is, restart the discussion and propose what to do. If you do > > that, I'm happy to rebase the patches, and maybe see if I could improve >

Re: Save a few bytes in pg_attribute

2023-03-23 Thread Peter Eisentraut
On 21.03.23 18:46, Andres Freund wrote: I don't think we can find enough to make the impact zero bytes. It's also not clear exactly what the impact of each byte would be (compared to possible complications in other parts of the code, for example). But if there are a few low-hanging fruit, it se

Re: Options to rowwise persist result of stable/immutable function with RECORD result

2023-03-23 Thread Eske Rahn
Hi, Thanks for the quick answer *:-D* That was a nice sideeffect of lateral. In the example, the calling code also gets simplified: WITH x AS ( SELECT clock_timestamp() rowstart, *, clock_timestamp() rowend FROM ( SELECT '1' inp UNION SELECT '2' ) y, LATERAL septima.foo(inp) g ) SE

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

2023-03-23 Thread Karl O. Pinc
On Thu, 23 Mar 2023 08:24:48 +0100 Brar Piening wrote: > On 23.03.2023 at 04:09, Karl O. Pinc wrote: > > Sorry for the extra work I've put you through. > > No problem. As always I've learnt something which may help me in the > future. I don't know about you, but sadly, my brain eventually le

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

2023-03-23 Thread Karl O. Pinc
On Thu, 23 Mar 2023 10:35:55 +0100 Alvaro Herrera wrote: > As with the patch, we'll need to patch the CSS used in > the website for the docs too, as that's the most important place > where docs are visited. See this commit for an example: > https://git.postgresql.org/gitweb/?p=pgweb.git;a=commi

Re: Support logical replication of DDLs

2023-03-23 Thread vignesh C
On Thu, 23 Mar 2023 at 09:22, Ajin Cherian wrote: > > On Mon, Mar 20, 2023 at 8:17 PM houzj.f...@fujitsu.com > wrote: > > > > Attach the new patch set which addressed above comments. > > 0002,0003,0004 patch has been updated in this version. > > > > Best Regards, > > Hou zj > > Attached a patch-s

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 3:27 PM Tom Lane wrote: > My animal mamba doesn't like this one bit. > > I suspect the reason is that it's big-endian (PPC) and the endianness > hacking in the test is simply wrong: > > syswrite($file, > pack("L", $ENDIANNESS eq 'little' ? 0x0001001

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

2023-03-23 Thread Amit Kapila
On Wed, Mar 22, 2023 at 1:39 PM shiy.f...@fujitsu.com wrote: > > On Wed, Mar 22, 2023 2:53 PM Önder Kalacı wrote: > > > > We don't really need to, if you check the first patch, we don't have DROP > > for generated case. I mostly > > wanted to make the test a little more interesting, but it also

Re: [BUG] pg_stat_statements and extended query protocol

2023-03-23 Thread Imseih (AWS), Sami
> How does JDBC test that? Does it have a dependency on > pg_stat_statements? No, at the start of the thread, a sample jdbc script was attached. But I agree, we need to add test coverage. See below. >> But, I'm tempted to say that adding new tests could be addressed >> separately though (as this

Re: Transparent column encryption

2023-03-23 Thread Peter Eisentraut
On 22.03.23 10:00, Peter Eisentraut wrote: I get that for the type, but why do we need the typmod duplicated as well? Earlier patch versions didn't do that, but that got really confusing about which type the typmod really belonged to, since code currently assumes that typid+typmod makes sense

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 4:45 PM Andres Freund wrote: > At the very least there's missing verification that tids actually exists in > the > "Update chain validation" loop, leading to: > TRAP: failed Assert("ItemIdHasStorage(itemId)"), File: > "../../../../home/andres/src/postgresql/src/include/st

Re: Refactor calculations to use instr_time

2023-03-23 Thread Nazir Bilal Yavuz
Hi, Thanks for the review. On Fri, 17 Mar 2023 at 02:02, Melanie Plageman wrote: > I think you want one less L here? > WALLSTAT_ACC_INSTR_TIME_TYPE -> WALSTAT_ACC_INSTR_TIME_TYPE Done. > Also, I don't quite understand why TYPE is at the end of the name. I > think it would still be clear withou

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

2023-03-23 Thread Alexander Korotkov
Hi! On Thu, Mar 23, 2023 at 3:30 AM Andres Freund wrote: > On 2023-03-21 01:25:11 +0300, Alexander Korotkov wrote: > > I'm going to push patchset v15 if no objections. > > Just saw that this went in - didn't catch up with the thread before, > unfortunately. At the very least I'd like to see some

Re: Schema variables - new implementation for Postgres 15

2023-03-23 Thread Peter Eisentraut
On 17.03.23 21:50, Pavel Stehule wrote: Hi rebase + fix-update pg_dump tests Regards Pavel I have spent several hours studying the code and the past discussions. The problem I see in general is that everyone who reviews and tests the patches finds more problems, behavioral, weird internal

Re: WIP Patch: pg_dump structured

2023-03-23 Thread Attila Soki
On 12 Mar 2023, at 22:56, Attila Soki wrote: >> On 12 Mar 2023, at 21:50, Tom Lane wrote: >> Won't this fail completely with SQL objects whose names aren't suitable >> to be pathname components? "A/B" is a perfectly good name so far as >> SQL is concerned. You could also have problems with col

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 5:56 PM Andres Freund wrote: > Why are redirections now checked in two places? There already was a > ItemIdIsUsed() check in the "/* Perform tuple checks */" loop, but now there's > the ItemIdIsRedirected() check in the "Update chain validation." loop as well > - and the ou

Re: Non-superuser subscription owners

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 3:53 PM Jeff Davis wrote: > Is there any chance I can convince you to separate the privileges of > using a connection string and creating a subscription, as I > suggested[1] earlier? What would this amount to concretely? Also adding a pg_connection_string predefined role a

RE: Initial Schema Sync for Logical Replication

2023-03-23 Thread Kumar, Sachin
> From: Amit Kapila > IIUC, this is possible only if tablesync process uses a snapshot different > than the > snapshot we have used to perform the initial schema sync, otherwise, this > shouldn't be a problem. Let me try to explain my understanding with an example > (the LSNs used are just explai

Re: Transparent column encryption

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 9:55 AM Peter Eisentraut 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

Re: Initial Schema Sync for Logical Replication

2023-03-23 Thread Euler Taveira
On Thu, Mar 23, 2023, at 8:44 AM, Amit Kapila wrote: > On Thu, Mar 23, 2023 at 2:48 AM Euler Taveira wrote: > > > > On Tue, Mar 21, 2023, at 8:18 AM, Amit Kapila wrote: > > > > Now, how do we avoid these problems even if we have our own version of > > functionality similar to pg_dump for selected

Re: Should vacuum process config file reload more often

2023-03-23 Thread Daniel Gustafsson
> On 23 Mar 2023, at 07:08, Masahiko Sawada wrote: > On Sun, Mar 19, 2023 at 7:47 AM Melanie Plageman > wrote: > It makes sense to me that we need to reload the config file even when > vacuum-delay is disabled. But I think it's not convenient for users > that we don't reload the configuration f

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 5:42 PM Peter Geoghegan wrote: > However, this "second pass over page" loop has roughly the same > problem as the nearby HeapTupleHeaderIsHotUpdated() coding pattern: it > doesn't account for the fact that a tuple whose xmin was > XID_IN_PROGRESS a little earlier on may not

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

2023-03-23 Thread Andres Freund
Hi, On 2023-03-23 18:08:36 +0300, Alexander Korotkov wrote: > On Thu, Mar 23, 2023 at 3:30 AM Andres Freund wrote: > > On 2023-03-21 01:25:11 +0300, Alexander Korotkov wrote: > > > I'm going to push patchset v15 if no objections. > > > > Just saw that this went in - didn't catch up with the threa

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 9:42 AM Robert Haas wrote: > Hmph. I didn't think very hard about that code and just assumed > Himanshu had tested it. I don't have convenient access to a Big-endian > test machine myself. Are you able to check whether using 0x00010019 > unconditionally works? Oh, I see no

Re: Add LZ4 compression in pg_dump

2023-03-23 Thread Tomas Vondra
Hi, I looked at this again, and I realized I misunderstood the bit about errno in LZ4File_open_write a bit. I now see it simply just brings the function in line with Gzip_open_write(), so that the callers can just do pg_fatal("%m"). I still think the special "errno" handling in this one place feel

Re: ICU locale validation / canonicalization

2023-03-23 Thread Jeff Davis
On Thu, 2023-03-23 at 07:27 +0100, Peter Eisentraut wrote: > So, does uloc_canonicalize() always convert to ICU locale IDs?  What > if > you pass a language tag, does it convert it to ICU locale ID as well? Yes. The documentation is not clear on that point, but my testing shows that it does. And

Re: Add pg_walinspect function with block info columns

2023-03-23 Thread Bharath Rupireddy
On Mon, Mar 20, 2023 at 8:51 AM Kyotaro Horiguchi wrote: > > + /* Get block references, if any, otherwise continue. */ > + if (!XLogRecHasAnyBlockRefs(xlogreader)) > > code does". I feel we don't need the a comment there. Removed. > This means GetWALBlockInfo overwrit

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Andres Freund
Hi, On 2023-03-23 11:41:52 -0400, Robert Haas wrote: > On Wed, Mar 22, 2023 at 5:56 PM Andres Freund wrote: > > I also think it's not quite right that some of checks inside if > > (ItemIdIsRedirected()) continue in case of corruption, others don't. While > > there's a later continue, that means t

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

2023-03-23 Thread Bharath Rupireddy
On Thu, Mar 23, 2023 at 3:37 PM Alvaro Herrera wrote: > > On 2023-Mar-22, Amit Kapila wrote: > > > I see that you have modified the patch to address the comments from > > Alvaro. Personally, I feel it would be better to add such a message at > > a centralized location instead of spreading these in

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 1:26 PM Andres Freund wrote: > E.g. continuing after: > > rditem = PageGetItemId(ctx.page, rdoffnum); > if (!ItemIdIsUsed(rditem)) > report_corruption(&ctx, >

RE: [EXTERNAL] Re: [PATCH] Report the query string that caused a memory error under Valgrind

2023-03-23 Thread Onur Tirtir
Hey Peter, Thank you for reviewing the patch and for your feedback. I believe the v2 patch should be able to handle other protocol messages too. -Original Message- From: Peter Eisentraut Sent: Wednesday, March 22, 2023 7:00 PM To: Onur Tirtir ; pgsql-hackers@lists.postgresql.org Subjec

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Andres Freund
Hi, On 2023-03-23 11:20:04 +0530, Himanshu Upadhyaya wrote: > On Thu, Mar 23, 2023 at 2:15 AM Andres Freund wrote: > > > > > Currently the new verify_heapam() follows ctid chains when XMAX_INVALID is > > set > > and expects to find an item it can dereference - but I don't think that's > > someth

Re: Non-superuser subscription owners

2023-03-23 Thread Jeff Davis
On Thu, 2023-03-23 at 11:52 -0400, Robert Haas wrote: > What would this amount to concretely? Also adding a > pg_connection_string predefined role and requiring both that and > pg_create_subscription [to CREATE SUBSCRIPTION] Yes. > If so, I don't think that's a good idea. Maybe for some reason yo

Re: Add n_tup_newpage_upd to pg_stat table views

2023-03-23 Thread Peter Geoghegan
On Wed, Mar 22, 2023 at 10:38 PM Corey Huinker wrote: > That's probably a good move, especially if we start tallying updates that use > TOAST. Okay, pushed. Thanks -- Peter Geoghegan

Re: Make EXPLAIN generate a generic plan for a parameterized query

2023-03-23 Thread Laurenz Albe
And here is v10, which includes tab completion for the new option. Yours, Laurenz Albe From dfe6d36d79c74fba7bf70b990fdada166d012ff4 Mon Sep 17 00:00:00 2001 From: Laurenz Albe Date: Thu, 23 Mar 2023 19:28:49 +0100 Subject: [PATCH] Add EXPLAIN option GENERIC_PLAN This allows EXPLAIN to generate

Re: Consider parallel for lateral subqueries with limit

2023-03-23 Thread Gregory Stark (as CFM)
This patch has been "Needs Review" and bouncing from CF to CF. It actually looks like it got quite a bit of design discussion and while James Coleman seems convinced of its safety it doesn't sound like Tom Lane and Robert Haas are yet and it doesn't look like that's going to happen in this CF. I t

Re: Memory leak from ExecutorState context?

2023-03-23 Thread Tomas Vondra
On 3/23/23 13:07, Melanie Plageman wrote: > On Fri, Mar 10, 2023 at 1:51 PM Jehan-Guillaume de Rorthais > wrote: >>> So I guess the best thing would be to go through these threads, see what >>> the status is, restart the discussion and propose what to do. If you do >>> that, I'm happy to rebase

Re: Schema variables - new implementation for Postgres 15

2023-03-23 Thread Pavel Stehule
Hi čt 23. 3. 2023 v 16:33 odesílatel Peter Eisentraut < peter.eisentr...@enterprisedb.com> napsal: > On 17.03.23 21:50, Pavel Stehule wrote: > > Hi > > > > rebase + fix-update pg_dump tests > > > > Regards > > > > Pavel > > > > I have spent several hours studying the code and the past discussion

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 1:34 PM Robert Haas wrote: > OK, let me spend some more time on this and I'll post a patch (or > patches) in a bit. All right, here are some more fixups. -- Robert Haas EDB: http://www.enterprisedb.com 0001-amcheck-Tighten-up-validation-of-redirect-line-point.patch Des

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

2023-03-23 Thread Brar Piening
On 23.03.2023 at 10:35, Alvaro Herrera wrote: As with the patch, we'll need to patch the CSS used in the website for the docs too, as that's the most important place where docs are visited. Ok, I've created and tested a patch for this too. Since the need for ids is starting to grow again (ecb

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 8:38 PM Andres Freund wrote: > skink / valgrind reported in a while back and found another issue: > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2023-03-22%2021%3A53%3A41 > > ==2490364== VALGRINDERROR-BEGIN > ==2490364== Conditional jump or move depend

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

2023-03-23 Thread Dave Cramer
On Wed, 22 Mar 2023 at 15:23, Jeff Davis wrote: > On Wed, 2023-03-22 at 14:42 -0400, Tom Lane wrote: > > This isn't going to help much unless we change the wire protocol > > so that RowDescription messages carry these UUIDs instead of > > (or in addition to?) the OIDs of the column datatypes. Wh

Re: Non-superuser subscription owners

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 1:41 PM Jeff Davis wrote: > Even if my changes don't happen, I would find it less confusing and > more likely that users understand what they're doing. I respectfully but firmly disagree. I think having two predefined roles that are both required to create a subscription a

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

2023-03-23 Thread Corey Huinker
> > TBH I'm a bit afraid that people will immediately start complaining > about the failing docs builds after this got applied since it forces > them to add ids to all varlistenries in a variablelist if they add one, > which can be perceived as quite a burden (also committers and reviewers > will h

Re: Code checks for App Devs, using new options for transaction behavior

2023-03-23 Thread Greg Stark
On Thu, 27 Oct 2022 at 07:10, Simon Riggs wrote: > > In the past, developers have wondered how we can provide "--dry-run" > functionality That would be an awesome functionality, indeed. I have concerns of how feasible it is in general but I think providing features to allow developers to build it

pg_bsd_indent vs vpath

2023-03-23 Thread Andrew Dunstan
Looks like we need a little magic to allow pg_bsd_indent to be part of a vpath build: It succeeded if I added this to the Makefile: CFLAGS += -I$(srcdir)

Re: refactoring basebackup.c

2023-03-23 Thread Robert Haas
On Wed, Mar 22, 2023 at 10:09 PM Thomas Munro wrote: > > BaseBackupSync is not documented > > BaseBackupWrite is not documented > > [Resending with trimmed CC: list, because the mailing list told me to > due to a blocked account, sorry if you already got the above.] Bummer. I'll write a patch to

Re: Add standard collation UNICODE

2023-03-23 Thread Jeff Davis
On Thu, 2023-03-09 at 11:23 -0800, Jeff Davis wrote: > Looks good to me. Another thought: for ICU, do we want the default collation to be UNICODE (root collation)? What we have now gets the default from the environment, which is consistent with the libc provider. But now that we have the UNICODE

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-23 Thread Tom Lane
So I'm still pretty desperately unhappy with count_leaf_partitions. I don't like expending significant cost purely for progress tracking purposes, I don't like the undocumented assumption that NoLock is safe, and what's more, if it is safe then we've already traversed the inheritance tree to lock e

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Andres Freund
Hi, On 2023-03-23 15:37:15 -0400, Robert Haas wrote: > On Wed, Mar 22, 2023 at 8:38 PM Andres Freund wrote: > > skink / valgrind reported in a while back and found another issue: > > > > https://buildfarm.postgresql.org/cgi-bin/show_log.pl?nm=skink&dt=2023-03-22%2021%3A53%3A41 > > > > ==2490364==

Re: Commitfest 2023-03 starting tomorrow!

2023-03-23 Thread Greg Stark
So of the patches with no emails since August-December 2022: * New hooks in the connection path * Add log messages when replication slots become active and inactive - Peter Smith and Alvaro Herrera have picked up this one * Remove dead macro exec_subplan_get_plan - Minor cleanup * Consider

Re: Code checks for App Devs, using new options for transaction behavior

2023-03-23 Thread Tom Lane
Greg Stark writes: > On Thu, 27 Oct 2022 at 07:10, Simon Riggs > wrote: >> * nested transactions = off (default) | all | on >> Handle nested BEGIN/COMMIT, which can cause chaos on failure. > I think we've been burned pretty badly by GUCs that control SQL > semantics before. Yeah, this idea is

Re: pg_bsd_indent vs vpath

2023-03-23 Thread Tom Lane
Andrew Dunstan writes: > Looks like we need a little magic to allow pg_bsd_indent to be part of a > vpath build: Yeah, I think I fixed that at dccef0f2f, but fairywren hasn't run since. (I'd thought that it was some weird Msys-ism, but if you say it's VPATH then all is clear, other than why we d

Re: Commitfest 2023-03 starting tomorrow!

2023-03-23 Thread Tom Lane
Greg Stark writes: > * Simplify find_my_exec by using realpath(3) > - Tom Lane is author but I don't know if he intends to apply this in > this release I'd like to get it done. It's currently stuck because Peter asked for some behavioral changes that I was dubious about, and we're trying to com

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

2023-03-23 Thread Peter Smith
On Fri, Mar 24, 2023 at 4:33 AM Bharath Rupireddy wrote: > > On Thu, Mar 23, 2023 at 3:37 PM Alvaro Herrera > wrote: > > > > On 2023-Mar-22, Amit Kapila wrote: > > > > > I see that you have modified the patch to address the comments from > > > Alvaro. Personally, I feel it would be better to add

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

2023-03-23 Thread Euler Taveira
On Thu, Mar 23, 2023, at 2:33 PM, Bharath Rupireddy wrote: > On Thu, Mar 23, 2023 at 3:37 PM Alvaro Herrera > wrote: > > > > On 2023-Mar-22, Amit Kapila wrote: > > > > > I see that you have modified the patch to address the comments from > > > Alvaro. Personally, I feel it would be better to add

Re: Raising the SCRAM iteration count

2023-03-23 Thread Daniel Gustafsson
> On 22 Mar 2023, at 04:14, Gregory Stark (as CFM) wrote: > On Tue, 14 Mar 2023 at 14:54, Gregory Stark (as CFM) > wrote: >> >> CFBot is failing with this test failure... I'm not sure if this just >> represents a timing dependency or a bad test or what? > > CFBot is now consistently showing th

Re: Orphaned wait event

2023-03-23 Thread Thomas Munro
On Thu, Mar 23, 2023 at 8:10 PM Bharath Rupireddy wrote: > Yeah, commit [1] removed the last trace of it. I wonder if we can add > a WAIT_EVENT_SLRU_FLUSH_SYNC wait event in SlruSyncFileTag(), similar > to mdsyncfiletag. This way, we would have covered all sync_syncfiletag > fsyncs with wait event

PGDOCS - function pg_get_publication_tables is not documented?

2023-03-23 Thread Peter Smith
Hi hackers, While reviewing another thread [1] I could not find the function 'pg_get_publication_tables' described anywhere in the PG documentation. Should it be mentioned somewhere like the "System Catalog Information Functions" table [2], or was this one deliberately omitted for some reason? T

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

2023-03-23 Thread Peter Smith
On Thu, Mar 23, 2023 at 5:51 PM Amit Kapila wrote: > > On Thu, Mar 23, 2023 at 9:57 AM Peter Smith wrote: > > > > Here are some review comments for patch v20-0001. > > > > == > > General. > > > > 1. > > That function 'pg_get_publication_tables' does not seem to be > > described in the PG docu

Re: Commitfest 2023-03 starting tomorrow!

2023-03-23 Thread Justin Pryzby
On Thu, Mar 23, 2023 at 04:41:39PM -0400, Greg Stark wrote: > * Avoid hiding shared filesets in pg_ls_tmpdir (pg_ls_* functions for > showing metadata ...) > - According to the internet "As part of their 39 month old > development and milestones, your patch should be able to see like an > adult (

Re: Can we avoid chdir'ing in resolve_symlinks() ?

2023-03-23 Thread Tom Lane
I wrote: > I think that changing pg_config's behavior would be enough to resolve > the complaints you listed, but perhaps I'm missing some fine points. Meanwhile I've gone ahead and pushed my v1 patch (plus Munro's recommendation about _fullpath error handling), so we can see if the buildfarm blow

Re: PGDOCS - function pg_get_publication_tables is not documented?

2023-03-23 Thread Tom Lane
Peter Smith writes: > While reviewing another thread [1] I could not find the function > 'pg_get_publication_tables' described anywhere in the PG > documentation. > Should it be mentioned somewhere like the "System Catalog Information > Functions" table [2], or was this one deliberately omitted fo

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

2023-03-23 Thread Karl O. Pinc
Hi Brar, It occurs to me that I had not actually tested the way the anchor is put only after the last term in a varlistentry. (The code looked obviously right and should work if any varlistentry terms have anchors, which they do, but) Have you tested this? If not, catalog.sgml, the DEPENDEN

Re: Making background psql nicer to use in tap tests

2023-03-23 Thread Daniel Gustafsson
> On 18 Mar 2023, at 23:07, Andrew Dunstan wrote: > BTW, a better test than the one above would be > >$package->isa("PostgreSQL::Test::Cluster") Attached is a quick updated v3 of the patch which, to the best of my Perl abilities, tries to address the comments raised here. -- Daniel Gustafs

Re: [PoC] Let libpq reject unexpected authentication requests

2023-03-23 Thread Jacob Champion
On Tue, Mar 21, 2023 at 11:01 PM Michael Paquier wrote: > - # Function introduced in OpenSSL 1.0.2. > + # Functions introduced in OpenSSL 1.0.2. LibreSSL doesn't have all of > these. >['X509_get_signature_nid'], > + ['SSL_CTX_set_cert_cb'], > > From what I can see, X509_get

Re: pg_stats and range statistics

2023-03-23 Thread Tomas Vondra
On 3/20/23 20:54, Egor Rogov wrote: > On 20.03.2023 22:27, Gregory Stark (as CFM) wrote: >> On Sun, 22 Jan 2023 at 18:22, Tomas Vondra >> wrote: >>> I wonder if we have other functions doing something similar, i.e. >>> accepting a polymorphic type and then imposing additional restrictions >>> o

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

2023-03-23 Thread Karl O. Pinc
This is for the committer, as an FYI. I cut out the portion of the docbook XSLT and diffed it with the code for the same template in the patch. The diff looks like: -- /tmp/sections.xsl2023-03-22 13:00:33.432968357 -0500 +++ /tmp/make_html_ids_discoverable_v3.patch2023-03-22 13:03:39.77

Re: HOT chain validation in verify_heapam()

2023-03-23 Thread Robert Haas
On Thu, Mar 23, 2023 at 4:36 PM Andres Freund wrote: > Could it be that the tests didn't exercise the path before? Hmm, perhaps. > > Nonetheless, here's a patch. I notice that there's a similar problem > > in another place, too. get_xid_status() is called a total of five > > times and it looks l

Re: PGDOCS - function pg_get_publication_tables is not documented?

2023-03-23 Thread Peter Smith
On Fri, Mar 24, 2023 at 9:26 AM Tom Lane wrote: > > Peter Smith writes: > > While reviewing another thread [1] I could not find the function > > 'pg_get_publication_tables' described anywhere in the PG > > documentation. > > Should it be mentioned somewhere like the "System Catalog Information >

Re: Raising the SCRAM iteration count

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 10:46:56PM +0100, Daniel Gustafsson wrote: > I'm fairly convinced it's a timeout in the interactive psql session. Given > how > ugly the use of that is I'm sort of waiting for Andres' refactoring patch [0] > to > commit this such that I can rewrite the test in a saner and

Re: Remove nonmeaningful prefixes in PgStat_* fields

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 05:24:22PM +0900, Michael Paquier wrote: > On Thu, Mar 23, 2023 at 07:51:37AM +0100, Drouvot, Bertrand wrote: > > Thank you both for your keen eye! I just did another check too and did not > > find more than the ones you've just reported. > > This matches what I have, thank

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-23 Thread Michael Paquier
On Thu, Mar 02, 2023 at 08:39:14AM +0100, Drouvot, Bertrand wrote: > Yeah, there is some dependencies around this one. > > [1]: depends on it > Current one depends of [2], [3] and [4] > > Waiting on Author is then the right state, thanks for having moved it to that > state. > > [1]: > https://

Re: Should vacuum process config file reload more often

2023-03-23 Thread Melanie Plageman
On Thu, Mar 23, 2023 at 2:09 AM Masahiko Sawada wrote: > On Sun, Mar 19, 2023 at 7:47 AM Melanie Plageman > wrote: > Do we need to calculate the number of workers running with > nworkers_for_balance by iterating over the running worker list? I > guess autovacuum workers can increment/decrement i

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

2023-03-23 Thread Andres Freund
Hi, An off-list conversation veered on-topic again. Reposting for posterity: 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 tuple locking level is the right > > thing. If we want to avo

Re: Commitfest 2023-03 starting tomorrow!

2023-03-23 Thread Masahiko Sawada
On Fri, Mar 24, 2023 at 5:42 AM Greg Stark wrote: > > > > * Fix assertion failure with next_phase_at in snapbuild.c > - It's a bug fix but it doesn't look like the bug has been entirely fixed? > We have a patch fixing the issue and reproducible steps. Another bug was reported late in the discus

Re: Commitfest 2023-03 starting tomorrow!

2023-03-23 Thread Michael Paquier
On Thu, Mar 23, 2023 at 04:41:39PM -0400, Greg Stark wrote: > * Move backup-related code to xlogbackup.c/.h > - It looks like neither Alvaro Herrera nor Michael Paquier are > particularly convinced this is an improvement and nobody has put more > time in this since last October. I'm inclined to m

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

2023-03-23 Thread Peter Smith
Hi Wang-san. I looked at the v21-0001 patch. I don't have any new review comments -- only follow-ups for some of my previous v20 comments that were rejected. On Thu, Mar 23, 2023 at 8:11 PM wangw.f...@fujitsu.com wrote: > > On Thu, Mar 23, 2023 at 12:27 PM Peter Smith wrote: > > Here are some r

  1   2   >