Re: Use -fvisibility=hidden for shared libraries

2022-07-18 Thread Andres Freund
Hi, On 2022-07-17 14:54:48 -0400, Tom Lane wrote: > Beyond that, I think this is committable. We're not likely to learn much > more about any potential issues except by exposing it to the buildfarm > and developer usage. Leaving egg on my face aside, seems to work well so far. It looks like we

Re: Allow file inclusion in pg_hba and pg_ident files

2022-07-18 Thread Julien Rouhaud
Hi, On Mon, Jul 11, 2022 at 10:16:44AM +0900, Michael Paquier wrote: > On Fri, Jul 08, 2022 at 02:57:21PM +0800, Julien Rouhaud wrote: > > My apologies for the late reply. > > > I don't have an extensive knowledge of all the user facing error messages, > > but > > after a quick grep I see multi

Re: Proposal to introduce a shuffle function to intarray extension

2022-07-18 Thread Martin Kalcher
Am 18.07.22 um 01:20 schrieb Tom Lane: I would expect that shuffle() only shuffles the first dimension and keeps the inner arrays intact. This argument is based on a false premise, ie that Postgres thinks multidimensional arrays are arrays-of-arrays. They aren't, and we're not going to start m

Re: Problem about postponing gathering partial paths for topmost scan/join rel

2022-07-18 Thread Richard Guo
On Fri, Jul 15, 2022 at 5:00 PM Richard Guo wrote: > On Fri, Jul 15, 2022 at 4:03 PM Richard Guo > wrote: > >> On Thu, Jul 14, 2022 at 10:02 PM Antonin Houska wrote: >> >>> I'd prefer a test that demonstrates that the Gather node at the top of >>> the >>> "subproblem plan" is useful purely from

Re: Proposal to introduce a shuffle function to intarray extension

2022-07-18 Thread Martin Kalcher
Am 18.07.22 um 01:20 schrieb Tom Lane: (Having said that, even if we were going to implement it with that definition, I should think that it'd be easiest to do so on the array-of-Datums representation produced by deconstruct_array. That way you don't need to do different things for different elem

Re: [RFC] building postgres with meson - v10

2022-07-18 Thread Aleksander Alekseev
Hi Andres, > Attached is v10 of the meson patchset. Lots of small changes, I don't think > anything major. I tried to address most of Peter's feedback for the earlier > patches. > > After this I plan to clean up the "export" patch, since that's I think the > next bigger step, and an improvement on

Re: [RFC] building postgres with meson - v10

2022-07-18 Thread Aleksander Alekseev
Hi again, > Just a quick question - is there a reason for changing the subject of > the emails? > > Not all email clients handle this well, e.g. Google Mail considers > this being 10 separate threads. The CF application and/or > pgsql-hackers@ archive also don't recognise this as a continuation of

Re: Proposal to introduce a shuffle function to intarray extension

2022-07-18 Thread John Naylor
On Mon, Jul 18, 2022 at 2:47 PM Martin Kalcher < martin.kalc...@aboutsource.net> wrote: > One more question. How do i pick a Oid for the functions? For this, we recommend running src/include/catalog/unused_oids, and it will give you a random range to pick from. That reduces the chance of different

Re: Fast COPY FROM based on batch insert

2022-07-18 Thread Etsuro Fujita
On Thu, Mar 24, 2022 at 3:43 PM Andrey V. Lepikhov wrote: > On 3/22/22 06:54, Etsuro Fujita wrote: > > * To allow foreign multi insert, the patch made an invasive change to > > the existing logic to determine whether to use multi insert for the > > target relation, adding a new member ri_usesMulti

Re: [PATCH] Use indexes on the subscriber when REPLICA IDENTITY is full on the publisher

2022-07-18 Thread Amit Kapila
On Mon, Jul 18, 2022 at 11:59 AM Amit Kapila wrote: > > On Tue, Jul 12, 2022 at 7:07 PM Önder Kalacı wrote: > > > > Hi hackers, > > > > > > It is often not feasible to use `REPLICA IDENTITY FULL` on the publication, > > because it leads to full table scan > > > > per tuple change on the subscrip

Re: Lazy JIT IR code generation to increase JIT speed with partitions

2022-07-18 Thread David Geier
Can you elaborate a bit more on how you conclude that? Looking at the numbers I measured in one of my previous e-mails, it looks to me like the overhead of using multiple modules is fairly low and only measurable in queries with dozens of modules. Given that JIT is most useful in queries that

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Aleksander Alekseev
Hi hackers, > > If someone put a lot of review into a patchset a few months ago, they > > absolutely deserve credit. But if that entry has been sitting with no > > feedback this month, why is it useful to keep that Reviewer around? As I recall, several committers reported before that they use Rev

Re: PSA: Autoconf has risen from the dead

2022-07-18 Thread Peter Eisentraut
On 16.07.22 17:26, Tom Lane wrote: On the whole though, my feeling is that autoconf 2.71 doesn't offer enough to us to justify possibly causing substantial pain for a few developers. I recommend setting this project aside for now. We can always reconsider if the situation changes. Ok, let's d

Re: [RFC] building postgres with meson - v10

2022-07-18 Thread Peter Eisentraut
On 15.07.22 07:08, Andres Freund wrote: Attached is v10 of the meson patchset. Lots of small changes, I don't think anything major. I tried to address most of Peter's feedback for the earlier patches. The following patches are ok to commit IMO: a1c5542929 prereq: Deal with paths containing \ a

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Alvaro Herrera
On 2022-Jul-18, Aleksander Alekseev wrote: > Hi hackers, > > > > If someone put a lot of review into a patchset a few months ago, they > > > absolutely deserve credit. But if that entry has been sitting with no > > > feedback this month, why is it useful to keep that Reviewer around? > > As I re

Re: PATCH: Add Table Access Method option to pgbench

2022-07-18 Thread Alexander Korotkov
On Mon, Jul 18, 2022 at 12:08 AM Mason Sharp wrote: > On Wed, Jul 13, 2022 at 12:33 AM Michel Pelletier wrote: >> >> On Thu, 30 Jun 2022 at 18:09, Michael Paquier wrote: >>> >>> On Fri, Jul 01, 2022 at 10:06:49AM +0900, Michael Paquier wrote: >>> > And the conclusion back then is that one can al

Re: Transparent column encryption

2022-07-18 Thread Peter Eisentraut
On 15.07.22 19:47, Jacob Champion wrote: The CEK key material is in turn encrypted by an assymmetric key called the column master key (CMK). I'm not yet understanding why the CMK is asymmetric. I'm not totally sure either. I started to build it that way because other systems

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-07-18 Thread Bharath Rupireddy
On Tue, Apr 26, 2022 at 1:24 AM Nathan Bossart wrote: > > It's been a few weeks, so I'm marking the commitfest entry as > waiting-on-author. Thanks. I'm attaching the updated v4 patches (also subsumed Kyotaro San's patch at [1]). Please review it further. [1] https://www.postgresql.org/message-

