Re: Combine pg_walinspect till_end_of_wal functions with others

2023-03-12 Thread Michael Paquier
On Fri, Mar 10, 2023 at 04:45:06PM +0530, Bharath Rupireddy wrote: > Any comments on the attached v5 patch? I have reviewed the patch, and found it pretty messy. The tests should have been divided into their own patch, I think. This is rather straight-forward once the six functions have their ch

Re: CI and test improvements

2023-03-12 Thread Peter Eisentraut
On 03.02.23 15:26, Justin Pryzby wrote: rebased, and re-including a patch to show code coverage of changed files. This constant flow of patches under one subject doesn't lend itself well to the commit fest model of trying to finish things up. I can't quite tell which of these patches are rea

Re: meson: Non-feature feature options

2023-03-12 Thread Peter Eisentraut
On 09.03.23 14:54, Daniel Gustafsson wrote: On 9 Mar 2023, at 14:45, Peter Eisentraut wrote: How about we just hardcode "openssl" here instead? We could build that array dynamically, of course, but maybe we leave that until we actually have a need? At least for 16 keeping it hardcoded is

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

2023-03-12 Thread Önder Kalacı
Hi Shi Yu, > > > > > > > > > Reading [1], I think I can follow what you suggest. So, basically, > > > if the leftmost column is not filtered, we have the following: > > > > > >> but the entire index would have to be scanned, so in most cases the > planner > > would prefer a sequential table scan

Re: [Proposal] Add foreign-server health checks infrastructure

2023-03-12 Thread Katsuragi Yuta
On 2023-03-10 18:07, Katsuragi Yuta wrote: On 2023-03-08 13:40, Hayato Kuroda (Fujitsu) wrote: Dear Vignesh, Thank you for reviewing! PSA new version. Hi, Thank you for the comments, Vignesh. Thank you for updating the patch, Kuroda-san. This fix looks fine to me. And also, there seems no

Microsecond-based timeouts

