Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-07 Thread Rushabh Lathia
/www.EnterpriseDB.com/ > "In Europe they call me Niklaus Wirth; in the US they call me Nickel's > worth. > That's because in Europe they call me by name, and in the US by value!" > -- Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-04 Thread Rushabh Lathia
ng needs to change... > > Yeah, we discussed this elsewhere. I have an alpha-quality patch for > that, but I wasn't too sure about it ... > > [1] > https://postgr.es/m/cacjufxeqchnhn6m18jy1mqcgqq9gn9ofmeop47sdfde5b8w...@mail.gmail.com > > -- > Álvaro Herrera

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-04 Thread Rushabh Lathia
measurably slower because it'd have to > do syscache access for every single not-null constraint to figure out if > it's valid or not. > > -- > Álvaro HerreraBreisgau, Deutschland — > https://www.EnterpriseDB.com/ > "Hay quien adquiere la mala costumbre de ser infeliz" (M. A. Evans) > -- Rushabh Lathia 0001-Fix-MergeWithExistingConstraint.patch Description: Binary data 0002-Support-NOT-VALID-and-VALIDATE-CONSTRAINT-for-named-.patch Description: Binary data

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-03 Thread Rushabh Lathia
tting used.' > attnotnullvalid is getting used to populate the CompatAttribute (populate_compact_attribute_internal). The primary reason for adding a new field to pg_attribute is to avoid the need for an additional scan of pg_constraint when populating CompatAttribute, as this extra scan introduces performance overhead while retrieving catalog information for a relation. -- Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-02 Thread Rushabh Lathia
of assigning to tbinfo->checkexprs both the > block for check constraints and the one for not-null constraints is > bogus. I didn't find what this breaks, but it looks wrong. We probably > need another struct _constraintInfo pointer in TableInfo.) >

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-04-02 Thread Rushabh Lathia
conislocal from pg_constraint where conname = 'dummy_constr'; ---------- Are we expecting *conislocal* status to be different when it's NOT NULL NOT VALID? Thanks & Regards Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Rushabh Lathia
On Wed, Mar 12, 2025 at 11:50 PM Alvaro Herrera wrote: > On 2025-Mar-12, Rushabh Lathia wrote: > > > Hi Alvaro, > > > > Here are the latest patches, which includes the regression fix. > > Thank you. > > Taking a step back after discussing this with some colle

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-15 Thread Rushabh Lathia
On Thu, Feb 27, 2025 at 3:25 PM Rushabh Lathia wrote: > Thank Alvaro for the fixup patch. > > > > > On Fri, Feb 21, 2025 at 11:43 AM Alvaro Herrera > wrote: > >> Hello, >> >> Thanks! >> >> I noticed a typo 'constrint' in sev

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Rushabh Lathia
t fine for me. > I'll re-run. > > -- > Álvaro HerreraBreisgau, Deutschland — > https://www.EnterpriseDB.com/ > "La conclusión que podemos sacar de esos estudios es que > no podemos sacar ninguna conclusión de ellos" (Tanenbaum) > I can reproduce the issue and will be sending the patch soon. Thanks Alvaro, Ashutosh. Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-12 Thread Rushabh Lathia
the testcase I am adding there. Rest of > the testcases run without PG_TEST_EXTRA. > > -- > Best Wishes, > Ashutosh Bapat > -- Rushabh Lathia 0001-Convert-pg_attribut.attnotnull-to-char-type.patch Description: Binary data 0002-Support-NOT-VALID-and-VALIDATE-CONSTRAINT-for-named-.patch Description: Binary data 0003-Documentation-changes.patch Description: Binary data

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-03-11 Thread Rushabh Lathia
On Mon, Mar 10, 2025 at 5:20 PM Alvaro Herrera wrote: > On 2025-Mar-10, Rushabh Lathia wrote: > > > I adjusted the set_attnotnull() API and removed the added > > queue_validation parameter. Rather, the function start using wqueue > > input parameter as a check. > &g

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-27 Thread Rushabh Lathia
urrently only allowed for foreign key > and CHECK constraints. > which is missing to indicate that NOT VALID is valid for NOT NULL. > > Also I think the docs for attnotnull in catalogs.sgml are a bit too > terse; I would write "The value 't' indicates that a not-nul

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-21 Thread Rushabh Lathia
TF-8' > # Failed test 'old and new dumps match after pg_upgrade' > # at /pg/src/test/perl/PostgreSQL/Test/Utils.pm line 797. > # got: '1' > # expected: '0' > # Looks like you failed 4 tests of 18. > > (test program exited with status code 4) > > -- > > -- > Best Wishes, > Ashutosh Bapat > -- Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-12 Thread Rushabh Lathia
On Mon, Feb 10, 2025 at 10:48 PM Rushabh Lathia wrote: > Hi Alvaro, > > I have incorporated the suggested changes, and here is the latest version > of the patch: > >- Added more test cases to the regression suite. >- Included tests in the pg_dump test. >- Le

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-10 Thread Rushabh Lathia
. Please share your review comments. Thanks, On Mon, Feb 10, 2025 at 12:28 AM Rushabh Lathia wrote: > > > On Fri, Feb 7, 2025 at 4:44 PM Alvaro Herrera > wrote: > >> >> Recursion to child tables is incorrectly trying to locate the constraint >> by name: >&

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-09 Thread Rushabh Lathia
om the child table I am working on the patch and will post the update patch soon. > > -- > Álvaro Herrera 48°01'N 7°57'E — > https://www.EnterpriseDB.com/ > Syntax error: function hell() needs an argument. > Please choose what hell you want to involve. > -- Rushabh Lathia

