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

2023-03-26 Thread Brar Piening
On 24.03.2023 at 10:45, Alvaro Herrera wrote: But why are there no anchors next to items on that page? For example, how do I get the link for the "Meta Commands" subsection? I somehow knew that responding from a crappy mobile phone e-mail client will mess up the format and the thread... For

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Julien Rouhaud
Hi, I just have a few minor wording improvements for the various comments / documentation you quoted. On Sun, Mar 26, 2023 at 08:53:49AM +0200, Pavel Stehule wrote: > út 21. 3. 2023 v 17:18 odesílatel Peter Eisentraut < > peter.eisentr...@enterprisedb.com> napsal: > > > - What is the purpose of s

Re: Kerberos delegation support in libpq and postgres_fdw

2023-03-26 Thread Stephen Frost
Greetings, * Greg Stark (st...@mit.edu) wrote: > The CFBot says there's a function be_gssapi_get_proxy() which is > undefined. Presumably this is a missing #ifdef or a definition that > should be outside an #ifdef. Yup, just a couple of missing #ifdef's. Updated and rebased patch attached. Than

Re: meson/msys2 fails with plperl/Strawberry

2023-03-26 Thread Andrew Dunstan
On 2023-03-25 Sa 12:38, Andres Freund wrote: Hi, On 2023-03-25 08:46:42 -0400, Andrew Dunstan wrote: config/perl.m4 contains this: AC_MSG_CHECKING(for flags to link embedded Perl) if test "$PORTNAME" = "win32" ; then perl_lib=`basename $perl_archlibexp/CORE/perl[[5-9]]*.lib

Re: Support logical replication of DDLs

2023-03-26 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: Progress report of CREATE INDEX for nested partitioned tables

2023-03-26 Thread Justin Pryzby
On Sat, Mar 25, 2023 at 03:43:32PM -0400, Tom Lane wrote: > I pushed 0001 with some cosmetic changes (for instance, trying to > make the style of the doc entries for partitions_total/partitions_done > match the rest of their table). Thanks. > I'm not touching 0002 or 0003, because I think they're

Time to move pg_test_timing to measure in nanoseconds

2023-03-26 Thread Hannu Krosing
Currently pg_test_timing utility measures its timing overhead in microseconds, giving results like this ~$ /usr/lib/postgresql/15/bin/pg_test_timing Testing timing overhead for 3 seconds. Per loop time including overhead: 18.97 ns Histogram of timing durations: < us % of total count

Re: CREATE INDEX CONCURRENTLY on partitioned index

2023-03-26 Thread Justin Pryzby
On Sun, Dec 04, 2022 at 01:09:35PM -0600, Justin Pryzby wrote: > This currently handles partitions with a loop around the whole CIC > implementation, which means that things like WaitForLockers() happen > once for each index, the same as REINDEX CONCURRENTLY on a partitioned > table. Contrast that

awkward cancellation of parallel queries on standby.

2023-03-26 Thread Jeff Janes
When a parallel query gets cancelled on a standby due to max_standby_streaming_delay, it happens rather awkwardly. I get two errors stacked up, a query cancellation followed by a connection termination. I use `pgbench -R 1 -T3600 -P5` on the master to generate a light but steady stream of HOT pru

Re: Disable vacuuming to provide data history

2023-03-26 Thread Hannu Krosing
There is also another blocker - our timestamp resolution is 1 microsecond and we are dangerously close to speeds where one could update a row twice in the same microsecond . I have been thinking about this, and what is needed is 1. a nanosecond-resolution "abstime" type - not absolutely necessary

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Dmitry Dolgov
> On Fri, Mar 24, 2023 at 08:04:08AM +0100, Pavel Stehule wrote: > čt 23. 3. 2023 v 19:54 odesílatel Pavel Stehule > napsal: > > > čt 23. 3. 2023 v 16:33 odesílatel Peter Eisentraut < > > peter.eisentr...@enterprisedb.com> napsal: > > > >> The other issue is that by its nature this patch adds a lo

Re: Schema variables - new implementation for Postgres 15

2023-03-26 Thread Dmitry Dolgov
> On Sun, Mar 26, 2023 at 07:32:05PM +0800, Julien Rouhaud wrote: > Hi, > > I just have a few minor wording improvements for the various comments / > documentation you quoted. Talking about documentation I've noticed that the implementation contains few limitations, that are not mentioned in the d

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

2023-03-26 Thread Jeff Davis
On Sat, 2023-03-25 at 19:58 -0400, Dave Cramer wrote: > Well that means that connection poolers have to all be fixed. There > are more than just pgbouncer. > Seems rather harsh that a new feature breaks a connection pooler or > makes the pooler unusable. Would it actually break connection poolers

Re: meson/msys2 fails with plperl/Strawberry

2023-03-26 Thread Andres Freund
On 2023-03-26 07:57:59 -0400, Andrew Dunstan wrote: > > On 2023-03-25 Sa 12:38, Andres Freund wrote: > > Hi, > > > > On 2023-03-25 08:46:42 -0400, Andrew Dunstan wrote: > > > config/perl.m4 contains this: > > > > > > > > > AC_MSG_CHECKING(for flags to link embedded Perl) > > > if test "

Re: Raising the SCRAM iteration count

2023-03-26 Thread Daniel Gustafsson
> On 25 Mar 2023, at 01:56, Michael Paquier wrote: > > On Fri, Mar 24, 2023 at 09:56:29AM +0100, Daniel Gustafsson wrote: >> I've actually ripped out the test in question in the attached v9 to have it >> ready and building green in CFbot. > > While reading through v9, I have noticed a few things

Re: Support logical replication of DDLs

2023-03-26 Thread Tom Lane
vignesh C writes: > [ YA patch set ] I spent some time looking through this thread to try to get a sense of the state of things, and I came away quite depressed. The patchset has ballooned to over 2MB, which is a couple orders of magnitude larger than anyone could hope to meaningfully review fro

Re: meson/msys2 fails with plperl/Strawberry

2023-03-26 Thread Andres Freund
Hi, On 2023-03-26 12:39:08 -0700, Andres Freund wrote: > First: I am *not* arguing we shouldn't repair building against strawberry perl > with mingw. Hm - can you describe the failure more - I just tried, and it worked to build against strawberry perl on mingw, without any issues. All I did was s

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-03-26 Thread Kirk Wolak
On Wed, Feb 8, 2023 at 10:56 AM Kirk Wolak wrote: > On Wed, Feb 8, 2023 at 3:08 AM Pavel Stehule > wrote: > >> hi >> >> st 8. 2. 2023 v 7:33 odesílatel Julien Rouhaud >> napsal: >> >>> On Tue, Feb 07, 2023 at 08:48:22PM +0100, Pavel Stehule wrote: >>> > >>> > GET DIAGNOSTICS _oid = PG_ROUTINE_O

Re: Time to move pg_test_timing to measure in nanoseconds

2023-03-26 Thread Andres Freund
Hi, On 2023-03-26 16:43:21 +0200, Hannu Krosing wrote: > Currently pg_test_timing utility measures its timing overhead in > microseconds, giving results like this I have a patch that does that and a bit more that's included in a larger patchset by David Geier: https://postgr.es/m/198ef658-a5b7-98

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

2023-03-26 Thread Melanie Plageman
Hi, Below is my review of a slightly older version than you just posted -- much of it you may have already addressed. >From 3a6c3f41000e057bae12ab4431e6bb1c5f3ec4b0 Mon Sep 17 00:00:00 2001 From: Andres Freund Date: Mon, 20 Mar 2023 21:57:40 -0700 Subject: [PATCH v5 01/15] createdb-using-wal-fix

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

2023-03-26 Thread Dave Cramer
On Sun, 26 Mar 2023 at 14:00, Jeff Davis wrote: > On Sat, 2023-03-25 at 19:58 -0400, Dave Cramer wrote: > > Well that means that connection poolers have to all be fixed. There > > are more than just pgbouncer. > > Seems rather harsh that a new feature breaks a connection pooler or > > makes the p

Re: Time to move pg_test_timing to measure in nanoseconds

2023-03-26 Thread Hannu Krosing
Sure, will do. On Sun, Mar 26, 2023 at 11:40 PM Andres Freund wrote: > > Hi, > > On 2023-03-26 16:43:21 +0200, Hannu Krosing wrote: > > Currently pg_test_timing utility measures its timing overhead in > > microseconds, giving results like this > > I have a patch that does that and a bit more that

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

2023-03-26 Thread Tom Lane
Dave Cramer writes: > Well I was presuming that they would just pass the parameter on. If they > didn't then binary_format won't work with them. In the case that they do > pass it on, then DISCARD_ALL will reset it and future borrows of the > connection will have no way to set it again; effectivel

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

2023-03-26 Thread Dave Cramer
Dave Cramer On Sun, 26 Mar 2023 at 18:12, Tom Lane wrote: > Dave Cramer writes: > > Well I was presuming that they would just pass the parameter on. If they > > didn't then binary_format won't work with them. In the case that they do > > pass it on, then DISCARD_ALL will reset it and future bo

Documentation Not Compiling (http://docbook... not https:.//...)

2023-03-26 Thread Kirk Wolak
Andres, Apologies to pick on you directly. But it appears that sites are refusing HTTP requests, and it's affecting compilation of docs in a new configuration. I was surprised to see NON-HTTPS references in 2023, tbh... I cannot even curl these references. Maybe I am missing a simple flag

Re: meson/msys2 fails with plperl/Strawberry

2023-03-26 Thread Andrew Dunstan
> On Mar 26, 2023, at 5:28 PM, Andres Freund wrote: > > Hi, > >> On 2023-03-26 12:39:08 -0700, Andres Freund wrote: >> First: I am *not* arguing we shouldn't repair building against strawberry >> perl >> with mingw. > > Hm - can you describe the failure more - I just tried, and it worked t

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-26 Thread Michael Paquier
On Sat, Mar 25, 2023 at 11:50:50AM +0900, Michael Paquier wrote: > On Fri, Mar 24, 2023 at 06:58:30AM +0100, Drouvot, Bertrand wrote: >> - Does not include the refactoring for >> pg_stat_get_xact_function_total_time(), >> pg_stat_get_xact_function_self_time(), >> pg_stat_get_function_total_time()

Re: Documentation Not Compiling (http://docbook... not https:.//...)

2023-03-26 Thread Justin Pryzby
On Sun, Mar 26, 2023 at 09:12:35PM -0400, Kirk Wolak wrote: > Andres, > Apologies to pick on you directly. > But it appears that sites are refusing HTTP requests, > and it's affecting compilation of docs in a new configuration. > > I was surprised to see NON-HTTPS references in 2023, tbh...

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

2023-03-26 Thread Tom Lane
Dave Cramer writes: > On Sun, 26 Mar 2023 at 18:12, Tom Lane wrote: >> I would not expect DISCARD ALL to reset a session-level property. > Well if we can't reset it with DISCARD ALL how would that work with > pgbouncer, or any pool for that matter since it doesn't know which client > asked for w

Re: logical decoding and replication of sequences, take 2

2023-03-26 Thread Masahiko Sawada
Hi, On Fri, Mar 24, 2023 at 7:26 AM Tomas Vondra wrote: > > I merged the earlier "fixup" patches into the relevant parts, and left > two patches with new tweaks (deducing the corrent "WAL" state from the > current state read by copy_sequence), and the interlock discussed here. > Apart from that,

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

2023-03-26 Thread Peter Smith
Here are some review comments for v23-0001. == src/test/subscription/t/028_row_filter.pl 1. +# two publications, one publishing through ancestor and another one directly +# publsihing the partition, with different row filters +$node_publisher->safe_psql('postgres', + "CREATE PUBLICATION tap_p

Re: Raising the SCRAM iteration count

2023-03-26 Thread Michael Paquier
On Sun, Mar 26, 2023 at 11:14:37PM +0200, Daniel Gustafsson wrote: > > On 25 Mar 2023, at 01:56, Michael Paquier wrote: > > > > On Fri, Mar 24, 2023 at 09:56:29AM +0100, Daniel Gustafsson wrote: > >> I've actually ripped out the test in question in the attached v9 to have it > >> ready and buildi

Re: Documentation Not Compiling (http://docbook... not https:.//...)

2023-03-26 Thread Kirk Wolak
On Sun, Mar 26, 2023 at 9:12 PM Kirk Wolak wrote: > Andres, > Apologies to pick on you directly. > But it appears that sites are refusing HTTP requests, > and it's affecting compilation of docs in a new configuration. > > I was surprised to see NON-HTTPS references in 2023, tbh... > I canno

Re: Amcheck verification of GiST and GIN

2023-03-26 Thread Peter Geoghegan
On Sun, Mar 19, 2023 at 4:00 PM Andrey Borodin wrote: > After several attempts to corrupt GiST with this 0.01 epsilon > adjustment tolerance I think GiST indexing of points is valid. > Because intersection for search purposes is determined with the same epsilon! > So it's kind of odd > postgre

Re: Initial Schema Sync for Logical Replication

2023-03-26 Thread Masahiko Sawada
On Fri, Mar 24, 2023 at 11:51 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 > > > walrcv_create_slot() till walrcv_disconne

Re: About the constant-TRUE clause in reconsider_outer_join_clauses

2023-03-26 Thread Richard Guo
On Sat, Mar 25, 2023 at 11:41 PM Tom Lane wrote: > Richard Guo writes: > > Should we instead mark the constant-TRUE clause with required_relids > > plus the OJ relid? > > I do not think it matters. Yeah, I agree that it makes no difference currently. One day if we want to replace the is_pushe

Re: About the constant-TRUE clause in reconsider_outer_join_clauses

2023-03-26 Thread Tom Lane
Richard Guo writes: > On Sat, Mar 25, 2023 at 11:41 PM Tom Lane wrote: >> Richard Guo writes: >>> Should we instead mark the constant-TRUE clause with required_relids >>> plus the OJ relid? >> I do not think it matters. > Yeah, I agree that it makes no difference currently. One day if we want

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

2023-03-26 Thread Amit Kapila
On Mon, Mar 27, 2023 at 7:03 AM Peter Smith wrote: > > > 1. > +# two publications, one publishing through ancestor and another one directly > +# publsihing the partition, with different row filters > +$node_publisher->safe_psql('postgres', > + "CREATE PUBLICATION tap_pub_viaroot_sync_1 FOR TABLE >

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-03-26 Thread Kirk Wolak
On Sun, Mar 26, 2023 at 5:37 PM Kirk Wolak wrote: > On Wed, Feb 8, 2023 at 10:56 AM Kirk Wolak wrote: > >> On Wed, Feb 8, 2023 at 3:08 AM Pavel Stehule >> wrote: >> >>> hi >>> >>> st 8. 2. 2023 v 7:33 odesílatel Julien Rouhaud >>> napsal: >>> On Tue, Feb 07, 2023 at 08:48:22PM +0100, Pave

Re: Add pg_walinspect function with block info columns

2023-03-26 Thread Kyotaro Horiguchi
At Sat, 25 Mar 2023 12:12:50 +0900, Michael Paquier wrote in > On Thu, Mar 23, 2023 at 10:54:40PM +0530, Bharath Rupireddy wrote: > OUT reltablespace oid, > OUT reldatabase oid, > OUT relfilenode oid, > OUT relblocknumber int8, > + OUT blockid int2, > +O

Re: Support logical replication of DDLs

2023-03-26 Thread vignesh C
On Sun, 26 Mar 2023 at 18:08, vignesh C wrote: > > 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

Re: Add pg_walinspect function with block info columns

2023-03-26 Thread Bharath Rupireddy
On Mon, Mar 27, 2023 at 9:11 AM Kyotaro Horiguchi wrote: > > At Sat, 25 Mar 2023 12:12:50 +0900, Michael Paquier > wrote in > > On Thu, Mar 23, 2023 at 10:54:40PM +0530, Bharath Rupireddy wrote: > > OUT reltablespace oid, > > OUT reldatabase oid, > > OUT relfilenode oid,

Re: Add pg_walinspect function with block info columns

2023-03-26 Thread Michael Paquier
On Sat, Mar 25, 2023 at 12:12:50PM +0900, Michael Paquier wrote: > I don't see any need to move this block of code? This leads to > unnecessary diffs, potentially making backpatch a bit harder. Either > way is not a big deal, still.. Except for this bit, 0001 looks fine > by me. FYI, I have gon

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

2023-03-26 Thread wangw.f...@fujitsu.com
On Mon, Mar 27, 2023 at 11:32 AM Amit Kapila wrote: > On Mon, Mar 27, 2023 at 7:03 AM Peter Smith > wrote: > > > > > > 1. > > +# two publications, one publishing through ancestor and another one > > directly > > +# publsihing the partition, with different row filters > > +$node_publisher->safe_p

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

2023-03-26 Thread Bharath Rupireddy
On Fri, Mar 24, 2023 at 3:05 PM Alvaro Herrera wrote: > > On 2023-Mar-23, Greg Stark wrote: > > > On Thu, 23 Mar 2023 at 23:30, Bharath Rupireddy > > wrote: > > > > > > > + ereport(log_replication_commands ? LOG : DEBUG3, > > > > + (errmsg("acquired physical replication slot \"%s\"", > > > > + sl

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-26 Thread Drouvot, Bertrand
Hi, On 3/27/23 3:20 AM, Michael Paquier wrote: On Sat, Mar 25, 2023 at 11:50:50AM +0900, Michael Paquier wrote: On Fri, Mar 24, 2023 at 06:58:30AM +0100, Drouvot, Bertrand wrote: - Does not include the refactoring for pg_stat_get_xact_function_total_time(), pg_stat_get_xact_function_self_time(

Assertion in pgstat_assoc_relation() fails intermittently

2023-03-26 Thread Bharath Rupireddy
Hi, I recently observed an assertion failure [1] a few times on my dev setup during initdb. The code was built with --enable-debug --enable-cassert CFLAGS="-ggdb3 -O0". The assertion was gone after I did make distclean and built the source code again. It looks like the same relation (pg_type [2])

Re: possible proposal plpgsql GET DIAGNOSTICS oid = PG_ROUTINE_OID

2023-03-26 Thread Pavel Stehule
Hi po 27. 3. 2023 v 5:36 odesílatel Kirk Wolak napsal: > On Sun, Mar 26, 2023 at 5:37 PM Kirk Wolak wrote: > >> On Wed, Feb 8, 2023 at 10:56 AM Kirk Wolak wrote: >> >>> On Wed, Feb 8, 2023 at 3:08 AM Pavel Stehule >>> wrote: >>> hi st 8. 2. 2023 v 7:33 odesílatel Julien Rouhau

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

2023-03-26 Thread Kyotaro Horiguchi
At Sun, 26 Mar 2023 12:26:59 -0700, Andres Freund wrote in > Hi, > > Attached is v5. Lots of comment polishing, a bit of renaming. I extracted the > relation extension related code in hio.c back into its own function. > > While reviewing the hio.c code, I did realize that too much stuff is done

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

2023-03-26 Thread Michael Paquier
On Fri, Mar 24, 2023 at 08:00:44PM -0700, Andres Freund wrote: > I don't understand what we're optimizing for here. These functions are very > very very far from being a hot path. The xact functions are barely ever > used. Compared to the cost of query evaluation the cost of iterating throught > he

Re: Support logical replication of DDLs

2023-03-26 Thread Amit Kapila
On Mon, Mar 27, 2023 at 2:52 AM Tom Lane wrote: > > vignesh C writes: > > [ YA patch set ] > ... > > I'm also less than sold on the technical details, specifically > the notion of "let's translate utility parse trees into JSON and > send that down the wire". You can probably make that work for n

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-26 Thread Michael Paquier
On Mon, Mar 27, 2023 at 07:45:26AM +0200, Drouvot, Bertrand wrote: > Thanks! LGTM, but what about also taking care of > pg_stat_get_xact_function_total_time() > and pg_stat_get_xact_function_self_time() while at it? With a macro that uses INSTR_TIME_GET_MILLISEC() to cope with instr_time? Why no

Re: Generate pg_stat_get_xact*() functions with Macros

2023-03-26 Thread Drouvot, Bertrand
On 3/27/23 8:40 AM, Michael Paquier wrote: On Mon, Mar 27, 2023 at 07:45:26AM +0200, Drouvot, Bertrand wrote: Thanks! LGTM, but what about also taking care of pg_stat_get_xact_function_total_time() and pg_stat_get_xact_function_self_time() while at it? With a macro that uses INSTR_TIME_GET_MI

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

2023-03-26 Thread Peter Smith
Here are review comments for v2-0001 == Commit Message 1. In commit ecb696, an XML ID attribute was added to only one varlistentry, creating inconsistency with the commit 78ee60. This commit adds XML ID attributes to all varlistentries in create_subscritpion.sgml for consistency. Additionally

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

2023-03-26 Thread Peter Smith
Here are review comments for v2-0002 == doc/src/sgml/logical-replication.sgml 1. I am not sure your convention to only give the link to the FIRST reference on a page is good in all case. Maybe that rule is OK for multiple references all in the same sub-section but when they are in different s