Re: Allow single table VACUUM in transaction block

2022-11-06 Thread Simon Riggs
On Sun, 6 Nov 2022 at 18:50, Peter Geoghegan wrote: > > On Thu, Oct 27, 2022 at 2:31 AM Simon Riggs > wrote: > > Fix, so that this works without issue: > > > > BEGIN; > > > > VACUUM (ANALYZE) vactst; > > > > COMMIT; > > > > Allows both ANALYZE and vacuum of toast tables, but not VACUUM

Re: Tracking last scan time

2022-11-06 Thread Michael Paquier
On Thu, Nov 03, 2022 at 04:44:16PM -0400, Dave Page wrote: > Here's a patch to fix this issue. Many thanks to Peter Eisentraut who > figured it out in a few minutes after I spent far too long looking down > rabbit holes in entirely the wrong place. FWIW, all the other areas of pgstatfuncs.c

Re: Add semi-join pushdown to postgres_fdw

2022-11-06 Thread Alexander Pyhalov
Ian Lawrence Barwick писал 2022-11-04 02:21: This entry was marked as "Needs review" in the CommitFest app but cfbot reports the patch no longer applies. We've marked it as "Waiting on Author". As CommitFest 2022-11 is currently underway, this would be an excellent time update the patch. Once

Re: New docs chapter on Transaction Management and related changes

2022-11-06 Thread Bruce Momjian
On Fri, Nov 4, 2022 at 04:17:28PM +0100, Laurenz Albe wrote: > On Sat, 2022-10-15 at 21:08 -0400, Bruce Momjian wrote: > > I therefore merged all three paragraphs into > > one and tried to make the text saner;  release_savepoint.sgml diff > > attached, URL content updated. > > I wanted to have a

Re: [PATCH] Add native windows on arm64 support

2022-11-06 Thread Michael Paquier
On Sat, Nov 05, 2022 at 11:31:36AM -0700, Andres Freund wrote: > On 2022-11-03 11:06:46 +, Niyas Sait wrote: > Note that we're planning to remove the custom windows build scripts before the > next release, relying on the meson build instead. Youpi. >> #if defined(_WIN64) >> static

Re: [patch] Have psql's \d+ indicate foreign partitions

2022-11-06 Thread Tom Lane
Michael Paquier writes: > On Sun, Nov 06, 2022 at 09:23:01PM +0900, Ian Lawrence Barwick wrote: >> Fair enough, make sense. > Fine by me and the patch looks OK. I'd like to apply this if there > are no objections. WFM. regards, tom lane

Re: [patch] Have psql's \d+ indicate foreign partitions

2022-11-06 Thread Michael Paquier
On Sun, Nov 06, 2022 at 09:23:01PM +0900, Ian Lawrence Barwick wrote: > Fair enough, make sense. Fine by me and the patch looks OK. I'd like to apply this if there are no objections. -- Michael signature.asc Description: PGP signature

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

2022-11-06 Thread Zhang Mingli
HI, Regards, Zhang Mingli On Nov 7, 2022, 14:26 +0800, Tom Lane , wrote: > Andrey Lepikhov writes: > > I'm still in review of your patch now. At most it seems ok, but are you > > really need both eq_sources and eq_derives lists now? > > Didn't we just have this conversation? eq_sources needs to

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

2022-11-06 Thread Tom Lane
Andrey Lepikhov writes: > I'm still in review of your patch now. At most it seems ok, but are you > really need both eq_sources and eq_derives lists now? Didn't we just have this conversation? eq_sources needs to be kept separate to support the "broken EC" logic. We don't want to be

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

2022-11-06 Thread Andrey Lepikhov
On 2/11/2022 15:27, Yuya Watari wrote: Hello, I noticed that the previous patch does not apply to the current HEAD. I attached the rebased version to this email. I'm still in review of your patch now. At most it seems ok, but are you really need both eq_sources and eq_derives lists now? As I

Re: archive modules

2022-11-06 Thread Michael Paquier
On Sat, Nov 05, 2022 at 02:08:58PM -0700, Nathan Bossart wrote: > Such a module could define a custom GUC that accepts a shell command. I > don't think we should overload the meaning of archive_command based on the > whims of whatever archive module is loaded. Besides the potential end-user >