2023-03-12 Thread Thomas Munro
Hi, Over in [1], I thought for a moment that a new function WaitLatchUs(..., timeout_us, ...) was going to be useful to fix that bug report, at least in master, until I realised the required Linux syscall is a little too new (for example RHEL 9 shipped May '22, Debian 12 is expected to be declared

Re: Compilation error after redesign of the archive modules

2023-03-12 Thread Michael Paquier
On Fri, Mar 10, 2023 at 05:16:53PM +0900, Michael Paquier wrote: > On Fri, Mar 10, 2023 at 01:41:07PM +0530, Sravan Kumar wrote: >> I have attached a patch that fixes the problem. Can you please review >> if it makes sense to push this patch? > > Indeed, reproduced here. I'll fix that in a bit..

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Andrey Borodin
Michael, thanks for reviewing this! On Sun, Mar 12, 2023 at 6:17 PM Michael Paquier wrote: > > On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote: > > In the review above Kyotaro-san suggested that message should contain > > information on what it expects... So, maybe then > > pg_log

Re: Sub-millisecond [autovacuum_]vacuum_cost_delay broken

2023-03-12 Thread Thomas Munro
On Sat, Mar 11, 2023 at 11:49 AM Tom Lane wrote: > Thomas Munro writes: > > I think this is the minimal back-patchable change. I propose to go > > ahead and do that, and then to kick the ideas about latch API changes > > into a new thread for the next commitfest. > > OK by me, but then again 475

RE: Rework LogicalOutputPluginWriterUpdateProgress

2023-03-12 Thread wangw.f...@fujitsu.com
On Fri, Mar 10, 2023 20:17 PM Osumi, Takamichi/大墨 昂道 wrote: > Hi, > > > On Friday, March 10, 2023 6:32 PM Wang, Wei/王 威 > wrote: > > Attach the new patch set. > Thanks for updating the patch ! One review comment on v7-0005. Thanks for your comment. > stream_start_cb_wrapper and stream_stop_c

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

2023-03-12 Thread shiy.f...@fujitsu.com
On Fri, Mar 10, 2023 8:17 PM Amit Kapila wrote: > > On Fri, Mar 10, 2023 at 5:16 PM Önder Kalacı wrote: > > > >> > >> wip_for_optimize_index_column_match > >> +static bool > >> +IndexContainsAnyRemoteColumn(IndexInfo *indexInfo, > >> + LogicalRepRelation *remoterel) > >> +{ > >> + for (int i =

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

2023-03-12 Thread Masahiko Sawada
On Sun, Mar 12, 2023 at 12:54 AM John Naylor wrote: > > On Fri, Mar 10, 2023 at 9:30 PM Masahiko Sawada wrote: > > > > On Fri, Mar 10, 2023 at 3:42 PM John Naylor > > wrote: > > > > I'd suggest sharing your todo list in the meanwhile, it'd be good to > > > discuss what's worth doing and what is

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Michael Paquier
On Mon, Mar 13, 2023 at 10:17:12AM +0900, Michael Paquier wrote: > I am not sure that this will be the last option we'll ever add to > \watch, so I'd rather have us choose a design more flexible than > what's proposed here, in a way similar to \g or \gx. While on it, I have some comments about 000

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Michael Paquier
On Sun, Mar 12, 2023 at 01:05:39PM -0700, Andrey Borodin wrote: > In the review above Kyotaro-san suggested that message should contain > information on what it expects... So, maybe then > pg_log_error("\\watch interval must be non-negative number, but > argument is '%s'", opt); ? > Or perhaps with

Re: Requiring recovery.signal or standby.signal when recovering with a backup_label

2023-03-12 Thread Michael Paquier
On Fri, Mar 10, 2023 at 03:59:04PM +0900, Michael Paquier wrote: > My apologies for the long message, but this deserves some attention, > IMHO. Note: A CF entry has been added as of [1], and I have added an item in the list of live issues on the open item page for 16. [1]: https://commitfest.post

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-12 Thread Tom Lane
I wrote: > Justin Pryzby writes: >> count_leaf_partitions() is also called for sub-partitions, in the case >> that a matching "partitioned index" already exists, and the progress >> report needs to be incremented by the number of leaves for which indexes >> were ATTACHED. > Can't you increment pr

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-12 Thread Tom Lane
Justin Pryzby writes: > On Sun, Mar 12, 2023 at 04:14:06PM -0400, Tom Lane wrote: >> Hm. Could we get rid of count_leaf_partitions by doing the work in >> ProcessUtilitySlow? Or at least passing that OID list forward instead >> of recomputing it? > count_leaf_partitions() is called in two place

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-12 Thread Justin Pryzby
On Sun, Mar 12, 2023 at 04:14:06PM -0400, Tom Lane wrote: > Justin Pryzby writes: > > On Fri, Mar 10, 2023 at 03:36:10PM -0500, Tom Lane wrote: > >> I took a look through this. It seems like basically a good solution, > >> but the count_leaf_partitions() function is bothering me, for two > >> rea

Re: WIP Patch: pg_dump structured

2023-03-12 Thread Attila Soki
> On 12 Mar 2023, at 21:50, Tom Lane wrote: > > Attila Soki writes: >> This patch adds the structured output format to pg_dump. >> This format is a plaintext output split up into multiple files and the >> resulting small files are stored in a directory path based on the dumped >> object. >

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

2023-03-12 Thread Peter Smith
On Sat, Mar 11, 2023 at 6:05 PM Amit Kapila wrote: > > On Fri, Mar 10, 2023 at 7:58 PM Önder Kalacı wrote: > > > > > > I think one option could be to drop some cases altogether, but not sure > > we'd want that. > > > > As a semi-related question: Are you aware of any setting that'd make > > pg_

Re: WIP Patch: pg_dump structured

2023-03-12 Thread Tom Lane
Attila Soki writes: > This patch adds the structured output format to pg_dump. > This format is a plaintext output split up into multiple files and the > resulting small files are stored in a directory path based on the dumped > object. Won't this fail completely with SQL objects whose names are

WIP Patch: pg_dump structured

2023-03-12 Thread Attila Soki
Hi all, I was looking for a way to track actual schema changes after database migrations in a VCS. Preferably, the schema definition should come from a trusted source like pg_dump and should consist of small files. This patch was born out of that need. This patch adds the structured output format

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-12 Thread Tom Lane
Justin Pryzby writes: > On Fri, Mar 10, 2023 at 03:36:10PM -0500, Tom Lane wrote: >> I took a look through this. It seems like basically a good solution, >> but the count_leaf_partitions() function is bothering me, for two >> reasons: > ... find_all_inheritors() will also have been called by > P

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-12 Thread Justin Pryzby
On Fri, Mar 10, 2023 at 03:36:10PM -0500, Tom Lane wrote: > Justin Pryzby writes: > > Update to address a compiler warning in the supplementary patches adding > > assertions. > > I took a look through this. It seems like basically a good solution, > but the count_leaf_partitions() function is bo

Re: psql \watch 2nd argument: iteration count

2023-03-12 Thread Andrey Borodin
On Thu, Mar 9, 2023 at 11:25 AM Nathan Bossart wrote: > > + pg_log_error("Watch period must be > non-negative number, but argument is '%s'", opt); > > After looking around at the other error messages in this file, I think we > should make this more concise. Maybe so

Re: pg_dump versus hash partitioning

2023-03-12 Thread Tom Lane
Justin Pryzby writes: > On Sun, Mar 12, 2023 at 03:46:52PM -0400, Tom Lane wrote: >> What I propose we do about that is further tweak things so that >> load-via-partition-root forces dumping via COPY. AFAIK the only >> compelling use-case for dump-as-INSERTs is in transferring data >> to a non-Po

Re: pg_dump versus hash partitioning

2023-03-12 Thread Justin Pryzby
On Sun, Mar 12, 2023 at 03:46:52PM -0400, Tom Lane wrote: > What I propose we do about that is further tweak things so that > load-via-partition-root forces dumping via COPY. AFAIK the only > compelling use-case for dump-as-INSERTs is in transferring data > to a non-Postgres database, which is a c

Re: pg_dump versus hash partitioning

2023-03-12 Thread Tom Lane
Julien Rouhaud writes: > The BEGIN + TRUNCATE is only there to avoid generating WAL records just in > case > the wal_level is minimal. I don't remember if that optimization still exists, > but if yes we could avoid doing that if the server's wal_level is replica or > higher? That's not perfect

Re: Add LZ4 compression in pg_dump

2023-03-12 Thread Tomas Vondra
On 3/12/23 11:07, Peter Eisentraut wrote: > On 11.03.23 07:00, Alexander Lakhin wrote: >> Hello, >> 23.02.2023 23:24, Tomas Vondra wrote: >>> On 2/23/23 16:26, Tomas Vondra wrote: Thanks for v30 with the updated commit messages. I've pushed 0001 after fixing a comment typo and removing

Re: [Proposal] Allow pg_dump to include all child tables with the root table

2023-03-12 Thread Stéphane Tachoires
Hi Gilles, On Ubuntu 22.04.2 all deb's updated, I have an error on a test I'll try to find where and why, but I think you should know first. 1/1 postgresql:pg_dump / pg_dump/002_pg_dumpERROR24.40s exit status 1

Re: Improve WALRead() to suck data directly from WAL buffers when possible

2023-03-12 Thread Bharath Rupireddy
On Sun, Mar 12, 2023 at 12:52 AM Nitin Jadhav wrote: > > I went through the v8 patch. Thanks for looking at it. Please post the responses in-line, not above the entire previous message for better readability. > Following are my thoughts to improve the > WAL buffer hit ratio. Note that the motiv

Re: Implement IF NOT EXISTS for CREATE PUBLICATION AND CREATE SUBSCRIPTION

2023-03-12 Thread Tom Lane
vignesh C writes: > Currently we don't support "IF NOT EXISTS" for Create publication and > Create subscription, I felt it would be useful to add this "IF NOT > EXISTS" which will create publication/subscription only if the object > does not exist. > Attached patch for handling the same. > Thought

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

2023-03-12 Thread Alexander Korotkov
On Fri, Mar 10, 2023 at 8:17 PM Chris Travers wrote: > "Right, the improvement this patch gives to the heap is not the full > motivation. Another motivation is the improvement it gives to TableAM API. > Our current API implies that the effort on locating the tuple by tid is > small. This is mor

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

2023-03-12 Thread Önder Kalacı
Hi Amit, all > >> I think we can add such a test (which relies on existing buggy > >> behavior) later after fixing the existing bug. For now, it would be > >> better to remove that test and add it after we fix dropped columns > >> issue in HEAD. > > > > > > Alright, when I push the next version (

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

2023-03-12 Thread Önder Kalacı
Hi Amit, all > > 1. > +# Testcase start: SUBSCRIPTION USES INDEX WITH PUB/SUB DIFFERENT DATA VIA > +# A UNIQUE INDEX THAT IS NOT PRIMARY KEY OR REPLICA IDENTITY > > No need to use Delete test separate for this. > Yeah, there is really no difference between update/delete for this patch, so it make

Implement IF NOT EXISTS for CREATE PUBLICATION AND CREATE SUBSCRIPTION

2023-03-12 Thread vignesh C
Hi, Currently we don't support "IF NOT EXISTS" for Create publication and Create subscription, I felt it would be useful to add this "IF NOT EXISTS" which will create publication/subscription only if the object does not exist. Attached patch for handling the same. Thoughts? Regards, Vignesh From

Re: Account löschen

2023-03-12 Thread Alvaro Herrera
On 2023-Mar-12, Koray Ili wrote: >Sehr geehrte Damen und Herren, > >ich bitte um Löschung meines Accountes mit dem Benutzername >[...] This has been taken care of. -- Álvaro Herrera

Re: unsafe_tests module

2023-03-12 Thread Andrew Dunstan
On 2023-03-11 Sa 19:12, Andres Freund wrote: Hi, On 2023-02-22 06:47:34 -0500, Andrew Dunstan wrote: Given its nature and purpose as a module we don't want to run against an installed instance, shouldn't src/test/modules/unsafe_tests have NO_INSTALLCHECK=1 in its Makefile and runningcheck:fals

Account löschen

2023-03-12 Thread Koray Ili
Sehr geehrte Damen und Herren,   ich bitte um Löschung meines Accountes mit dem Benutzername korayili2...@gmx.de. Ich bitte um Bestätigung. Vielen Dank.    Mit freundlichen Grüßen, Koray Ili Email: korayili2...@gmx.de Tel.: +49 (0) 179 3474321 Adresse: Hansaring 21, 46483 Wesel, Deutschland

Re: Add LZ4 compression in pg_dump

2023-03-12 Thread Peter Eisentraut
On 11.03.23 07:00, Alexander Lakhin wrote: Hello, 23.02.2023 23:24, Tomas Vondra wrote: On 2/23/23 16:26, Tomas Vondra wrote: Thanks for v30 with the updated commit messages. I've pushed 0001 after fixing a comment typo and removing (I think) an unnecessary change in an error message. I'll giv

Re: [Proposal] Allow pg_dump to include all child tables with the root table

2023-03-12 Thread Gilles Darold
Le 11/03/2023 à 19:51, Gilles Darold a écrit : Le 04/03/2023 à 20:18, Tom Lane a écrit : As noted, "childs" is bad English and "partitions" is flat out wrong (unless you change it to recurse only to partitions, which doesn't seem like a better definition).  We could go with --[exclude-]table-and

Re: [PoC] Implementation of distinct in Window Aggregates

2023-03-12 Thread Ankit Kumar Pandey
Attaching updated patch with a fix for an issue in window function. I have also fixed naming convention of patch as last patch had incompatible name. Note: 1. Pending: Investigation of test cases failures. Regards, Ankit diff --git a/contrib/amcheck/verify_heapam.c b/contrib/amcheck/verify