Re: Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-09 Thread Rushabh Lathia
Thanks Alvaro. On Thu, Feb 6, 2025 at 9:58 PM Alvaro Herrera wrote: > Hello Rushabh, > > On 2025-Feb-06, Rushabh Lathia wrote: > > > Commit 14e87ffa5c543b5f30ead7413084c25f7735039f > > < > https://github.com/postgres/postgres/commit/14e87ffa5c543b5f30ead7413084

Support NOT VALID / VALIDATE constraint options for named NOT NULL constraints

2025-02-06 Thread Rushabh Lathia
g_dump, where we now dumping the INVALID NOT NULL as separate from table schemes, just like CHECK Constraints. 4) Added related testcases. Attaching the patch here. Thanks Alvaro for your offline help and support for this feature. Thanks Rushabh Lathia www.EnterpriseDB.com 0003-Support-pg_dump-to-du

Parallel query behaving different with custom GUCs

2023-10-26 Thread Rushabh Lathia
guc.c - guc_nondef_list, guc_stack_list, guc_report_list and to fix the above issue either we need a 4th list or do changes in the existing list. Thought/Comments? Regards, Rushabh Lathia www.EnterpriseDB.com

Re: DROP OWNED BY is broken on master branch.

2022-09-28 Thread Rushabh Lathia
On Tue, Sep 27, 2022 at 7:34 PM Robert Haas wrote: > On Tue, Sep 27, 2022 at 2:53 AM Rushabh Lathia > wrote: > > Yes, I was also thinking to avoid the duplicate logic but couldn't found > > a way. I did the quick testing with the patch, and reported test is > work

Re: DROP OWNED BY is broken on master branch.

2022-09-26 Thread Rushabh Lathia
On Mon, Sep 26, 2022 at 11:46 PM Robert Haas wrote: > On Mon, Sep 26, 2022 at 3:44 AM Rushabh Lathia > wrote: > > Commit 6566133c5f52771198aca07ed18f84519fac1be7 ensure that > > pg_auth_members.grantor is always valid. This commit did changes > > into shdepDropOwned() f

DROP OWNED BY is broken on master branch.

2022-09-26 Thread Rushabh Lathia
OWNER: - /* If a local object, save it for deletion below */ - if (sdepForm->dbid == MyDatabaseId) + /* Save it for deletion below */ Case ending up with above error because of the above removed condition. Please find the attached patch wh

Re: PostgreSQL shutdown modes

2022-04-01 Thread Rushabh Lathia
e idea. Just in time, before the feature freeze deadline. > -- > Michael > -- Rushabh Lathia

Re: tweak to a few index tests to hits ambuildempty() routine.

2022-01-17 Thread Rushabh Lathia
therwise not reachable by the current tests. > +1 for the idea as it does the better code coverage. > > -- > Regards, > Amul Sul > EDB: http://www.enterprisedb.com > -- Rushabh Lathia

Re: Per-table storage parameters for TableAM/IndexAM extensions

