backtrace_functions emits trace for any elog

2023-09-04 Thread Ilya Gladyshev
Hi, I used backtrace_functions to debug one of my ideas and found its behavior counter-intuitive and contradictory to it own docs. I think the GUC is supposed to be used to dump backtrace only on elog(ERROR) (should it also be done for higher levels? not sure about this), but, in fact, it does

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-16 Thread Ilya Gladyshev
> 16 марта 2023 г., в 04:07, Justin Pryzby написал(а): > > On Tue, Mar 14, 2023 at 06:58:14PM +0400, Ilya Gladyshev wrote: >>> The only change from the current patch is (3). (1) still calls >>> count_leaf_partitions(), but only once. I'd prefer that to rearranging

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-03-14 Thread Ilya Gladyshev
> 14 марта 2023 г., в 18:34, Justin Pryzby написал(а): > > On Mon, Mar 13, 2023 at 10:42:59AM -0400, Tom Lane wrote: >> Justin Pryzby writes: >>> On Sun, Mar 12, 2023 at 06:25:13PM -0400, Tom Lane wrote: I agree that adding such a field to IndexStmt would be a very bad idea.

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-02-01 Thread Ilya Gladyshev
> 1 февр. 2023 г., в 20:27, Matthias van de Meent > написал(а): > > On Wed, 1 Feb 2023 at 16:53, Justin Pryzby <mailto:pry...@telsasoft.com>> wrote: >> >> On Wed, Feb 01, 2023 at 04:21:35PM +0100, Matthias van de Meent wrote: >>> On Wed, 1 Feb

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-02-01 Thread Ilya Gladyshev
> 1 февр. 2023 г., в 16:01, Alvaro Herrera написал(а): > > Hmm, count_leaf_partitions has to scan pg_inherits and do a syscache > lookup for every single element therein ... this sounds slow. > > In one of the callsites, we already have the partition descriptor > available. We could just

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-01-31 Thread Ilya Gladyshev
> 1 февр. 2023 г., в 08:29, Justin Pryzby написал(а): > > On Tue, Jan 31, 2023 at 07:32:20PM +0400, Ilya Gladyshev wrote: >>> 17 янв. 2023 г., в 23:44, Tomas Vondra >>> написал(а): >>> Do we actually need the new parts_done field? I mea

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-01-31 Thread Ilya Gladyshev
> 17 янв. 2023 г., в 23:44, Tomas Vondra > написал(а): > Do we actually need the new parts_done field? I mean, we already do > track the value - at PROGRESS_CREATEIDX_PARTITIONS_DONE index in the > st_progress_param array. Can't we simply read it from there? Then we > would not have ABI issues

Re: Progress report of CREATE INDEX for nested partitioned tables

2023-01-09 Thread Ilya Gladyshev
tioned tables" patch, > which I think is otherwise done. I suggest that we move on with the IndexStmt patch and see what the committers have to say about it. I have brushed the patch up a bit, fixing TODOs and adding docs as per our discussion above. From 490d8afa7cb952e5b3947d81d85b

Re: Progress report of CREATE INDEX for nested partitioned tables

2022-12-13 Thread Ilya Gladyshev
On Mon, 2022-12-12 at 22:43 -0600, Justin Pryzby wrote: > On Mon, Dec 12, 2022 at 11:39:23PM +0400, Ilya Gladyshev wrote: > > > > > Could you check what I've written as a counter-proposal ? > > > > I think that this might be a good solution to start with, i

Re: Progress report of CREATE INDEX for nested partitioned tables

2022-12-12 Thread Ilya Gladyshev
> Could you check what I've written as a counter-proposal ? I think that this might be a good solution to start with, it gives us the opportunity to improve the granularity later without any surprising changes for the end user. We could use this patch for previous versions and make more

Progress report of CREATE INDEX for nested partitioned tables

2022-12-10 Thread Ilya Gladyshev
behaviour to report the total number of partitions in the inheritance tree and fixed recursion in the attached patch. I used a static variable to keep the counter to avoid ABI breakage of DefineIndex, so that we could backpatch this to previous versions. Thanks, Ilya Gladyshev From

Re: CREATE INDEX CONCURRENTLY on partitioned index

2022-12-09 Thread Ilya Gladyshev
On Sun, 2022-12-04 at 13:09 -0600, Justin Pryzby wrote: > > This beavior is fixed.  I re-factored and re-implented to use > DefineIndex() for building indexes concurrently rather than > reindexing. > That makes the patch smaller, actually, and has the added benefit of > splitting off the