Re: making relfilenodes 56 bits

2022-07-18 Thread Dilip Kumar
On Thu, Jul 14, 2022 at 5:18 PM Dilip Kumar wrote: > Apart from this I have fixed all the pending issues that includes > > - Change existing macros to inline functions done in 0001. > - Change pg_class index from (tbspc, relfilenode) to relfilenode and > also change RelidByRelfilenumber(). In Re

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-07-18 Thread Bharath Rupireddy
On Fri, Jul 8, 2022 at 10:44 PM Nathan Bossart wrote: > > > 0002 - I'm not quite happy with this patch, with the change, > > checkpoint errors out, if it can't remove just a file - the comments > > there says it all. Is there any strong reason for this change? > > Andres noted several concerns upt

Re: make install-world fails sometimes in Mac M1

2022-07-18 Thread Gaddam Sai Ram
> It must be a problem induced by the shell used to run the script, then. > What is it? The script itself doesn't say. Tried with, 1. Bash shell 2. zsh shell 3. Started terminal via rosetta(Again with both bash and zsh) Same issue in all 3 cases. Regards G. Sai Ram On Wed, 13

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2022-07-18 Thread Tomas Vondra
On 7/16/22 23:57, Tom Lane wrote: > Andres Freund writes: >> On 2022-02-23 00:51:24 +0100, Tomas Vondra wrote: >>> And here's the slightly simplified patch, without the part adding the >>> unnecessary GetServerVersion() function. > >> Doesn't apply anymore: http://cfbot.cputube.org/patch_37_3535.

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

2022-07-18 Thread Amit Kapila
On Sun, Jul 17, 2022 at 6:29 PM Masahiko Sawada wrote: > > On Fri, Jul 15, 2022 at 3:32 PM shiy.f...@fujitsu.com > wrote: > > > > I've attached patches for all supported branches including the master. > For back branch patches, * Wouldn't it be better to move purge logic into the function SnapBu

Re: [PATCH] Compression dictionaries for JSONB

2022-07-18 Thread Aleksander Alekseev
Hi Nikita, Thanks for your feedback! > Aleksander, I've carefully gone over discussion and still have some questions > to ask - > > 1) Is there any means of measuring overhead of dictionaries over vanilla > implementation? IMO it is a must because > JSON is a widely used functionality. Also, as

Re: Problem about postponing gathering partial paths for topmost scan/join rel