2022-01-03 Thread Rushabh Lathia
autovac(relid, table_toast_map, pg_class_desc, > - effective_multixact_freeze_max_age); > + classRel->rd_tableam->taboptions, effective_multixact_freeze_max_age); > if (tab == NULL) > Split the another added parameter to function in the next line. 5) Overall patch has many indentation issues, I would suggest running the pgindent to fix those. Regards Rushabh Lathia www.EnterpriseDB.com

Should rename "startup process" to something else?

2021-11-15 Thread Rushabh Lathia
d thoughts. Regards, Rushabh Lathia www.EnterpriseDB.com

Re: Returning to Postgres community work

2021-10-11 Thread Rushabh Lathia
rjeet > with the explicit goal of working on PostgreSQL community > contributions. We're excited to welcome Gurjeet to the team at > Supabase. > > [1]: https://supabase.io/ > [2]: https://gurjeet.singh.im/GurjeetResume.pdf > > PS: Hacker News announcement is at https://news.ycombinator.com/item?id= > > Best regards, > -- > Gurjeet Singh http://gurjeet.singh.im/ > > > -- Rushabh Lathia

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-04 Thread Rushabh Lathia
to have gotten away from me. One quick thought is that it looks > a bit strange to be getting EndOfLog from GetLastSegSwitchData() which > returns lastSegSwitchLSN while getting EndOfLogTLI from replayEndTLI > ... because there's also replayEndRecPtr, which seems to go with > replayEndTLI. It feels like we should use a source for the TLI that > clearly matches the source for the corresponding LSN, unless there's > some super-good reason to do otherwise. > > -- > Robert Haas > EDB: http://www.enterprisedb.com > > > -- Rushabh Lathia

Commit 86dc90056 - Rework planning and execution of UPDATE and DELETE

2021-04-19 Thread Rushabh Lathia
asting the attribute? Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: Commit ab596105b55 - BRIN minmax-multi indexes

2021-04-15 Thread Rushabh Lathia
On Thu, Apr 15, 2021 at 7:49 PM Tom Lane wrote: > Rushabh Lathia writes: > > Commit mentioned in the $subject changed the FirstBootstrapObjectId > > (transam.h) from 12000 to 13000. I was trying to understand the reason > > behind this change, but was not able to gather t

Commit ab596105b55 - BRIN minmax-multi indexes

2021-04-15 Thread Rushabh Lathia
those changes? Is it accidental or intentional? Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: INSERT INTO SELECT, Why Parallelism is not selected?

2020-07-14 Thread Rushabh Lathia
t; -> Parallel Seq Scan on t (cost=0.00..22450.33 rows=42 > width=105) (actual time=66.396..101.979 rows=33 loops=3) >Filter: (a < 100) >Rows Removed by Filter: 00 > Planning Time: 0.154 ms > Execution Time: 110.158 ms > (9 rows) > > -- > Regards, > Dilip Kumar > EnterpriseDB: http://www.enterprisedb.com > -- Rushabh Lathia

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-07-01 Thread Rushabh Lathia
e the server object in a single session, it > will be used in multiple sessions, having an > option at the per-server level would not be a good idea. > > With Regards, > Bharath Rupireddy. > EnterpriseDB: http://www.enterprisedb.com > > > -- Rushabh Lathia

Re: [PATCH] postgres_fdw connection caching - cause remote sessions linger till the local session exit

2020-07-01 Thread Rushabh Lathia
> That way, we can set it per server so that remote connections to the > particular server don’t remain idle. > > +1 I have not looked at the implementation, but I agree that here problem is with postgres_fdw so we should try to solve that by keeping it limited to postgres_fdw. I liked the idea of passing it as an option to the FDW connection. Regards, > > -- > Masahiko Sawadahttp://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > > > -- Rushabh Lathia

Re: [PATCH] Remove Extra palloc Of raw_buf For Binary Format In COPY FROM

2020-06-26 Thread Rushabh Lathia
> With Regards, > Bharath Rupireddy. > EnterpriseDB: http://www.enterprisedb.com > Thanks, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/commands/copy.c b/src/backend/commands/copy.c index 6d53dc4..97170d3 100644 --- a/src/backend/commands/copy.c +++ b/src/backend/command

Re: some grammar refactoring

2020-05-21 Thread Rushabh Lathia
th the patch. -- > Peter Eisentraut http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > -- Rushabh Lathia

Re: WIP/PoC for parallel backup