Re: Allow file inclusion in pg_hba and pg_ident files

2022-11-06 Thread Michael Paquier
On Thu, Nov 03, 2022 at 08:55:05PM +0900, Michael Paquier wrote: > On Wed, Nov 02, 2022 at 09:06:02PM +0800, Julien Rouhaud wrote: >>> The addition of a check for the depth in two places seems unnecessary, >>> and it looks like we should do this kind of check in only one place. >> >> I usually

Re: Perform streaming logical transactions by background workers and parallel apply

2022-11-06 Thread Amit Kapila
On Mon, Nov 7, 2022 at 10:02 AM Masahiko Sawada wrote: > > On Mon, Nov 7, 2022 at 12:58 PM Amit Kapila wrote: > > > > > > I agree that it could be better to have a new lock tag. Another point > > > > is that > > > > the remote xid and Local xid could be the same in some rare cases, so I > > >

Re: Free list same_input_transnos in preprocess_aggref

2022-11-06 Thread Zhang Mingli
HI, On Nov 7, 2022, 04:12 +0800, Tom Lane , wrote: > > The NIL lists are of course occupying no storage. The two one-element > lists are absolutely, completely negligible in the context of planning > any nontrivial statement. Even the aggtransinfos list that is the > primary output of

Re: Perform streaming logical transactions by background workers and parallel apply

2022-11-06 Thread Masahiko Sawada
On Mon, Nov 7, 2022 at 12:58 PM Amit Kapila wrote: > > On Mon, Nov 7, 2022 at 8:26 AM Masahiko Sawada wrote: > > > > On Sun, Nov 6, 2022 at 3:40 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Saturday, November 5, 2022 1:43 PM Amit Kapila > > > > > > > > > > > On Fri, Nov 4, 2022 at 7:35

Re: explain analyze rows=%.0f

2022-11-06 Thread Andrey Lepikhov
On 22/7/2022 16:47, Amit Kapila wrote: I feel the discussion has slightly deviated which makes it unclear whether this patch is required or not? After quick review I want to express my thoughts. At first, We have been waiting for this feature for years. Often clients give an explain to us

Re: Perform streaming logical transactions by background workers and parallel apply

2022-11-06 Thread Amit Kapila
On Mon, Nov 7, 2022 at 8:26 AM Masahiko Sawada wrote: > > On Sun, Nov 6, 2022 at 3:40 PM houzj.f...@fujitsu.com > wrote: > > > > On Saturday, November 5, 2022 1:43 PM Amit Kapila > > > > > > On Fri, Nov 4, 2022 at 7:35 PM houzj.f...@fujitsu.com > > > wrote: > > > > > > > > On Friday, November

Re: Perform streaming logical transactions by background workers and parallel apply

2022-11-06 Thread Masahiko Sawada
On Sun, Nov 6, 2022 at 3:40 PM houzj.f...@fujitsu.com wrote: > > On Saturday, November 5, 2022 1:43 PM Amit Kapila > > > > On Fri, Nov 4, 2022 at 7:35 PM houzj.f...@fujitsu.com > > wrote: > > > > > > On Friday, November 4, 2022 4:07 PM Amit Kapila > > wrote: > > > > > > > > On Thu, Nov 3, 2022

Re: Do we need to pass down nonnullable_vars when reducing outer joins?

2022-11-06 Thread Richard Guo
On Sun, Nov 6, 2022 at 4:00 AM Tom Lane wrote: > Richard Guo writes: > > AFAICS, the Vars forced nonnullable by given clause are only used to > > check if we can reduce JOIN_LEFT to JOIN_ANTI, and it is checking the > > join's own quals there. It seems to me we do not need to pass down > >

Re: Check SubPlan clause for nonnullable rels/Vars

2022-11-06 Thread Richard Guo
On Sun, Nov 6, 2022 at 3:33 AM Tom Lane wrote: > Richard Guo writes: > > [ v2-0001-Check-SubPlan-clause-for-nonnullable-rels-Vars.patch ] > > Pushed with cosmetic changes: > > * I don't believe in "add at the end" as a principle for placement > of new code. There's usually some other logic