Re: CREATE INDEX CONCURRENTLY on partitioned index

2022-12-03 Thread Ilya Gladyshev
hat fixing this problem requires some heavy code rewrite and I'm not quite sure how to go about it, if you have any ideas, I will be happy to try them out. Thanks, Ilya From 8eb9fd7ce7d34c5c323c47b60a7f883f360ef090 Mon Sep 17 00:00:00 2001 From: Ilya Gladyshev Date: Sat, 3 Dec 2022 18:20:03 +0400 Subje

Re: postgres_fdw binary protocol support

2022-11-24 Thread Ilya Gladyshev
> 22 нояб. 2022 г., в 17:10, Ashutosh Bapat > написал(а): > > Hi Illya, > > On Mon, Nov 21, 2022 at 8:50 PM Ilya Gladyshev > wrote: >> >> Hi everyone, >> >> I have made a patch that introduces support for libpq binary protocol >> in

postgres_fdw binary protocol support

2022-11-21 Thread Ilya Gladyshev
, whether this is a welcome feature, before proceeding with all of the abovementioned. Thanks, Ilya Gladyshev From 2cb72df03ed94d55cf51531a2d21a7d3369ae27b Mon Sep 17 00:00:00 2001 From: Ilya Gladyshev Date: Sat, 19 Nov 2022 17:47:49 +0400 Subject: [PATCH] postgres_fdw libpq binary proto support

Re: Segfault on logical replication to partitioned table with foreign children

2022-11-03 Thread Ilya Gladyshev
I think we can just use it. Attached a separate patch with the refactoring. From 004c63a8eba777be739f062cdc9b7ddcf2eac253 Mon Sep 17 00:00:00 2001 From: Ilya Gladyshev Date: Thu, 3 Nov 2022 11:39:24 +0400 Subject: [PATCH] Delay namespace and relname lookups until error --- src/backend/commands/subscri

Re: Segfault on logical replication to partitioned table with foreign children

2022-10-31 Thread Ilya Gladyshev
rds, > Shi yu I have verified that the current patch handles the attaching of new partitions to the target partitioned table by throwing an error on attempt to insert into a foreign table inside the logical replication worker. I have refactored the code to minimize cache lookups, but I am yet to w

Re: Segfault on logical replication to partitioned table with foreign children

2022-10-31 Thread Ilya Gladyshev
On Sun, 2022-10-30 at 16:52 +0100, Alvaro Herrera wrote: > On 2022-Oct-28, ilya.v.gladys...@gmail.com wrote: > > > This will cause a segfault or raise an assert, because inserting > > into > > foreign tables via logical replication is not possible. The > > solution I > > propose is to add

Re: Partial aggregates pushdown

2021-11-01 Thread Ilya Gladyshev
On 01.11.2021 13:30, Alexander Pyhalov wrote: Peter Eisentraut писал 2021-11-01 12:47: On 21.10.21 12:55, Alexander Pyhalov wrote: Now aggregates with internal states can be pushed down, if they are marked as pushdown safe (this flag is set to true for min/max/sum), have internal states and

Re: Partial aggregates pushdown

2021-11-01 Thread Ilya Gladyshev
. Thanks, Ilya Gladyshev

Re: Update of partition key on foreign server

2021-08-26 Thread Ilya Gladyshev
es the partition key. I’m probably missing a lot of details (feel free to point out), but is the general idea correct? I will be grateful for any feedback.Thanks,Ilya Gladyshev I have developed a simple patch to fix this, while I’m not fully satisfied with it, it gets the job done. From

Re: Per query FDW network stat collection

2021-08-24 Thread Ilya Gladyshev
On 24.08.2021 12:19, Julien Rouhaud wrote: However I'm not sure that having a new "network" option is the best way for that. It seems confusing as IIUC it won't be catching all network activity (like fe/be activity, or network disk...) but only FDW activity. I think it would be better to

Per query FDW network stat collection

2021-08-24 Thread Ilya Gladyshev
hat the community thinks about the patch. Regards, Ilya Gladyshev >From 3ffbe071480672189c2e03d7e54707c77ba58b0b Mon Sep 17 00:00:00 2001 From: Ilya Gladyshev Date: Mon, 23 Aug 2021 21:37:31 +0300 Subject: [PATCH] adds per query FDW network usage stats Adds means for collecting network usage