2020-05-04 Thread Rushabh Lathia
e care of that waitevent before getting the data again? > > [1] - > https://www.postgresql.org/message-id/CA%2BTgmobBw-3573vMosGj06r72ajHsYeKtksT_oTxH8XvTL7DxA%40mail.gmail.com > Sure, we can try out this and do a similar run to collect the pg_stat_activity output. > -- > With Regards, > Amit Kapila. > EnterpriseDB: http://www.enterprisedb.com > > > -- Rushabh Lathia

Re: backup manifests

2019-12-22 Thread Rushabh Lathia
; { > pg_log_info(...) > return; > } > > and the result would be that everything inside that long if-block is > now at the top level of the function and indented one level less. And > I think if you look at this function you'll see a way that you can > save a *second* level of indentation for much of that code. Please > check the rest of the patch for similar cases, too. > > +static char * > +nextLine(char *buf) > +{ > + while (*buf != '\0' && *buf != '\n') > + buf = buf + 1; > + > + return buf + 1; > +} > > I'm pretty sure that my previous review mentioned the importance of > protecting against buffer overruns here. > > +static char * > +nextWord(char *line) > +{ > + while (*line != '\0' && *line != '\t' && *line != '\n') > + line = line + 1; > + > + return line + 1; > +} > > Same problem here. > > In both cases, ++ is more idiomatic. > > -- > Robert Haas > EnterpriseDB: http://www.enterprisedb.com > The Enterprise PostgreSQL Company > -- Rushabh Lathia

Re: backup manifests

2019-12-10 Thread Rushabh Lathia
On Mon, Dec 9, 2019 at 2:52 PM Rushabh Lathia wrote: > > Thanks Jeevan for reviewing the patch and offline discussion. > > On Mon, Dec 9, 2019 at 11:15 AM Jeevan Chalke < > jeevan.cha...@enterprisedb.com> wrote: > >> >> >> On Fri, Dec 6,

Re: backup manifests

2019-12-09 Thread Rushabh Lathia
Thanks Jeevan for reviewing the patch and offline discussion. On Mon, Dec 9, 2019 at 11:15 AM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Fri, Dec 6, 2019 at 12:05 PM Rushabh Lathia > wrote: > >> >> >> On Fri, Dec 6, 2019 at 1:44 AM R

Re: backup manifests

2019-12-05 Thread Rushabh Lathia
On Fri, Dec 6, 2019 at 1:44 AM Robert Haas wrote: > On Thu, Dec 5, 2019 at 11:22 AM Rushabh Lathia > wrote: > > Here is the whole stack of patches. > > I committed 0001, as that's just refactoring and I think (hope) it's > uncontroversial. I think 0002-00

Re: backup manifests

2019-12-05 Thread Rushabh Lathia
On Thu, Dec 5, 2019 at 12:17 AM Robert Haas wrote: > On Wed, Dec 4, 2019 at 1:01 PM Rushabh Lathia > wrote: > > As per the discussion on the thread, here is the patch which > > > > a) Make checksum for manifest file optional. > > b) Allow user to

Re: backup manifests

2019-12-04 Thread Rushabh Lathia
I haven't miscalculated something). You'd > > need a > > pretty fast disk (aka M.2 SSD) and network (aka > 1 Gbit) to top these > > speeds > > and then you'd use a real CPU for your server, not some poor Intel > > powersaving > > surfing thingy

Re: backup manifests

2019-11-22 Thread Rushabh Lathia
Thank you Jeevan for reviewing the patch. On Thu, Nov 21, 2019 at 2:33 PM Jeevan Chalke < jeevan.cha...@enterprisedb.com> wrote: > > > On Tue, Nov 19, 2019 at 3:30 PM Rushabh Lathia > wrote: > >> >> >> My colleague Suraj did testing and noticed the perform

Re: backup manifests

2019-11-19 Thread Rushabh Lathia
On Tue, Nov 19, 2019 at 7:19 PM Andrew Dunstan < andrew.duns...@2ndquadrant.com> wrote: > > On 11/19/19 5:00 AM, Rushabh Lathia wrote: > > > > > > My colleague Suraj did testing and noticed the performance impact > > with the checksums. On further test

Re: backup manifests