Re: O(n) tasks cause lengthy startups and checkpoints

2022-11-06 Thread Nathan Bossart
On Fri, Sep 23, 2022 at 10:41:54AM -0700, Nathan Bossart wrote: > v11 adds support for building with meson. rebased -- Nathan Bossart Amazon Web Services: https://aws.amazon.com >From 367c5f3863457cfbd0fe8add0e8df3e630aaaea9 Mon Sep 17 00:00:00 2001 From: Nathan Bossart Date: Wed, 5 Jan 2022

Re: Allow single table VACUUM in transaction block

2022-11-06 Thread Peter Geoghegan
On Sun, Nov 6, 2022 at 11:14 AM Tom Lane wrote: > In general, I do not believe in encouraging users to run VACUUM > manually in the first place. We would be far better served by > spending our effort to improve autovacuum's shortcomings. I couldn't agree more. A lot of problems seem related to

Re: Free list same_input_transnos in preprocess_aggref

2022-11-06 Thread Tom Lane
Zhang Mingli writes: > Correction: SaveBytes = Sum results of accumulate_list_size: 24(4+4+8+8), What I did was to stick in elog(LOG, "leaking list of length %d", list_length(same_input_transnos)); at the end of preprocess_aggref. What I see on your five-aggregate example is

Re: Allow single table VACUUM in transaction block

2022-11-06 Thread Tom Lane
Peter Geoghegan writes: > My guess is that there are more things like that. Possibly even things > that were never directly considered. VACUUM evolved in a world where > we absolutely took not running in a transaction for granted. Changing > that now is a pretty big deal. Maybe it would all be

Re: Allow single table VACUUM in transaction block

2022-11-06 Thread Peter Geoghegan
On Thu, Oct 27, 2022 at 2:31 AM Simon Riggs wrote: > Fix, so that this works without issue: > > BEGIN; > > VACUUM (ANALYZE) vactst; > > COMMIT; > > Allows both ANALYZE and vacuum of toast tables, but not VACUUM FULL. > > When in a xact block, we do not set PROC_IN_VACUUM, > nor update

Re: [DOCS] Stats views and functions not in order?

2022-11-06 Thread Tom Lane
Peter Smith writes: > Sorry, I forgot the attachments in the previous post. PSA. I spent a bit of time looking at this. I agree that a lot of the current ordering choices here look like they were made with the advice of a dartboard, and there's a number of things that are pretty blatantly just

Re: remap the .text segment into huge pages at run time

2022-11-06 Thread Andres Freund
Hi, On 2022-11-06 13:56:10 +0700, John Naylor wrote: > On Sat, Nov 5, 2022 at 3:27 PM Andres Freund wrote: > > I don't think the dummy functions are a good approach, there were plenty > > things after it when I played with them. > > To be technical, the point wasn't to have no code after it, but

Re: BUG #17434: CREATE/DROP DATABASE can be executed in the same transaction with other commands

2022-11-06 Thread Tom Lane
Yugo NAGATA writes: >> The attached patch tries to add comments explaining it on the functions. > I forward it to the hackers list because the patch is to fix comments. What do you think of the attached wording? I don't think the pipeline angle is of concern to anyone who might be reading

Re: ssl tests aren't concurrency safe due to get_free_port()

2022-11-06 Thread Andrew Dunstan
On 2022-11-05 Sa 14:36, Andres Freund wrote: >> >> use Carp; >> use Config; >> -use Fcntl qw(:mode); >> +use Fcntl qw(:mode :flock :seek O_CREAT O_RDWR); > Does this do anything useful on windows? All we're doing here on Windows and elsewhere is getting access to some constants used in

Re: bug: pg_dump use strange tag for trigger

2022-11-06 Thread Pavel Stehule
ne 6. 11. 2022 v 15:52 odesílatel Tom Lane napsal: > Pavel Stehule writes: > > When I played with regression tests for pg_restore, I tested -T filtering > > triggers too. I had problems with restoring triggers. I found that the > name > > for trigger uses the pattern "tablename triggername"

Re: Draft back-branch release notes are up

