Re: Patch proposal: New hooks in the connection path

2022-07-05 Thread Bharath Rupireddy
On Mon, Jul 4, 2022 at 6:29 PM Drouvot, Bertrand wrote: > > On 7/2/22 2:49 AM, Roberto Mello wrote: > > On Fri, Jul 1, 2022 at 5:00 PM Nathan Bossart > wrote: >> >> That being said, I don't see why this information couldn't be provided in a >> system view. IMO it is generically useful. > > +1 f

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-05 Thread Michael Paquier
On Tue, Jun 28, 2022 at 02:14:53PM +0900, Michael Paquier wrote: > Well, the addition of cyrillic does not make necessary the removal of > SOUND RECORDING COPYRIGHT or the DEGREEs, that implies the use of a > dictionnary when manipulating the set of codepoints, but that's me > being too picky. Jus

Re: [PATCH] Add result_types column to pg_prepared_statements view

2022-07-05 Thread Dagfinn Ilmari Mannsåker
On Tue, 5 Jul 2022, at 06:34, Peter Eisentraut wrote: > On 01.07.22 14:27, Dagfinn Ilmari Mannsåker wrote: >> Peter Eisentraut writes: >> >>> On 19.05.22 17:34, Dagfinn Ilmari Mannsåker wrote: Prompted by a question on IRC, here's a patch to add a result_types column to the pg_prepared_

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-05 Thread Masahiko Sawada
On Tue, Jul 5, 2022 at 6:18 AM Andres Freund wrote: > > Hi, > > On 2022-06-16 13:56:55 +0900, Masahiko Sawada wrote: > > diff --git a/src/backend/lib/radixtree.c b/src/backend/lib/radixtree.c > > new file mode 100644 > > index 00..bf87f932fd > > --- /dev/null > > +++ b/src/backend/lib/radi

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-05 Thread Masahiko Sawada
On Tue, Jul 5, 2022 at 7:00 AM Andres Freund wrote: > > Hi, > > On 2022-06-28 15:24:11 +0900, Masahiko Sawada wrote: > > In both test cases, There is not much difference between using AVX2 > > and SSE2. The more mode types, the more time it takes for loading the > > data (see sse2_4_16_32_128_256)

Re: doc phrase: "inheritance child"

2022-07-05 Thread Amit Langote
On Thu, Jun 30, 2022 at 6:55 PM Justin Pryzby wrote: > On Fri, May 27, 2022 at 03:22:38PM +0900, Amit Langote wrote: > > On Wed, May 25, 2022 at 1:30 PM Ashutosh Bapat > > wrote: > > > > > > - If true, the stats include inheritance child columns, not just the > > > + If true,

Re: Patch proposal: New hooks in the connection path

2022-07-05 Thread Bharath Rupireddy
On Mon, Jul 4, 2022 at 6:23 PM Drouvot, Bertrand wrote: > > Hi, > > On 7/2/22 1:00 AM, Nathan Bossart wrote: > > Could we model this after fmgr_hook? The first argument in that hook > > indicates where it is being called from. This doesn't alleviate the need > > for several calls to the hook in

Re: typos

2022-07-05 Thread Noah Misch
On Thu, Apr 14, 2022 at 08:56:22AM +1200, David Rowley wrote: > 0007: Not pushed. No space after comment and closing */ pgindent > fixed one of these but not the other 2. I've not looked into why > pgindent does 1 and not the other 2. > -/* get operation priority by its code*/ > +/* get operati

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-05 Thread Andres Freund
Hi, On 2022-07-05 16:33:17 +0900, Masahiko Sawada wrote: > On Tue, Jul 5, 2022 at 6:18 AM Andres Freund wrote: > A datum value is convenient to represent both a pointer and a value so > I used it to avoid defining node types for inner and leaf nodes > separately. I'm not convinced that's a good

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-05 Thread Andres Freund
Hi, On 2022-07-05 16:33:29 +0900, Masahiko Sawada wrote: > > One thing I was wondering about is trying to choose node types in > > roughly-power-of-two struct sizes. It's pretty easy to end up with > > significant > > fragmentation in the slabs right now when inserting as you go, because some >

Re: Handle infinite recursion in logical replication setup

2022-07-05 Thread Amit Kapila
On Mon, Jul 4, 2022 at 11:33 PM vignesh C wrote: > > On Mon, Jul 4, 2022 at 7:44 PM Alvaro Herrera wrote: > > > > > From d8f8844f877806527b6f3f45320b6ba55a8e3154 Mon Sep 17 00:00:00 2001 > > > From: Vigneshwaran C > > > Date: Thu, 26 May 2022 19:29:33 +0530 > > > Subject: [PATCH v27 1/4] Add a m

Wrong provolatile value for to_timestamp (1 argument)

2022-07-05 Thread Tatsuo Ishii
I found that provolatile attribute of to_timestamp in pg_proc is wrong: test=# select provolatile, proargtypes from pg_proc where proname = 'to_timestamp' and proargtypes[0] = 701; provolatile | proargtypes -+- i | 701 (1 row) 'i' (immutable) is clearly wrong

[PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-05 Thread Svetlana Derevyanko
  Hello hackers,   It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as in CREATE FUNCTION. This option may be good for writing extension update scripts, to avoid errors with re-creating the same operator.   Because of cached query plans, only RESTRICT and JOIN options ca

Re: logical replication restrictions

2022-07-05 Thread Peter Smith
Here are some review comments for your v4-0001 patch. I hope they are useful for you. == 1. General This thread name "logical replication restrictions" seems quite unrelated to the patch here. Maybe it's better to start a new thread otherwise nobody is going to recognise what this thread is

Re: Wrong provolatile value for to_timestamp (1 argument)

2022-07-05 Thread Laurenz Albe
On Tue, 2022-07-05 at 17:29 +0900, Tatsuo Ishii wrote: > I found that provolatile attribute of to_timestamp in pg_proc is > wrong: > > test=# select provolatile, proargtypes from pg_proc where proname = > 'to_timestamp' and proargtypes[0] = 701; >  provolatile | proargtypes > -+-

Re: [PoC] Improve dead tuple storage for lazy vacuum

2022-07-05 Thread John Naylor
On Mon, Jul 4, 2022 at 12:07 PM Masahiko Sawada wrote: > > Looking at the node stats, and then your benchmark code, I think key > > construction is a major influence, maybe more than node type. The > > key/value scheme tested now makes sense: > > > > blockhi || blocklo || 9 bits of item offset >

Re: [PoC] Reducing planning time when tables have many partitions

2022-07-05 Thread Yuya Watari
Dear Tom, Thank you for replying to my email. On Mon, Jul 4, 2022 at 6:28 AM Tom Lane wrote: > I'm not real thrilled with trying to throw hashtables at the problem, > though. As David noted, they'd be counterproductive for simple > queries. As you said, my approach that utilizes hash tables ha

Re: [PATCH] Add result_types column to pg_prepared_statements view

2022-07-05 Thread Peter Eisentraut
On 05.07.22 09:31, Dagfinn Ilmari Mannsåker wrote: On Tue, 5 Jul 2022, at 06:34, Peter Eisentraut wrote: On 01.07.22 14:27, Dagfinn Ilmari Mannsåker wrote: Peter Eisentraut writes: On 19.05.22 17:34, Dagfinn Ilmari Mannsåker wrote: Prompted by a question on IRC, here's a patch to add a resu

Re: [PATCH] Add result_types column to pg_prepared_statements view

2022-07-05 Thread Dagfinn Ilmari Mannsåker
Peter Eisentraut writes: > There was a problem that we didn't cover: Not all prepared statements > have result descriptors (e.g., DML statements), so that would crash as > written. D'oh! > I have changed it to return null for result_types in that case, and > added a test case. Thanks for spo

Re: Wrong provolatile value for to_timestamp (1 argument)

2022-07-05 Thread Tatsuo Ishii
> Are you sure? I'd say that "to_timestamp(double precision)" always > produces the same timestamp for the same argument. What changes with > the setting of "timezone" is how that timestamp is converted to a > string, but that's a different affair. Of course the internal representation of timest

Re: Schema variables - new implementation for Postgres 15

2022-07-05 Thread Julien Rouhaud
Hi Pavel, On Tue, Jul 05, 2022 at 08:42:09AM +0200, Pavel Stehule wrote: > Hi > > fresh rebase + type check. Before returning any value, the related type is > checked if it is valid still Great news, thanks a lot for keeping working on it! I'm still in PTO since last Friday, but I'm planning to

Re: [BUG] Logical replication failure "ERROR: could not map filenode "base/13237/442428" to relation OID" with catalog modifying txns

2022-07-05 Thread Amit Kapila
On Mon, Jul 4, 2022 at 6:12 PM Amit Kapila wrote: > > On Mon, May 30, 2022 at 11:13 AM Masahiko Sawada > wrote: > > > > I've attached three POC patches: > > > > I think it will be a good idea if you can add a short commit message > at least to say which patch is proposed for HEAD and which one i

Re: Making Vars outer-join aware

2022-07-05 Thread Richard Guo
On Sat, Jul 2, 2022 at 12:42 AM Tom Lane wrote: > > Anyway, even though this is far from done, I'm pretty pleased with > the results so far, so I thought I'd put it out for review by > anyone who cares to take a look. I'll add it to the September CF > in hopes that it might be more or less finis

Re: Schema variables - new implementation for Postgres 15

2022-07-05 Thread Pavel Stehule
út 5. 7. 2022 v 12:50 odesílatel Julien Rouhaud napsal: > Hi Pavel, > > On Tue, Jul 05, 2022 at 08:42:09AM +0200, Pavel Stehule wrote: > > Hi > > > > fresh rebase + type check. Before returning any value, the related type > is > > checked if it is valid still > > Great news, thanks a lot for keep

Re: CFM Manager

2022-07-05 Thread Ibrar Ahmed
On Tue, Jul 5, 2022 at 8:50 AM Michael Paquier wrote: > On Tue, Jul 05, 2022 at 08:17:26AM +0500, Ibrar Ahmed wrote: > > If nobody has already volunteered for the next upcoming commitfest. > > I'd like to volunteer. I think early to say is better as always. > > Jacob and Daniel have already volun

Re: pg15b2: large objects lost on upgrade

2022-07-05 Thread Shruthi Gowda
I was able to reproduce the issue. Also, the issue does not occur with code before to preserve relfilenode commit. I tested your patch and it fixes the problem. I am currently analyzing a few things related to the issue. I will come back once my analysis is completed. On Sat, Jul 2, 2022 at 9:19 P

Re: doc: BRIN indexes and autosummarize

2022-07-05 Thread Alvaro Herrera
On 2022-Jul-04, Jaime Casanova wrote: > I feel that somewhere in this paragraph it should be mentioned that is > off by default. OK, I added it. On 2022-Jul-04, Justin Pryzby wrote: > [ lots of comments ] OK, I have adopted all your proposed changes, thanks for submitting in both forms. I did

Re: replacing role-level NOINHERIT with a grant-level option

2022-07-05 Thread Robert Haas
On Sun, Jul 3, 2022 at 1:17 PM Nathan Bossart wrote: > If by "bolder" you mean "mark [NO]INHERIT as deprecated-and-to-be-removed > and begin emitting WARNINGs when it and WITH INHERIT DEFAULT are used," I > think it's worth consideration. I suspect it will be hard to sell removing > [NO]INHERIT i

Re: logical replication restrictions

2022-07-05 Thread Amit Kapila
On Tue, Jul 5, 2022 at 2:12 PM Peter Smith wrote: > > Here are some review comments for your v4-0001 patch. I hope they are > useful for you. > > == > > 1. General > > This thread name "logical replication restrictions" seems quite > unrelated to the patch here. Maybe it's better to start a ne

Re: Using PQexecQuery in pipeline mode produces unexpected Close messages

2022-07-05 Thread Alvaro Herrera
I have pushed this to all three branches. Thanks! -- Álvaro Herrera PostgreSQL Developer — https://www.EnterpriseDB.com/ "It takes less than 2 seconds to get to 78% complete; that's a good sign. A few seconds later it's at 90%, but it seems to have stuck there. Did somebody make perce

Re: Support load balancing in libpq

2022-07-05 Thread Bharath Rupireddy
On Fri, Jun 10, 2022 at 10:01 PM Jelte Fennema wrote: > > Load balancing connections across multiple read replicas is a pretty > common way of scaling out read queries. There are two main ways of doing > so, both with their own advantages and disadvantages: > 1. Load balancing at the client level

Re: Temporary file access API

2022-07-05 Thread Antonin Houska
Peter Eisentraut wrote: > On 04.07.22 18:35, Antonin Houska wrote: > >> Attached is a new version of the patch, to evaluate what the API use in the > >> backend could look like. I haven't touched places where the file is > >> accessed > >> in a non-trivial way, e.g. lseek() / fseek() or pg_pwrit

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

2022-07-05 Thread Aleksander Alekseev
Hi Alexander, > Thoughts and feedback are welcome. I took some preliminary look at the patch. I'm going to need more time to meditate on the proposed changes and to figure out the performance impact. So far I just wanted to let you know that the patch applied OK for me and passed all the tests.

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

2022-07-05 Thread Aleksander Alekseev
Hi again, > +if (!updated) > +{ > +/* Should not encounter speculative tuple on recheck */ > +Assert(!HeapTupleHeaderIsSpeculative(tuple->t_data)); > - ReleaseBuffer(buffer); > +ReleaseBuffer(buffer); > +} > +else > +

[PATCH] Reuse Workers and Replication Slots during Logical Replication

2022-07-05 Thread Melih Mutlu
Hi hackers, I created a patch to reuse tablesync workers and their replication slots for more tables that are not synced yet. So that overhead of creating and dropping workers/replication slots can be reduced. Current version of logical replication has two steps: tablesync and apply. In tablesync

Re: Fix proposal for comparaison bugs in PostgreSQL::Version

2022-07-05 Thread Andrew Dunstan
On 2022-07-03 Su 16:12, Jehan-Guillaume de Rorthais wrote: > On Sun, 3 Jul 2022 10:40:21 -0400 > Andrew Dunstan wrote: > >> On 2022-06-29 We 05:09, Jehan-Guillaume de Rorthais wrote: >>> On Tue, 28 Jun 2022 18:17:40 -0400 >>> Andrew Dunstan wrote: >>> On 2022-06-28 Tu 16:53, Jehan-Guilla

Re: Making Vars outer-join aware

2022-07-05 Thread Tom Lane
Richard Guo writes: > For the query in the example > SELECT * FROM t1 LEFT JOIN t2 ON (t1.x = t2.y) WHERE foo(t2.z) > (foo() is not strict.) We want to avoid pushing foo(t2.z) down to the t2 > scan level. Previously we do that with check_outerjoin_delay() by > scanning all the outer joins be

Re: Wrong provolatile value for to_timestamp (1 argument)

2022-07-05 Thread Laurenz Albe
On Tue, 2022-07-05 at 19:37 +0900, Tatsuo Ishii wrote: > > Are you sure?  I'd say that "to_timestamp(double precision)" always > > produces the same timestamp for the same argument.  What changes with > > the setting of "timezone" is how that timestamp is converted to a > > string, but that's a dif

Re: Wrong provolatile value for to_timestamp (1 argument)

2022-07-05 Thread Tom Lane
Laurenz Albe writes: > On Tue, 2022-07-05 at 19:37 +0900, Tatsuo Ishii wrote: >> Of course the internal representation of timestamp with time zone data >> type is not affected by the time zone setting. But why other form of >> to_timestamp is labeled as stable? If your theory is correct, then >> o

Re: Add LZ4 compression in pg_dump

2022-07-05 Thread Justin Pryzby
This is a review of 0001. On Tue, Jul 05, 2022 at 01:22:47PM +, gkokola...@pm.me wrote: > Simply this patchset had started to divert > heavily already based on comments from Mr. Paquier who had already requested > for > the APIs to be refactored to use function pointers. This is happening in

Re: [EXTERNAL] Re: Support load balancing in libpq

2022-07-05 Thread Jelte Fennema
> I'm quoting a previous attempt by Satyanarayana Narlapuram on this > topic [1], it also has a patch set. Thanks for sharing that. It's indeed a different approach to solve the same problem. I think my approach is much simpler, since it only requires minimal changes to the libpq client and none

Re: [PATCH] Optional OR REPLACE in CREATE OPERATOR statement

2022-07-05 Thread Tom Lane
=?UTF-8?B?U3ZldGxhbmEgRGVyZXZ5YW5rbw==?= writes: > It seems useful to have [OR REPLACE] option in CREATE OPERATOR statement, as > in CREATE FUNCTION. This option may be good for writing extension update > scripts, to avoid errors with re-creating the same operator. No, that's not acceptable. C

Re: Handle infinite recursion in logical replication setup

2022-07-05 Thread vignesh C
On Tue, Jul 5, 2022 at 6:14 AM Peter Smith wrote: > > I checked again the v26* patch set. > > I had no more comments for v26-0001, v26-0002, or v26-0004, but below > are some comments for v26-0003. > > > v26-0003 > > > 3.1 src/backend/catalog/pg_subscription.c > > 3.1.a > +/* > +

Re: [PATCH] Log details for client certificate failures

2022-07-05 Thread Jacob Champion
On Fri, Jul 1, 2022 at 1:51 PM Jacob Champion wrote: > Sorry for the misunderstanding! v3 adds the Issuer to the logs as well. Resending v3; I messed up the certificate diff with my gitconfig. --Jacob From 8d03e043cd86ec81dfb49a138e871c5ac110dc06 Mon Sep 17 00:00:00 2001 From: Jacob Champion Da

Re: pg15b2: large objects lost on upgrade

2022-07-05 Thread Robert Haas
On Sat, Jul 2, 2022 at 11:49 AM Justin Pryzby wrote: > I suppose it's like Bruce said, here. > > https://www.postgresql.org/message-id/20210601140949.GC22012%40momjian.us Well, I feel dumb. I remember reading that email back when Bruce sent it, but it seems that it slipped out of my head between

Re: pg15b2: large objects lost on upgrade

2022-07-05 Thread Justin Pryzby
On Tue, Jul 05, 2022 at 12:43:54PM -0400, Robert Haas wrote: > On Sat, Jul 2, 2022 at 11:49 AM Justin Pryzby wrote: > > I suppose it's like Bruce said, here. > > > > https://www.postgresql.org/message-id/20210601140949.GC22012%40momjian.us > > Well, I feel dumb. I remember reading that email back

Re: avoid multiple hard links to same WAL file after a crash

2022-07-05 Thread Nathan Bossart
On Tue, Jul 05, 2022 at 10:19:49AM +0900, Michael Paquier wrote: > On Thu, May 05, 2022 at 08:10:02PM +0900, Michael Paquier wrote: >> I'd agree with removing all the callers at the end. pgrename() is >> quite robust on Windows, but I'd keep the two checks in >> writeTimeLineHistory(), as the logi

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Tom Lane
Bruce Momjian writes: > This patch has been applied back to 9.6 and will appear in the next > minor release. I have just discovered that this patch broke pg_upgrade's ability to upgrade from 8.4: $ pg_upgrade -b ~/version84/bin -d ... Performing Consistency Checks - C

Re: pg_upgrade (12->14) fails on aggregate

2022-07-05 Thread Tom Lane
Andrey Borodin writes: > The patch is marked WiP, what is in progress as of now? It looks about ready to me. Pushed with some minor cosmetic adjustments. regards, tom lane

Re: pg_stat_bgwriter.buffers_backend is pretty meaningless (and more?)

2022-07-05 Thread Melanie Plageman
On Mon, Mar 21, 2022 at 8:15 PM Andres Freund wrote: > Hi, > > On 2022-02-19 11:06:18 -0500, Melanie Plageman wrote: > > v21 rebased with compile errors fixed is attached. > > This currently doesn't apply (mea culpa likely): > http://cfbot.cputube.org/patch_37_3272.log > > Could you rebase? Marke

Re: pg_checkpointer is not a verb or verb phrase

2022-07-05 Thread Robert Haas
On Fri, Jul 1, 2022 at 5:50 PM Nathan Bossart wrote: > On Fri, Jul 01, 2022 at 03:36:48PM +0200, Magnus Hagander wrote: > > +1 for pg_checkpoint on that -- let's not make it longer than necessary. > > > > And yes, +1 for actually changing it. It's a lot cheaper to change it now > > than it will be

Re: generic plans and "initial" pruning

2022-07-05 Thread Jacob Champion
On Fri, May 27, 2022 at 1:09 AM Amit Langote wrote: > 0001 contains the mechanical changes of moving PartitionPruneInfo out > of Append/MergeAppend into a list in PlannedStmt. > > 0002 is the main patch to "Optimize AcquireExecutorLocks() by locking > only unpruned partitions". This patchset will

Re: Making the subquery alias optional in the FROM clause

2022-07-05 Thread Tom Lane
Dean Rasheed writes: > This was discussed previously in [1], and there seemed to be general > consensus in favour of it, but no new patch emerged. As I said in that thread, I'm not super enthused about this, but I was clearly in the minority so I think it should go forward. > Attached is a patch

Re: First draft of the PG 15 release notes

2022-07-05 Thread Bruce Momjian
On Sat, Jul 2, 2022 at 08:13:41PM -0400, Bruce Momjian wrote: > On Fri, Jul 1, 2022 at 09:56:17AM -0700, Peter Geoghegan wrote: > > On Fri, Jul 1, 2022 at 9:41 AM Bruce Momjian wrote: > > > > It might be worth explaining the shift directly in the release notes. > > > > The new approach is simple

Re: [PATCH] Add sortsupport for range types and btree_gist

2022-07-05 Thread Jacob Champion
On Wed, Jun 15, 2022 at 3:45 AM Christoph Heiss wrote: > `make check-world` reports no regressions. cfbot is reporting a crash in contrib/btree_gist: https://cirrus-ci.com/github/postgresql-cfbot/postgresql/commitfest/38/3686 Thanks, --Jacob

Re: Eliminating SPI from RI triggers - take 2

2022-07-05 Thread Jacob Champion
On Thu, Jun 30, 2022 at 11:23 PM Amit Langote wrote: > > I will continue investigating what to do about points (1) and (2) > mentioned above and see if we can do away with using SQL in the > remaining cases. Hi Amit, looks like isolation tests are failing in cfbot: https://cirrus-ci.com/task

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

2022-07-05 Thread Jacob Champion
On Thu, Mar 31, 2022 at 11:53 PM Kyotaro Horiguchi wrote: > So this is that. v5 creates a regular snapshot. This patch will need a quick rebase over 905c020bef9, which added `extern` to several missing locations. Thanks, --Jacob

Re: doc: BRIN indexes and autosummarize

2022-07-05 Thread Roberto Mello
On Mon, Jul 4, 2022 at 9:20 AM Alvaro Herrera wrote: > > [Some of] these additions are wrong actually. It says that autovacuum > will not summarize new entries; but it does. If you just let the table > sit idle, any autovacuum run that cleans the table will also summarize > any ranges that need

Re: First draft of the PG 15 release notes

2022-07-05 Thread Bruce Momjian
On Fri, Jul 1, 2022 at 06:21:28PM -0700, Noah Misch wrote: > Here's what I've been trying to ask: what do you think of linking to > https://www.postgresql.org/docs/devel/ddl-schemas.html#DDL-SCHEMAS-PATTERNS > here? The release note text is still vague, and the docs have extensive > coverage of t

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-07-05 Thread Andres Freund
Hi, On 2022-06-24 10:29:06 -0400, Andrew Dunstan wrote: > On 2022-06-23 Th 21:51, Andres Freund wrote: > > On 2022-06-23 16:38:12 +0900, Michael Paquier wrote: > >> On Tue, Jun 21, 2022 at 05:41:07PM -0400, Andrew Dunstan wrote: > >>> Yes, but I don't guarantee to have a fix in time for Beta2. > >

Re: pg_rewind: warn when checkpoint hasn't happened after promotion

2022-07-05 Thread Robert Haas
On Sat, Jun 4, 2022 at 8:59 AM James Coleman wrote: > A quick background refresher: after promoting a standby rewinding the > former primary requires that a checkpoint have been completed on the > new primary after promotion. This is correctly documented. However > pg_rewind incorrectly reports to

Re: pg15b2: large objects lost on upgrade

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 12:56 PM Justin Pryzby wrote: > My patch also leaves a 0 byte file around from initdb, which is harmless, but > dirty. > > I've seen before where a bunch of 0 byte files are abandoned in an > otherwise-empty tablespace, with no associated relation, and I have to "rm" > them

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Robert Haas
On Sun, Jul 3, 2022 at 1:17 PM Andres Freund wrote: > Yea, I guess I should start a documentation section... > > I've only used homebrew on mac, but with that it should be something along the > lines of > > brew install meson > meson setup --buildtype debug -Dcassert=true build-directory > cd buil

Re: Emit extra debug message when executing extension script.

2022-07-05 Thread Robert Haas
On Mon, Jul 4, 2022 at 5:27 AM Alvaro Herrera wrote: > On 2022-Jun-29, Robert Haas wrote: > > On Wed, Jun 29, 2022 at 9:26 AM Peter Eisentraut > > wrote: > > > On 28.06.22 21:10, Jeff Davis wrote: > > > > + ereport(DEBUG1, errmsg("executing extension script: %s", > > > > filename)); > > > >

Re: pg_rewind: warn when checkpoint hasn't happened after promotion

2022-07-05 Thread James Coleman
On Tue, Jul 5, 2022 at 2:39 PM Robert Haas wrote: > > On Sat, Jun 4, 2022 at 8:59 AM James Coleman wrote: > > A quick background refresher: after promoting a standby rewinding the > > former primary requires that a checkpoint have been completed on the > > new primary after promotion. This is cor

Re: pg_rewind: warn when checkpoint hasn't happened after promotion

2022-07-05 Thread Tom Lane
Robert Haas writes: > Is there anything intrinsic to the mechanism of operation of pg_rewind > that requires a timeline change, or could we just rewind within the > same timeline to an earlier LSN? In other words, maybe we could just > remove this limitation of pg_rewind, and then perhaps it would

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Andres Freund
Hi, On 2022-07-05 14:42:03 -0400, Robert Haas wrote: > On Sun, Jul 3, 2022 at 1:17 PM Andres Freund wrote: > > Yea, I guess I should start a documentation section... > > > > I've only used homebrew on mac, but with that it should be something along > > the > > lines of > > > > brew install meson

Re: pg_rewind: warn when checkpoint hasn't happened after promotion

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 2:47 PM Tom Lane wrote: > Robert Haas writes: > > Is there anything intrinsic to the mechanism of operation of pg_rewind > > that requires a timeline change, or could we just rewind within the > > same timeline to an earlier LSN? In other words, maybe we could just > > remo

Re: First draft of the PG 15 release notes

2022-07-05 Thread Peter Geoghegan
On Tue, Jul 5, 2022 at 11:09 AM Bruce Momjian wrote: > > Actually, I was wrong. I thought that we only mentioned that we > computed a more agressive xid, but now see I was mentioning the _frozen_ > xid. Reading the commit, we do compute the multi-xid and store that too > so I have updated the PG

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Tom Lane
Andres Freund writes: > On 2022-07-05 14:42:03 -0400, Robert Haas wrote: >> Since I'm a macports user I hope at some point we'll have directions >> for that as well as for homebrew. > But it looks like it's just > sudo port install meson Yeah, that's what I did to install it locally. The ninj

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 2:52 PM Tom Lane wrote: > Andres Freund writes: > > On 2022-07-05 14:42:03 -0400, Robert Haas wrote: > >> Since I'm a macports user I hope at some point we'll have directions > >> for that as well as for homebrew. > > > But it looks like it's just > > sudo port install me

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Andrew Dunstan
On 2022-07-05 Tu 12:59, Tom Lane wrote: > Bruce Momjian writes: >> This patch has been applied back to 9.6 and will appear in the next >> minor release. > I have just discovered that this patch broke pg_upgrade's ability > to upgrade from 8.4: > > $ pg_upgrade -b ~/version84/bin -d ... > Perform

Re: doc: BRIN indexes and autosummarize

2022-07-05 Thread Roberto Mello
On Tue, Jul 5, 2022 at 5:47 AM Alvaro Herrera wrote: > OK, I have adopted all your proposed changes, thanks for submitting in > both forms. I did some more wordsmithing and pushed, to branches 12 and > up. 11 fails 'make check', I think for lack of Docbook id tags, and I > didn't want to waste

Re: [PATCH] Implement INSERT SET syntax

2022-07-05 Thread Jacob Champion
On Thu, Apr 7, 2022 at 11:29 AM Marko Tiikkaja wrote: > I can help with review and/or other work here. Please give me a > couple of weeks. Hi Marko, did you get a chance to pick up this patchset? If not, no worries; I can mark this RwF and we can try again in a future commitfest. Thanks, --Jaco

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Andres Freund
Hi, On 2022-07-05 14:52:05 -0400, Tom Lane wrote: > I dunno anything about the other steps Andres mentioned, but > presumably they're independent of where you got meson from. Yea. They might not be independent of where you get other dependencies from though. Does macports install headers / librar

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-07-05 Thread Andrew Dunstan
On 2022-07-05 Tu 14:36, Andres Freund wrote: > Hi, > > On 2022-06-24 10:29:06 -0400, Andrew Dunstan wrote: >> On 2022-06-23 Th 21:51, Andres Freund wrote: >>> On 2022-06-23 16:38:12 +0900, Michael Paquier wrote: On Tue, Jun 21, 2022 at 05:41:07PM -0400, Andrew Dunstan wrote: > Yes, but I

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Tom Lane
Andres Freund writes: > Yea. They might not be independent of where you get other dependencies from > though. Does macports install headers / libraries into a path that's found by > default? Or does one have to pass --with-includes / --with-libs to configure > and set PKG_CONFIG_PATH, like with ho

Re: [PATCH] Fix pg_upgrade test from v10

2022-07-05 Thread Justin Pryzby
On Tue, Jul 05, 2022 at 09:01:49AM +0300, Anton A. Melnikov wrote: > On 01.07.2022 20:07, Justin Pryzby wrote: > > It's silly to say that v9.2 will be supported potentially for a handful more > > years, but that the upgrade-testing script itself doesn't support that, so > > developers each have to

Re: PG 15 (and to a smaller degree 14) regression due to ExprEvalStep size

2022-07-05 Thread Andres Freund
Hi, On 2022-06-23 18:51:45 -0700, Andres Freund wrote: > > Waiting for beta3 would a better move at this stage. Is somebody confident > > enough in the patches proposed? > > 0001 is the one that needs to most careful analysis, I think. 0002 I'd be fine > with pushing after reviewing it again. Fo

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Andres Freund
Hi, On 2022-07-05 15:06:31 -0400, Tom Lane wrote: > Andres Freund writes: > > Yea. They might not be independent of where you get other dependencies from > > though. Does macports install headers / libraries into a path that's found > > by > > default? Or does one have to pass --with-includes /

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Tom Lane
Andrew Dunstan writes: > So it's taken us a year to discover the issue :-( Perhaps if we're going > to say we support upgrades back to 9.0 we should have some testing to be > assured we don't break it without knowing like this. I'll see if I can > coax crake to do that - it already tests back to 9

Re: [PATCH] Completed unaccent dictionary with many missing characters

2022-07-05 Thread Przemysław Sztoch
Michael Paquier wrote on 7/5/2022 9:22 AM: On Tue, Jun 28, 2022 at 02:14:53PM +0900, Michael Paquier wrote: Well, the addition of cyrillic does not make necessary the removal of SOUND RECORDING COPYRIGHT or the DEGREEs, that implies the use of a dictionnary when manipulating the set of codepoint

Re: Emit extra debug message when executing extension script.

2022-07-05 Thread Alvaro Herrera
On 2022-Jul-05, Robert Haas wrote: > On Mon, Jul 4, 2022 at 5:27 AM Alvaro Herrera wrote: > > On 2022-Jun-29, Robert Haas wrote: > > > Why? > > > > The reason is that errmsg() marks the message for translation, and we > > don't want to burden translators with messages that are of little > > inte

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Peter Geoghegan
On Tue, Jul 5, 2022 at 11:53 AM Andrew Dunstan wrote: > > Sure enough, 8.4's pg_controldata doesn't print anything about > > oldestXID, because that info wasn't there then. > > > > Given the lack of field complaints, it's probably not worth trying > > to do anything to restore that capability. Bu

Re: pg_checkpointer is not a verb or verb phrase

2022-07-05 Thread Nathan Bossart
On Tue, Jul 05, 2022 at 01:38:43PM -0400, Robert Haas wrote: > Hearing several votes in favor and none opposed, committed and > back-patched to v15. Thanks. > I added the catversion bump, but left out the .po > file changes, figuring it was better to let those files get updated > via the normal p

Re: doc: BRIN indexes and autosummarize

2022-07-05 Thread Alvaro Herrera
On 2022-Jul-05, Roberto Mello wrote: > You removed the reference to the functions' documentation at > functions-admin-index choosing instead to duplicate a summarized > version of the docs, and to boot getting the next block to be blobbed > together with it. Actually, my first instinct was to mov

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Peter Geoghegan
On Tue, Jul 5, 2022 at 12:41 PM Peter Geoghegan wrote: > Actually, commit 74cf7d46 was where pg_resetxlog/pg_resetwal's -u > argument was first added, for use by pg_upgrade. That commit is only > about a year old, and was only backpatched to 9.6. I just realized that this thread was where that wo

Re: "ERROR: latch already owned" on gharial

2022-07-05 Thread Robert Haas
On Sun, Jul 3, 2022 at 11:51 PM Thomas Munro wrote: > On Wed, Jun 1, 2022 at 12:55 AM Robert Haas wrote: > > OK, I have access to the box now. I guess I might as well leave the > > crontab jobs enabled until the next time this happens, since Thomas > > just took steps to improve the logging, but

Re: doc: BRIN indexes and autosummarize

2022-07-05 Thread Justin Pryzby
On Tue, Jul 05, 2022 at 01:47:27PM +0200, Alvaro Herrera wrote: > OK, I have adopted all your proposed changes, thanks for submitting in > both forms. I did some more wordsmithing and pushed, to branches 12 and > up. 11 fails 'make check', I think for lack of Docbook id tags, and I > didn't want

Re: First draft of the PG 15 release notes

2022-07-05 Thread Bruce Momjian
On Tue, Jul 5, 2022 at 11:51:31AM -0700, Peter Geoghegan wrote: > On Tue, Jul 5, 2022 at 11:09 AM Bruce Momjian wrote: > > > > Actually, I was wrong. I thought that we only mentioned that we > > computed a more agressive xid, but now see I was mentioning the _frozen_ > > xid. Reading the commit

Re: First draft of the PG 15 release notes

2022-07-05 Thread Noah Misch
On Tue, Jul 05, 2022 at 02:35:39PM -0400, Bruce Momjian wrote: > On Fri, Jul 1, 2022 at 06:21:28PM -0700, Noah Misch wrote: > > Here's what I've been trying to ask: what do you think of linking to > > https://www.postgresql.org/docs/devel/ddl-schemas.html#DDL-SCHEMAS-PATTERNS > > here? The releas

Re: First draft of the PG 15 release notes

2022-07-05 Thread Bruce Momjian
On Tue, Jul 5, 2022 at 12:53:49PM -0700, Noah Misch wrote: > On Tue, Jul 05, 2022 at 02:35:39PM -0400, Bruce Momjian wrote: > > On Fri, Jul 1, 2022 at 06:21:28PM -0700, Noah Misch wrote: > > > Here's what I've been trying to ask: what do you think of linking to > > > https://www.postgresql.org/do

Re: making relfilenodes 56 bits

2022-07-05 Thread Robert Haas
On Fri, Jul 1, 2022 at 6:42 AM Dilip Kumar wrote: > > - I might be missing something here, but this isn't actually making > > the relfilenode 56 bits, is it? The reason to do that is to make the > > BufferTag smaller, so I expected to see that BufferTag either used > > bitfields like RelFileNumber

symbol "conflicts" between libpq and binaries

2022-07-05 Thread Andres Freund
Hi, There's a number of symbols that are exported by libpq that are also in binaries (mostly via pgport). That strikes me as not great, because the behaviour in those cases isn't particularly well defined / OS dependent / linker option dependent. How about renaming those functions, turning the fu

Re: making relfilenodes 56 bits

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 4:33 AM Dilip Kumar wrote: > I thought about this comment from Robert > > that's not quite the same as either of those things. For example, in > > tableam.h we currently say "This callback needs to create a new > > relation filenode for `rel`" and how should that be changed

Re: PSA: Autoconf has risen from the dead

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 3:02 PM Andres Freund wrote: > Yea. They might not be independent of where you get other dependencies from > though. Does macports install headers / libraries into a path that's found by > default? Or does one have to pass --with-includes / --with-libs to configure > and set

Re: pg_checkpointer is not a verb or verb phrase

2022-07-05 Thread Robert Haas
On Tue, Jul 5, 2022 at 3:42 PM Nathan Bossart wrote: > On Tue, Jul 05, 2022 at 01:38:43PM -0400, Robert Haas wrote: > > Hearing several votes in favor and none opposed, committed and > > back-patched to v15. > > Thanks. > > > I added the catversion bump, but left out the .po > > file changes, figu

Re: [UNVERIFIED SENDER] Re: pg_upgrade can result in early wraparound on databases with high transaction load

2022-07-05 Thread Andrew Dunstan
On 2022-07-05 Tu 15:17, Tom Lane wrote: > Andrew Dunstan writes: >> So it's taken us a year to discover the issue :-( Perhaps if we're going >> to say we support upgrades back to 9.0 we should have some testing to be >> assured we don't break it without knowing like this. I'll see if I can >> co

Re: Issue with pg_stat_subscription_stats

2022-07-05 Thread Andres Freund
Hi, On 2022-07-04 11:01:01 +0900, Masahiko Sawada wrote: > I've attached the patch, fix_drop_subscriptions_stats.patch, to fix it. LGTM. Unless somebody sees a reason not to, I'm planning to commit that to 15 and HEAD. > I've also attached another PoC patch, > poc_create_subscription_stats.patc

Re: First draft of the PG 15 release notes

2022-07-05 Thread Noah Misch
On Tue, Jul 05, 2022 at 04:35:32PM -0400, Bruce Momjian wrote: > On Tue, Jul 5, 2022 at 12:53:49PM -0700, Noah Misch wrote: > > On Tue, Jul 05, 2022 at 02:35:39PM -0400, Bruce Momjian wrote: > > > On Fri, Jul 1, 2022 at 06:21:28PM -0700, Noah Misch wrote: > > > > Here's what I've been trying to a

  1   2   >