2019-11-19 Thread Rushabh Lathia
so re-based all patch set. Regards, -- Rushabh Lathia www.EnterpriseDB.com On Tue, Oct 1, 2019 at 5:43 PM Robert Haas wrote: > On Mon, Sep 30, 2019 at 5:31 AM Jeevan Chalke > wrote: > > Entry for directory is not added in manifest. So it might be difficult > > at client to ge

Re: Optimize partial TOAST decompression

2019-11-14 Thread Rushabh Lathia
On Thu, Nov 14, 2019 at 6:30 PM Tomas Vondra wrote: > On Thu, Nov 14, 2019 at 03:27:42PM +0530, Rushabh Lathia wrote: > >Today I noticed strange behaviour, consider the following test: > > > >postgres@126111=#create table foo ( a text ); > >CREATE TABLE > >postgr

Re: Optimize partial TOAST decompression

2019-11-14 Thread Rushabh Lathia
Today I noticed strange behaviour, consider the following test: postgres@126111=#create table foo ( a text ); CREATE TABLE postgres@126111=#insert into foo values ( repeat('PostgreSQL is the world''s best database and leading by an Open Source Community.', 8000)); INSERT 0 1 postgres@126111=#sele

Re: WIP/PoC for parallel backup

2019-10-07 Thread Rushabh Lathia
uot;t/040_pg_basebackup_parallel.pl" and added > parallel option in all of its tests, to make sure parallel mode works > expectantly. The one thing that differs from base backup is the file > checksum reporting. In parallel mode, the total number of checksum failures > are not reported correctly however it will abort the backup whenever a > checksum failure occurs. This is because processes are not maintaining any > shared state. I assume that it's not much important to report total number > of failures vs noticing the failure and aborting. > > > -- > Asif Rehman > Highgo Software (Canada/China/Pakistan) > URL : www.highgo.ca > > -- Rushabh Lathia

Re: backup manifests