2022-11-06 Thread Tom Lane
Justin Pryzby writes: > + Fix planner failure with extended statistics on partitioned tables > + (Richard Guo, Justin Pryzby) > This can also happen with inheritance tables. > + Add missing guards for NULL connection pointer > Maybe should be NULL or NULL ? Done, thanks.

Re: Pluggable toaster

2022-11-06 Thread Nikita Malakhov
Hi, Pluggable TOAST is provided as an interface to allow developers to plug in custom TOAST mechanics. It does not determines would it be universal Toaster or one data type, but syntax for universal Toaster is out of scope for this patchset. >True, but besides Jsonb Toaster one can implement a

Re: Add LZ4 compression in pg_dump

2022-11-06 Thread gkokolatos
On Wed, Nov 2, 2022 at 14:28, Justin Pryzby wrote: > Checking if you'll be able to submit new patches soon ? Thank you for checking up. Expect new versions within this commitfest cycle.

Re: bug: pg_dump use strange tag for trigger

2022-11-06 Thread Tom Lane
Pavel Stehule writes: > When I played with regression tests for pg_restore, I tested -T filtering > triggers too. I had problems with restoring triggers. I found that the name > for trigger uses the pattern "tablename triggername" (not just (and > correct) triggername). > I propose to generate

Re: Small TAP improvements

2022-11-06 Thread Álvaro Herrera
On 2022-Jun-14, Andrew Dunstan wrote: > OK, here's a more principled couple of patches. For config_data, if you > give multiple options it gives you back the list of values. If you don't > specify any, in scalar context it just gives you back all of pg_config's > output, but in array context it

Re: Improve logging when using Huge Pages

2022-11-06 Thread Justin Pryzby
On Sun, Nov 06, 2022 at 02:04:29PM +0700, John Naylor wrote: > On Thu, Nov 3, 2022 at 8:11 AM Thomas Munro wrote: > > > > I wonder if the problem here is that people are reluctant to add noise > > to every starting system. There are people who have not configured > > their system and don't want

Re: [patch] Have psql's \d+ indicate foreign partitions

2022-11-06 Thread Ian Lawrence Barwick
2022年11月6日(日) 1:39 Tom Lane : > > Michael Paquier writes: > > On Mon, Oct 24, 2022 at 09:44:18PM +0900, Ian Lawrence Barwick wrote: > >> Recently I have been working a lot with partitioned tables which contain a > >> mix > >> of local and foreign partitions, and find it would be very useful to

pg_upgrade, tables_with_oids.txt -> tables_with_oids.sql?

2022-11-06 Thread Daniel Westermann (DWE)
Hi, as I've just upgraded an instance which contained tables "WITH OIDS" I wonder if it would make sense if pg_upgrade directly creates a script to fix those. I know it is easy to that with e.g. sed over tables_with_oids.txt but it would be more convenient to have the script generated

Re: Improve logging when using Huge Pages

2022-11-06 Thread John Naylor
On Thu, Nov 3, 2022 at 8:11 AM Thomas Munro wrote: > > I wonder if the problem here is that people are reluctant to add noise > to every starting system. There are people who have not configured > their system and don't want to see that noise, and then some people > have configured their system

Re: remap the .text segment into huge pages at run time

2022-11-06 Thread John Naylor
On Sat, Nov 5, 2022 at 3:27 PM Andres Freund wrote: > > simplified it. Interestingly enough, looking through the commit history, > > they used to align the segments via linker flags, but took it out here: > > > > https://github.com/intel/iodlr/pull/25#discussion_r397787559 > > > > ...saying "I'm

RE: Perform streaming logical transactions by background workers and parallel apply

2022-11-06 Thread houzj.f...@fujitsu.com
On Saturday, November 5, 2022 1:43 PM Amit Kapila > > On Fri, Nov 4, 2022 at 7:35 PM houzj.f...@fujitsu.com > wrote: > > > > On Friday, November 4, 2022 4:07 PM Amit Kapila > wrote: > > > > > > On Thu, Nov 3, 2022 at 6:36 PM houzj.f...@fujitsu.com > > > wrote: > > > > > > > > Thanks for the