2022-07-18 Thread Antonin Houska
Richard Guo wrote: > On Fri, Jul 15, 2022 at 5:00 PM Richard Guo wrote: > > On Fri, Jul 15, 2022 at 4:03 PM Richard Guo wrote: > > On Thu, Jul 14, 2022 at 10:02 PM Antonin Houska wrote: > > I'd prefer a test that demonstrates that the Gather node at the top of the > "subproblem plan" is

Re: Commitfest Update

2022-07-18 Thread Alvaro Herrera
Maybe we should have two reviewers columns -- one for history-tracking purposes (and commit msg credit) and another for current ones. Personally, I don't use the CF app when building reviewer lists. I scan the threads instead. -- Álvaro Herrera 48°01'N 7°57'E — https://www.Enter

Re: Commitfest Update

2022-07-18 Thread Justin Pryzby
On Mon, Jul 18, 2022 at 03:05:51PM +0200, Alvaro Herrera wrote: > Maybe we should have two reviewers columns -- one for history-tracking > purposes (and commit msg credit) and another for current ones. Maybe. Or, the list of reviewers shouldn't be shown prominently in the list of patches. But ch

Re: MERGE and parsing with prepared statements

2022-07-18 Thread Justin Pryzby
On Fri, Jul 15, 2022 at 03:43:41PM -0500, Justin Pryzby wrote: > Should that sentence be removed from MERGE ? Also, I think these examples should be more similar. doc/src/sgml/ref/merge.sgml > > MERGE INTO CustomerAccount CA > USING RecentTransactions T > ON T.CustomerId = CA.CustomerId > WHEN

limits of max, min optimization

2022-07-18 Thread Pavel Stehule
Hi I am trying to fix one slow query, and found that optimization of min, max functions is possible only when there is no JOIN in the query. Is it true? I need to do manual transformation of query select max(insert_date) from foo join boo on foo.boo_id = boo.id where foo.item_id = 100 and boo.i

Re: Proposal to introduce a shuffle function to intarray extension

2022-07-18 Thread Tom Lane
John Naylor writes: > On Mon, Jul 18, 2022 at 2:47 PM Martin Kalcher < > martin.kalc...@aboutsource.net> wrote: >> One more question. How do i pick a Oid for the functions? > For this, we recommend running src/include/catalog/unused_oids, and it will > give you a random range to pick from. That r

Re: Use fadvise in wal replay

2022-07-18 Thread Andrey Borodin
> On 23 Jun 2022, at 12:50, Jakub Wartak wrote: > > Thoughts? I've looked into the patch one more time. And I propose to change this line + posix_fadvise(readFile, readOff + RACHUNK, RACHUNK, POSIX_FADV_WILLNEED); to + posix_fadvise(readFile, readOff + XLOG_BLCKSZ

Re: limits of max, min optimization