2019-09-30 Thread Rushabh Lathia
:1203:7: note: in expansion of macro ‘PQExpBufferBroken’ >if (PQExpBufferBroken(&buf)) > > I also observed this warning. PFA to fix the same. pg_gmtime can fail in case of malloc failure: > + /* > + * Convert time to a string. Since it's not clear what time zone

Re: POC: Cleaning up orphaned files using undo logs

2019-07-23 Thread Rushabh Lathia
o" and "update" 13) * The undo record should be freed by the caller by calling ReleaseUndoRecord. * This function will old the pin on the buffer where we read the previous undo * record so that when this function is called repeatedly with the same context %s/old/hold I will continue further review for the same patch. Regards, -- Rushabh Lathia www.EntepriseDB.com

Re: behaviour change - default_tablesapce + partition table

2019-05-19 Thread Rushabh Lathia
On Fri, May 17, 2019 at 10:30 AM Amit Langote wrote: > Agree that this behavior change seems unintentional. > > On 2019/05/17 12:40, Rushabh Lathia wrote: > > Looking at the commit changes, it seems like at condition when no other > > tablespace is specified, we default

behaviour change - default_tablesapce + partition table

2019-05-16 Thread Rushabh Lathia
initial_oid(inheritOids)); } But here it doesn't consider the default_tablespace if the parent partitioned tablespace is an InvalidOid (which was the care before this commit). PFA patch to fix the same. Thanks, -- Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/commands/ta

Re: pg_dump: fail to restore partition table with serial type

2019-05-06 Thread Rushabh Lathia
(!tbinfo->inhNotNull[j] || > dopt->binary_upgrade)); > > PFA patch to fix the issue, which allow to dump the NOT NULL > for partition table. > > PS: we also need to backport this to v11. > > Thanks, > -- > Rushabh Lathia > www.EnterpriseDB.com > > -- Rushabh Lathia

pg_dump: fail to restore partition table with serial type

2019-05-05 Thread Rushabh Lathia
has_notnull = (tbinfo->notnull[j] && (!tbinfo->inhNotNull[j] || dopt->binary_upgrade)); PFA patch to fix the issue, which allow to dump the NOT NULL for partition table. PS: we also need to

Re: ECPG regression with DECLARE STATEMENT support

2019-03-06 Thread Rushabh Lathia
ayato-san, any idea how to improve the > situation to not error out on statements that used to work? > > Michael > -- > Michael Meskes > Michael at Fam-Meskes dot De, Michael at Meskes dot (De|Com|Net|Org) > Meskes at (Debian|Postgresql) dot Org > Jabber: michael at xmpp dot meskes dot org > VfL Borussia! Força Barça! SF 49ers! Use Debian GNU/Linux, PostgreSQL > > > -- Rushabh Lathia

ECPG regression with DECLARE STATEMENT support

2019-03-05 Thread Rushabh Lathia
#x27;t find it there, just throws an error. Maybe require fix into ECPGclose() - rather than throwing an error continue executing statement "CLOSE cur_name" with ecpg_do(). Attaching the ECPG program for reference. Thanks, -- Rushabh Lathia www.EnterpriseDB.com test.pgc Description: Binary data

Re: ON SELECT rule on a table without columns

2019-02-08 Thread Rushabh Lathia
why do we want to forbid this? Because pg_dump - produce the output for such case as: CREATE VIEW public.foo AS SELECT FROM public.bar; which fails to restore because we forbid this in create view: postgres@20625=#CREATE VIEW public.foo AS postgres-# SELECT postgres-#FROM public.bar; ERROR: view must have at least one column postgres@20625=# Given > that we these days allows selects without columns, I see no reason to > require this for views. The view error check long predates allowing > SELECT and CREATE TABLE without columns. I think it's existence is just > an oversight. Tom, you did relaxed the permissive cases, any opinion? > > Greetings, > > Andres Freund > > -- Rushabh Lathia

Re: ON SELECT rule on a table without columns

2019-02-07 Thread Rushabh Lathia
at fixes it. > I had quick glance to the patch - here are few commits: 1) +if (event_relation->rd_rel->relnatts == 0) Can't use direct relnatts - as need to consider attisdropped. 2) I think you may like to change the error message to be in-line with the other error message in the similar code area. May be something like: "could not convert table \"%s\" to a view because table does not have any column" Regards, Rushabh Lathia www.EnterpriseDB.com

"ALTER TRIGGER .. RENAME TO" broken with the "Remove WITH OIDS" commit.

2019-01-21 Thread Rushabh Lathia
Date: Tue Nov 20 15:36:57 2018 -0800 Remove WITH OIDS support, change oid catalog column visibility. PFA patch to fix the issue. I also added the testcase for the same into the regression. regards, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/commands/trigger.c b/src/ba

Re: Hitting CheckRelationLockedByMe() ASSERT with force_generic_plan

2018-12-13 Thread Rushabh Lathia
While looking code further around this, I realized that we need similar kind of fix for bitmap as well as index only scan as well. Here is the patch, which does similar fix for bitmap and indexonly scans. Thanks, On Fri, Nov 23, 2018 at 6:47 PM Rushabh Lathia wrote: > > > On Fr

Re: Hitting CheckRelationLockedByMe() ASSERT with force_generic_plan

2018-11-23 Thread Rushabh Lathia
On Fri, Nov 23, 2018 at 3:33 AM David Rowley wrote: > On Thu, 22 Nov 2018 at 22:33, Rushabh Lathia > wrote: > > CREATE TABLE foo (x int primary key); > > INSERT INTO foo VALUES (1), (2), (3), (4), (5); > > > > CREATE OR REPLACE FUNCTION f1(a int) RETURNS int > &

Hitting CheckRelationLockedByMe() ASSERT with force_generic_plan

2018-11-22 Thread Rushabh Lathia
e reaching to ExecInitIndexScan() or teach ExecInitIndexScan() to take AccessShareLock on the scan coming from CMD_DELETE. Thoughts/Comments? Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: Internal error XX000 with enable_partition_pruning=on, pg 11 beta1 on Debian

2018-08-07 Thread Rushabh Lathia
hadn't). > > Thanks Tom, much appreciated. > > -- > Álvaro Herrera https://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > > -- Rushabh Lathia www.EnterpriseDB.com

Typo in llvm_function_reference

2018-06-26 Thread Rushabh Lathia
Hi, There is multiple return statement in llvm_function_reference and that's definitely looks typo. Here is the patch to fix the same. Thanks, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/jit/llvm/llvmjit.c b/src/backend/jit/llvm/llvmjit.c index daae964..5d0cdab 100644 ---

wrong query result with jit_above_cost= 0

2018-06-26 Thread Rushabh Lathia
,300,30); set jit_above_cost= 0; select max(epno) from emp group by rollup((deptno,epno)) order by 1 asc; without the ROLLUP, I don't see any problem with results. Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-04-09 Thread Rushabh Lathia
always NIL. Imagine attaching a partition at a lower level. > > create table foo (a int, b char) partition by list (a); > create table foo1 partition of foo for values in (1) partition by list (b); > create table foo1a (a, b) as values (2, 'b'); > > -- note that we're attaching to foo1, not foo > alter table foo1 attach partition foo1a for values in ('a'); > > If we didn't include foo1's (the parent) constraint (that is, a = 1), the > above command will wrongly succeed. It must include a = 1 in the > constraint to be be checked when scanning foo1a. > > Although, I noticed there is no test covering this. > > >> BTW, I think this is already broken for the case where the default > >> partition is partitioned and you attach a partition colliding with a row > >> that's being concurrently inserted in a partition of the default > >> partition, though I didn't bother to write a test for that. > > > > How is it broken? Every attaching partitions are checked for the > > specified partition bound and every partitions of the default > > partition are also checked against the new default part bound. We > > already hold required locks on all the participants. > > Yes, concurrent insertions to either the default partition or any of its > partitions couldn't be occurring as we'd have locked them. > > >> Anyway, I'm just an onlooker fixing a CommandCounterIncrement change. > > > > It's reassuring. Thanks. > > Yes, thank you for taking the time out to clean things up. > > Thanks, > Amit > > [1] > https://git.postgresql.org/gitweb/?p=postgresql.git;a= > commitdiff;h=972b6ec20bf > > -- Rushabh Lathia

Re: Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-03-29 Thread Rushabh Lathia
On Thu, Mar 29, 2018 at 7:46 PM, Alvaro Herrera wrote: > Rushabh Lathia wrote: > > > CREATE TABLE foo (a INT, b INT, c VARCHAR) PARTITION BY LIST(a); > > CREATE TABLE foo_p1 PARTITION OF foo FOR VALUES IN (1,2); > > CREATE TABLE foo_p2 PARTITION OF foo FOR VALUES IN (3

Commit 4dba331cb3 broke ATTACH PARTITION behaviour.

2018-03-29 Thread Rushabh Lathia
' partition Regards, -- Rushabh Lathia

Re: INOUT parameters in procedures

2018-03-20 Thread Rushabh Lathia
On Tue, Mar 20, 2018 at 6:38 AM, Peter Eisentraut < peter.eisentr...@2ndquadrant.com> wrote: > On 3/19/18 03:25, Rushabh Lathia wrote: > > For the FUNCTION when we have single OUT/INOUT parameter > > the return type for that function will be set to the type of OUT > param

Re: INOUT parameters in procedures

2018-03-19 Thread Rushabh Lathia
TEXT: SQL function "ptest4b" Here error message says that calling procedures with output arguments is not supported in SQL functions. Whereas here it's getting called from the SQL procedure. So error message needs to be changed. Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: change in behaviour for format_type() call

2018-03-01 Thread Rushabh Lathia
gt; as much as possible like before, and added a regression test. > Thanks Tom. Regards, Rushabh Lathia www.EnterpriseDB.com

change in behaviour for format_type() call

2018-03-01 Thread Rushabh Lathia
ormat_type - bpchar (1 row) postgres@90169=#select format_type('bit'::regtype, null); format_type - "bit" (1 row) Is this expected behaviour? attaching patch to get back the older behaviour. Thanks, Regards, Rushabh Lathia www.EnterpriseDB.com

Re: invalid memory alloc request size error with commit 4b93f579

2018-02-26 Thread Rushabh Lathia
at regress.c would naturally assume that anything in there is > being exercised. > > regards, tom lane > > -- Rushabh Lathia

invalid memory alloc request size error with commit 4b93f579

2018-02-25 Thread Rushabh Lathia
data->tg_trigtuple) + rettup = SPI_copytuple(rettup); In ExecBRUpdateTriggers(), we need to add a check that if trigtuple is same as newtuple, then we don't require to free the trigtuple. ExecBRDeleteTriggers() also does the similar things, but their we don't need a check

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-10 Thread Rushabh Lathia
> > WFM. > > This is good point. I agree with max_parallel_maintenance_workers. > -- > Peter Geoghegan > -- Rushabh Lathia

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-08 Thread Rushabh Lathia
On Sat, Jan 6, 2018 at 3:47 AM, Peter Geoghegan wrote: > On Tue, Jan 2, 2018 at 8:43 PM, Rushabh Lathia > wrote: > > I agree that plan_create_index_workers() needs to count the leader as a > > normal worker for the CREATE INDEX. So what you proposing is - when > > paral

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2018-01-02 Thread Rushabh Lathia
On Wed, Jan 3, 2018 at 9:11 AM, Peter Geoghegan wrote: > On Tue, Jan 2, 2018 at 1:38 AM, Rushabh Lathia > wrote: > > Need to do after the indexRelation build. So I added after update of > > pg_index, > > as indexRelation needed for plan_create_index_worders(). > &

Re: [HACKERS] replace GrantObjectType with ObjectType

2017-12-17 Thread Rushabh Lathia
On Sat, Dec 16, 2017 at 12:40 AM, Robert Haas wrote: > On Fri, Dec 15, 2017 at 12:40 PM, Peter Eisentraut > wrote: > > On 12/14/17 22:59, Rushabh Lathia wrote: > >> I noted that no_priv_msg and not_owner_msg array been removed > >> and code fitted the code into ac

Re: [HACKERS] replace GrantObjectType with ObjectType

2017-12-14 Thread Rushabh Lathia
mplex then what it used to be. I would prefer the array rather then code been fitted into the function. > -- > Peter Eisentraut http://www.2ndQuadrant.com/ > PostgreSQL Development, 24x7 Support, Remote DBA, Training & Services > -- Rushabh Lathia

Re: incorrect error message, while dropping PROCEDURE

2017-12-14 Thread Rushabh Lathia
On Fri, Dec 15, 2017 at 3:32 AM, Michael Paquier wrote: > On Fri, Dec 15, 2017 at 12:18 AM, Peter Eisentraut > wrote: > > On 12/13/17 23:31, Rushabh Lathia wrote: > >> PFA patch, where introduced new AclObjectKind (ACL_KIND_PROCEDURE), > >> msg for the new AclObj

incorrect error message, while dropping PROCEDURE

2017-12-13 Thread Rushabh Lathia
d it through at appropriate places. Also update the necessary "make check" expected output changes. Regards, Thanks, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/catalog/aclchk.c b/src/backend/catalog/aclchk.c index e481cf3..680ef18 100644 --- a/src/backend/catalog/aclchk.c

server crash with CallStmt

2017-12-12 Thread Rushabh Lathia
E for the CallStmt function resolution. Regards, Thanks, Rushabh Lathia www.EnterpriseDB.com

Re: [HACKERS] Parallel tuplesort (for parallel B-Tree index creation)

2017-12-10 Thread Rushabh Lathia
Thanks Tels for reviewing the patch. On Fri, Dec 8, 2017 at 2:54 PM, Tels wrote: > Hello Rushabh, > > On Fri, December 8, 2017 2:28 am, Rushabh Lathia wrote: > > Thanks for review. > > > > On Fri, Dec 8, 2017 at 6:27 AM, Peter Geoghegan wrote: > > > >>

Re: With commit 4e5fe9ad19, range partition missing handling for the NULL partition key

2017-11-23 Thread Rushabh Lathia
On Wed, Nov 22, 2017 at 2:36 PM, Amit Langote wrote: > On 2017/11/22 17:42, amul sul wrote: > > On Wed, Nov 22, 2017 at 11:38 AM, Amit Langote wrote: > >> On 2017/11/22 13:45, Rushabh Lathia wrote: > >>> Attaching patch to fix as well as regression test. > >

Typo in ExecBuildSlotPartitionKeyDescription prologue

2017-11-22 Thread Rushabh Lathia
Hi Here is a patch for fixing the function ExecBuildSlotPartitionKeyDescription() prologue. Thanks, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/executor/execPartition.c b/src/backend/executor/execPartition.c index d275cef..2fc411a 100644 --- a/src/backend/executor

With commit 4e5fe9ad19, range partition missing handling for the NULL partition key

2017-11-21 Thread Rushabh Lathia
mmit, condition for isnull is missing. It doesn't look intentional, is it? Attaching patch to fix as well as regression test. Thanks, Rushabh Lathia www.EnterpriseDB.com diff --git a/src/backend/catalog/partition.c b/src/backend/catalog/partition.c index 67d4c2a..b62e8f5 100644 --- a/src/bac