2022-07-18 Thread Alvaro Herrera
On 2022-Jul-18, Pavel Stehule wrote: > Hi > > I am trying to fix one slow query, and found that optimization of min, max > functions is possible only when there is no JOIN in the query. > > Is it true? See preprocess_minmax_aggregates() in src/backend/optimizer/plan/planagg.c > select max(inse

Re: limits of max, min optimization

2022-07-18 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Jul-18, Pavel Stehule wrote: >> I am trying to fix one slow query, and found that optimization of min, max >> functions is possible only when there is no JOIN in the query. > See preprocess_minmax_aggregates() in > src/backend/optimizer/plan/planagg.c > Maybe it i

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

2022-07-18 Thread Justin Pryzby
It's easy to use CREATE TABLE..LIKE + ALTER..ATTACH PARTITION to avoid acquiring a strong lock when creating a new partition. But it's also easy to forget. commit 76c0d1198cf2908423b321cd3340d296cb668c8e Author: Justin Pryzby Date: Mon Jul 18 09:24:55 2022 -0500 doc: mention CREATE+ATTACH

Re: limits of max, min optimization

2022-07-18 Thread Pavel Stehule
po 18. 7. 2022 v 16:29 odesílatel Tom Lane napsal: > Alvaro Herrera writes: > > On 2022-Jul-18, Pavel Stehule wrote: > >> I am trying to fix one slow query, and found that optimization of min, > max > >> functions is possible only when there is no JOIN in the query. > > > See preprocess_minmax_a

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

2022-07-18 Thread Andrew Dunstan
On 2022-07-18 Mo 10:33, Justin Pryzby wrote: > It's easy to use CREATE TABLE..LIKE + ALTER..ATTACH PARTITION to avoid > acquiring a strong lock when creating a new partition. > But it's also easy to forget. > > commit 76c0d1198cf2908423b321cd3340d296cb668c8e > Author: Justin Pryzby > Date: Mon

Re: [RFC] building postgres with meson - v10

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 11:12:10 +0300, Aleksander Alekseev wrote: > > Just a quick question - is there a reason for changing the subject of > > the emails? > > > > Not all email clients handle this well, e.g. Google Mail considers > > this being 10 separate threads. The CF application and/or > > pgsql-

Re: Transparent column encryption

2022-07-18 Thread Robert Haas
On Mon, Jul 18, 2022 at 6:53 AM Peter Eisentraut wrote: > I think a way to look at this is that this column encryption feature > isn't suitable for disguising the existence or absence of data, it can > only disguise the particular data that you know exists. +1. Even there, what can be accomplish

Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-18 Thread Tom Lane
I got annoyed just now upon finding that pprint() applied to the planner's "root" pointer doesn't dump root->agginfos or root->aggtransinfos. That's evidently because AggInfo and AggTransInfo aren't proper Nodes, just bare structs, which presumably is because somebody couldn't be bothered to write

Re: Costing elided SubqueryScans more nearly correctly

2022-07-18 Thread Alvaro Herrera
On 2022-Jul-18, Richard Guo wrote: > BTW, not related to this patch, the new lines for parallel_aware check > in setrefs.c are very wide. How about wrap them to keep consistent with > arounding codes? Not untrue! Something like this, you mean? Fixed the nearby typo while at it. -- Álvaro Herr

Re: Costing elided SubqueryScans more nearly correctly

2022-07-18 Thread Tom Lane
Alvaro Herrera writes: > On 2022-Jul-18, Richard Guo wrote: >> BTW, not related to this patch, the new lines for parallel_aware check >> in setrefs.c are very wide. How about wrap them to keep consistent with >> arounding codes? > Not untrue! Something like this, you mean? Fixed the nearby typo

Re: Making pg_rewind faster

2022-07-18 Thread Justin Kwan
Hi Tom, Thank you for taking a look at this and that sounds good. I will send over a patch compatible with Postgres v16. Justin From: Tom Lane Sent: July 17, 2022 2:40 PM To: Justin Kwan Cc: pgsql-hackers ; vignesh ; jk...@cloudflare.com ; vignesh ravichandra

Re: Convert planner's AggInfo and AggTransInfo to Nodes

2022-07-18 Thread Dagfinn Ilmari Mannsåker
Tom Lane writes: > I got annoyed just now upon finding that pprint() applied to the planner's > "root" pointer doesn't dump root->agginfos or root->aggtransinfos. That's > evidently because AggInfo and AggTransInfo aren't proper Nodes, just bare > structs, which presumably is because somebody co

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Jacob Champion
On 7/15/22 16:42, Jacob Champion wrote: > If you have thoughts/comments on this approach, please share them! Okay, plenty of feedback to sift through here. [CFM hat] First of all: mea culpa. I unilaterally made a change that I had assumed would be uncontroversial; it clearly was not, and I inter

Re: support for CREATE MODULE

2022-07-18 Thread Nathan Bossart
On Thu, Mar 17, 2022 at 04:30:43PM -0700, Nathan Bossart wrote: > On Thu, Mar 17, 2022 at 04:26:31PM -0700, Swaha Miller wrote: >> On Thu, Mar 17, 2022 at 4:16 PM Nathan Bossart >> wrote: >>> It seems unlikely that this will be committed for v15. Swaha, should the >>> commitfest entry be adjusted

Re: Commitfest Update

2022-07-18 Thread Justin Pryzby
On Fri, Jul 15, 2022 at 05:23:48PM -0700, Jacob Champion wrote: >> This is important stuff to discuss, for sure, but I also want to revisit >> the thing I put on pause, which is to clear out old Reviewer entries to >> make it easier for new reviewers to find work to do. If we're not using >> Review

Re: Avoid erroring out when unable to remove or parse logical rewrite files to save checkpoint work

2022-07-18 Thread Nathan Bossart
On Mon, Jul 18, 2022 at 04:53:18PM +0530, Bharath Rupireddy wrote: > Just wondering - do we ever have a problem if we can't remove the > snapshot or mapping file? Besides running out of disk space, there appears to be a transaction ID wraparound risk with the mappings files. -- Nathan Bossart Am

Re: Use "WAL segment" instead of "log segment" consistently in user-facing messages

2022-07-18 Thread Nathan Bossart
Overall, these patches look reasonable. On Mon, Jul 18, 2022 at 04:24:12PM +0530, Bharath Rupireddy wrote: > record. Because the entire content of data pages is saved in the > - log on the first page modification after a checkpoint (assuming > + WAL record on the first page modification a

Re: postgres_fdw: using TABLESAMPLE to collect remote sample

2022-07-18 Thread Tom Lane
Tomas Vondra writes: > Thanks. I'll switch this to "needs review" now. OK, I looked through this, and attach some review suggestions in the form of a delta patch. (0001 below is your two patches merged, 0002 is my delta.) A lot of the delta is comment-smithing, but not all. After reflection I

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

2022-07-18 Thread Pavel Stehule
ne 17. 7. 2022 v 16:01 odesílatel Justin Pryzby napsal: > Thanks for updating the patch. > > This failed to build on windows. > http://cfbot.cputube.org/pavel-stehule.html > > Yes, there was a significant problem with the function exit_nicely, that is differently implemented in pg_dump and pg_dum

Re: pg15b2: large objects lost on upgrade

2022-07-18 Thread Robert Haas
On Tue, Jul 12, 2022 at 4:51 PM Robert Haas wrote: > I have a few more ideas to try here. It occurs to me that we could fix > this more cleanly if we could get the dump itself to set the > relfilenode for pg_largeobject to the desired value. Right now, it's > just overwriting the relfilenode store

Re: Commitfest Update

2022-07-18 Thread Jacob Champion
Justin, (Consolidating replies here.) On 7/15/22 19:13, Justin Pryzby wrote: > cfbot is Thomas's project, so moving it run on postgres vm was one step, but I > imagine the "integration with cfapp" requires coordination with Magnus. > > What patch ? https://www.postgresql.org/message-id/CAAWbhmg

Re: Commitfest Update

2022-07-18 Thread Jacob Champion
On 7/18/22 06:13, Justin Pryzby wrote: > On Mon, Jul 18, 2022 at 03:05:51PM +0200, Alvaro Herrera wrote: >> Maybe we should have two reviewers columns -- one for history-tracking >> purposes (and commit msg credit) and another for current ones. > > Maybe. Or, the list of reviewers shouldn't be sh

[PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Martin Kalcher
Thanks for all your feedback and help. I got a patch that i consider ready for review. It introduces two new functions: array_shuffle(anyarray) -> anyarray array_sample(anyarray, integer) -> anyarray array_shuffle() shuffles an array (obviously). array_sample() picks n random elements from

Re: Commitfest Update

2022-07-18 Thread Jacob Champion
On 7/15/22 19:59, Michael Paquier wrote: > On this point, I'd like to think that a window of two weeks is a right > balance. That's half of the commit fest, so that leaves plenty of > time for one to answer. There is always the case where one is on > vacations for a period longer than that, but i

Re: Commitfest Update

2022-07-18 Thread Jacob Champion
On 7/17/22 08:17, Nathan Bossart wrote: > On Fri, Jul 15, 2022 at 09:37:14PM -0500, Justin Pryzby wrote: >> I'm not suggesting to give the community regulars special treatment, but you >> could reasonably assume that when they added themselves and then "didn't >> remove >> themself", it was on pur

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

2022-07-18 Thread Andrew Dunstan
On 2022-07-15 Fr 17:07, Andres Freund wrote: > Hi, > > On 2022-07-08 17:05:49 -0400, Andrew Dunstan wrote: >> On 2022-07-05 Tu 15:04, Andrew Dunstan wrote: >>> On 2022-07-05 Tu 14:36, Andres Freund wrote: >> I think Andrew's beta 2 comment was more about my other architectural >> complains

Re: fix crash with Python 3.11

2022-07-18 Thread Peter Eisentraut
On 23.06.22 09:41, Markus Wanner wrote: On 6/21/22 18:33, Tom Lane wrote: My inclination at this point is to not back-patch the second change 12d768e70 ("Don't use static storage for SaveTransactionCharacteristics"). It's not clear that the benefit would be worth even a small risk of somebody

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Jacob Champion
[dev hat] On 7/15/22 18:07, Andres Freund wrote: > IDK, I've plenty times given feedback and it took months till it all was > implemented. What's the point of doing further rounds of review until then? I guess I would wonder why we're optimizing for that case. Is it helpful for that patch to stic

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

2022-07-18 Thread Robert Haas
On Thu, Jul 14, 2022 at 10:53 AM tushar wrote: > GRANT "g2" TO "u1" WITH GRANTED BY "edb"; Another good catch. Here is v5 with a fix for that problem. -- Robert Haas EDB: http://www.enterprisedb.com v5-0001-Allow-grant-level-control-of-role-inheritance-beh.patch Description: Binary data

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Tom Lane
Martin Kalcher writes: > Is someone interested in looking at it? What are the next steps? The preferred thing to do is to add it to our "commitfest" queue, which will ensure that it gets looked at eventually. The currently open cycle is 2022-09 [1] (see the "New Patch" button there). I believe

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 12:22:25 -0700, Jacob Champion wrote: > [dev hat] > > On 7/15/22 18:07, Andres Freund wrote: > > IDK, I've plenty times given feedback and it took months till it all was > > implemented. What's the point of doing further rounds of review until then? > > I guess I would wonder w

Re: Use fadvise in wal replay

2022-07-18 Thread Robert Haas
On Thu, Jun 23, 2022 at 5:49 AM Jakub Wartak wrote: > Cool. As for GUC I'm afraid there's going to be resistance of adding yet > another GUC (to avoid many knobs). Ideally it would be nice if we had some > advanced/deep/hidden parameters , but there isn't such thing. > Maybe another option would

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-07-18 Thread Bruce Momjian
On Fri, Jul 15, 2022 at 09:29:20PM +0800, Japin Li wrote: > > On Fri, 15 Jul 2022 at 08:49, Bruce Momjian wrote: > > On Tue, Jul 5, 2022 at 08:02:33PM -0400, Tom Lane wrote: > >> "Precondition" is an overly fancy word that makes things less clear > >> not more so. Does it mean that setting wal_

Re: Commitfest Update

2022-07-18 Thread Nathan Bossart
On Mon, Jul 18, 2022 at 12:06:34PM -0700, Jacob Champion wrote: > On 7/17/22 08:17, Nathan Bossart wrote: >> Yeah, I happened to look in my commitfest update folder this morning and >> was surprised to learn that I was no longer reviewing 3612. I spent a good >> amount of time getting that patch i

Re: pg15b2: large objects lost on upgrade

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 14:57:40 -0400, Robert Haas wrote: > As to whether this is a good fix, I think someone could certainly > argue otherwise. This is all a bit grotty. However, I don't find it > all that bad. As long as we're moving files from between one PG > cluster and another using an external t

Re: pg15b2: large objects lost on upgrade

2022-07-18 Thread Bruce Momjian
On Mon, Jul 18, 2022 at 02:57:40PM -0400, Robert Haas wrote: > So I tried implementing this but I didn't get it quite right the first > time. It's not enough to call smgrdounlinkall() instead of > RelationDropStorage(), because just as RelationDropStorage() does not > actually drop the storage but

Re: System column support for partitioned tables using heap

2022-07-18 Thread Robert Haas
On Sun, Jul 17, 2022 at 9:04 PM Morris de Oryx wrote: > This fails on a partitioned table because xmax() may not exist. In fact, it > does exist in all of those tables, but the system doesn't know how to > guarantee that. I know which tables are partitioned, and can downgrade the > result on pa

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Martin Kalcher
Am 18.07.22 um 21:29 schrieb Tom Lane: The preferred thing to do is to add it to our "commitfest" queue, which will ensure that it gets looked at eventually. The currently open cycle is 2022-09 [1] (see the "New Patch" button there). Thanks Tom, did that. I am not sure if "SQL Commands" is the

Re: [RFC] building postgres with meson - v10

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 11:33:09 +0200, Peter Eisentraut wrote: > The following patches are ok to commit IMO: > > a1c5542929 prereq: Deal with paths containing \ and spaces in > basebackup_to_shell tests > e37951875d meson: prereq: psql: Output dir and dependency generation for > sql_help > 18cc9fbd0

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Robert Haas
On Mon, Jul 18, 2022 at 3:03 PM Martin Kalcher wrote: > Thanks for all your feedback and help. I got a patch that i consider > ready for review. It introduces two new functions: > >array_shuffle(anyarray) -> anyarray >array_sample(anyarray, integer) -> anyarray > > array_shuffle() shuffles

Re: pg15b2: large objects lost on upgrade

2022-07-18 Thread Robert Haas
On Mon, Jul 18, 2022 at 4:06 PM Andres Freund wrote: > How about adding a new binary_upgrade_* helper function for this purpose > instead, instead of tying it into truncate? I considered that briefly, but it would need to do a lot of things that TRUNCATE already knows how to do, so it does not se

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Jacob Champion
On 7/18/22 12:32, Andres Freund wrote: > I'm not following - I'm talking about the patch author needing a while to > address the higher level feedback given by a reviewer. The author might put > out a couple new versions, which each might still benefit from review. In that > - pretty common imo - s

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Tom Lane
Robert Haas writes: > On Mon, Jul 18, 2022 at 3:03 PM Martin Kalcher > wrote: >> array_shuffle(anyarray) -> anyarray >> array_sample(anyarray, integer) -> anyarray > I think it's questionable whether the behavior of array_shuffle() is > correct for a multi-dimensional array. The implemented beha

Re: doc: Clarify Routines and Extension Membership

2022-07-18 Thread Bruce Momjian
On Thu, Jul 14, 2022 at 06:27:17PM -0700, David G. Johnston wrote: > Thank you and apologies for being quiet here and on a few of the other  > threads. > I've been on vacation and flagged as ToDo some of the non-simple feedback > items > that have come this way. No need to worry --- we will incor

Re: [Commitfest 2022-07] Begins Now

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 13:34:52 -0700, Jacob Champion wrote: > On 7/18/22 12:32, Andres Freund wrote: > > I'm not following - I'm talking about the patch author needing a while to > > address the higher level feedback given by a reviewer. The author might put > > out a couple new versions, which each m

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Tom Lane
I wrote: > Martin had originally proposed (2), which I rejected on the grounds > that we don't treat multi-dimensional arrays as arrays-of-arrays for > any other purpose. Actually, after poking at it for awhile, that's an overstatement. It's true that the type system doesn't think N-D arrays are a

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Martin Kalcher
Am 18.07.22 um 23:03 schrieb Tom Lane: I wrote: Martin had originally proposed (2), which I rejected on the grounds that we don't treat multi-dimensional arrays as arrays-of-arrays for any other purpose. Actually, after poking at it for awhile, that's an overstatement. It's true that the type

Re: pg_parameter_aclcheck() and trusted extensions

2022-07-18 Thread Nathan Bossart
On Thu, Jul 14, 2022 at 03:57:35PM -0700, Nathan Bossart wrote: > However, ALTER ROLE RESET ALL will be blocked, while resetting only the > individual GUC will go through. > > postgres=> ALTER ROLE other RESET ALL; > ALTER ROLE > postgres=> SELECT * FROM pg_db_role_setting; >

Re: Use -fvisibility=hidden for shared libraries

2022-07-18 Thread Andres Freund
Hi, On 2022-07-18 00:05:16 -0700, Andres Freund wrote: > It looks like we might be missing out on benefiting from this on more > platforms - the test right now is in the gcc specific section of configure.ac, > but it looks like at least Intel's, sun's and AIX's compilers might all > support -fvisi

Re: allow specifying action when standby encounters incompatible parameter settings

2022-07-18 Thread Nathan Bossart
On Fri, Jun 24, 2022 at 11:42:29AM +0100, Simon Riggs wrote: > This patch would undo a very important change - to keep servers > available by default and go back to the old behavior for a huge fleet > of Postgres databases. The old behavior of shutdown-on-change caused > catastrophe many times for

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Tom Lane
Martin Kalcher writes: > If we go with (1) array_shuffle() and array_sample() should shuffle each > element individually and always return a one-dimensional array. >select array_shuffle('{{1,2},{3,4},{5,6}}'); >--- > {1,4,3,5,6,2} >select array_sample('{{1,2},{3,4},{5,6}

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread David G. Johnston
On Mon, Jul 18, 2022 at 3:18 PM Tom Lane wrote: > > Independently of the dimensionality question --- I'd imagined that > array_sample would select a random subset of the array elements > but keep their order intact. If you want the behavior shown > above, you can do array_shuffle(array_sample(..

Re: Commitfest Update

2022-07-18 Thread Justin Pryzby
On Mon, Jul 18, 2022 at 12:00:01PM -0700, Jacob Champion wrote: > And thank you for speaking up so quickly! It's a lot easier to undo > partial damage :D (Speaking of which: where is that CF update stream you > mentioned?) https://commitfest.postgresql.org/activity/ -- Justin

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Tom Lane
"David G. Johnston" writes: > On Mon, Jul 18, 2022 at 3:18 PM Tom Lane wrote: >> Independently of the dimensionality question --- I'd imagined that >> array_sample would select a random subset of the array elements >> but keep their order intact. If you want the behavior shown >> above, you can

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Martin Kalcher
Am 19.07.22 um 00:18 schrieb Tom Lane: Independently of the dimensionality question --- I'd imagined that array_sample would select a random subset of the array elements but keep their order intact. If you want the behavior shown above, you can do array_shuffle(array_sample(...)). But if we ra

Re: Commitfest Update

2022-07-18 Thread Jacob Champion
On 7/18/22 15:32, Justin Pryzby wrote: > On Mon, Jul 18, 2022 at 12:00:01PM -0700, Jacob Champion wrote: >> And thank you for speaking up so quickly! It's a lot easier to undo >> partial damage :D (Speaking of which: where is that CF update stream you >> mentioned?) > > https://commitfest.postgres

Re: Windows default locale vs initdb

2022-07-18 Thread Thomas Munro
On Wed, Dec 15, 2021 at 11:32 PM Juan José Santamaría Flecha wrote: > On Sun, May 16, 2021 at 6:29 AM Noah Misch wrote: >> On Mon, Apr 19, 2021 at 05:42:51PM +1200, Thomas Munro wrote: >> > The question we asked ourselves >> > multiple times in the other thread was how we're supposed to get to >>

Re: Add WAL recovery messages with log_wal_traffic GUC (was: add recovery, backup, archive, streaming etc. activity messages to server logs along with ps display)

2022-07-18 Thread Nathan Bossart
On Fri, May 13, 2022 at 09:10:52AM -0400, Robert Haas wrote: > I suggest that if log_startup_progress_interval doesn't meet your > needs here, we should try to understand why not and maybe enhance it, > instead of adding a separate facility. +1. AFAICT it should be possible to make the log_startu

Re: Allow placeholders in ALTER ROLE w/o superuser

2022-07-18 Thread Nathan Bossart
On Fri, Jul 01, 2022 at 04:40:27PM -0700, Nathan Bossart wrote: > On Sun, Jun 05, 2022 at 11:20:38PM -0500, Steve Chavez wrote: >> However, defining placeholders at the role level require superuser: >> >> alter role myrole set my.username to 'tomas'; >> ERROR: permission denied to set paramet

Re: System catalog documentation chapter

2022-07-18 Thread Bruce Momjian
On Sat, Jul 16, 2022 at 10:53:17AM +0200, Peter Eisentraut wrote: > Now that I see the result, I don't think this is really the right > improvement yet. > > The new System Views chapter lists views that are effectively quasi-system > catalogs, such as pg_shadow or pg_replication_origin_status -- t

Re: Costing elided SubqueryScans more nearly correctly

2022-07-18 Thread Richard Guo
On Tue, Jul 19, 2022 at 1:30 AM Tom Lane wrote: > Alvaro Herrera writes: > > On 2022-Jul-18, Richard Guo wrote: > >> BTW, not related to this patch, the new lines for parallel_aware check > >> in setrefs.c are very wide. How about wrap them to keep consistent with > >> arounding codes? > > > Not

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

2022-07-18 Thread Masahiko Sawada
On Mon, Jul 18, 2022 at 1:12 PM Amit Kapila wrote: > > On Fri, Jul 15, 2022 at 8:09 PM Masahiko Sawada wrote: > > > > This patch should have the fix for the issue that Shi yu reported. Shi > > yu, could you please test it again with this patch? > > > > Can you explain the cause of the failure and

Re: [PATCH] Introduce array_shuffle() and array_sample()

2022-07-18 Thread Thomas Munro
On Tue, Jul 19, 2022 at 8:15 AM Martin Kalcher wrote: > Am 18.07.22 um 21:29 schrieb Tom Lane: > > The preferred thing to do is to add it to our "commitfest" queue, > > which will ensure that it gets looked at eventually. The currently > > open cycle is 2022-09 [1] (see the "New Patch" button the

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

2022-07-18 Thread Masahiko Sawada
On Mon, Jul 18, 2022 at 12:28 PM shiy.f...@fujitsu.com wrote: > > On Fri, Jul 15, 2022 10:39 PM Masahiko Sawada wrote: > > > > This patch should have the fix for the issue that Shi yu reported. Shi > > yu, could you please test it again with this patch? > > > > Thanks for updating the patch! > I

Re: System catalog documentation chapter

2022-07-18 Thread Tom Lane
Bruce Momjian writes: > On Sat, Jul 16, 2022 at 10:53:17AM +0200, Peter Eisentraut wrote: >> Maybe this whole notion that "system views" is one thing is not suitable. > Are you thinking we should just call the chapter "System Catalogs and > Views" and just place them alphabetically in a single ch

Re: First draft of the PG 15 release notes

2022-07-18 Thread Justin Pryzby
> Increase hash_mem_multiplier default to 2.0 (Peter Geoghegan) > This allows query hash operations to use double the amount of work_mem memory > as other operations. I wonder if it's worth pointing out that a query may end up using not just 2x more memory (since work_mem*hash_mem_multiplier is p

Re: Doc about how to set max_wal_senders when setting minimal wal_level

2022-07-18 Thread Japin Li
On Tue, 19 Jul 2022 at 03:58, Bruce Momjian wrote: > On Fri, Jul 15, 2022 at 09:29:20PM +0800, Japin Li wrote: >> >> On Fri, 15 Jul 2022 at 08:49, Bruce Momjian wrote: >> > On Tue, Jul 5, 2022 at 08:02:33PM -0400, Tom Lane wrote: >> >> "Precondition" is an overly fancy word that makes things

Re: NAMEDATALEN increase because of non-latin languages

2022-07-18 Thread John Naylor
On Mon, Jul 18, 2022 at 9:58 AM Andres Freund wrote: > > 0001 is just boilerplate, same as v1 > > If we were to go for this, I wonder if we should backpatch the cast containing > version of GESTRUCT for less pain backpatching bugfixes. That'd likely require > using a different name for the cast c

Re: PATCH: Add Table Access Method option to pgbench

2022-07-18 Thread Michael Paquier
On Mon, Jul 18, 2022 at 01:53:21PM +0300, Alexander Korotkov wrote: > Looks good to me as well. I'm going to push this if no objections. FWIW, I find the extra mention of PGOPTIONS with the specific point of table AMs added within the part of the environment variables a bit confusing, because we

  1   2   >