Skip temporary table schema name from explain-verbose output.

2021-04-26 Thread Amul Sul
Hi, Temporary tables usually gets a unique schema name, see this: postgres=# create temp table foo(i int); CREATE TABLE postgres=# explain verbose select * from foo; QUERY PLAN - Seq Scan on pg_temp_3.foo

Re: Skip temporary table schema name from explain-verbose output.

2021-04-26 Thread Amul Sul
On Tue, Apr 27, 2021 at 11:07 AM Bharath Rupireddy wrote: > > On Tue, Apr 27, 2021 at 10:51 AM Amul Sul wrote: > > > > Hi, > > > > Temporary tables usually gets a unique schema name, see this: > > > > postgres=# create temp table foo(i int); > > CR

Re: Skip temporary table schema name from explain-verbose output.

2021-04-27 Thread Amul Sul
On Tue, Apr 27, 2021 at 7:08 PM Bharath Rupireddy wrote: > > On Tue, Apr 27, 2021 at 6:59 PM Ashutosh Bapat > wrote: > > > > On Tue, Apr 27, 2021 at 12:23 PM Amul Sul wrote: > > > > > > > > How about using an explain filter to replace the unstable t

Re: Skip temporary table schema name from explain-verbose output.

2021-04-29 Thread Amul Sul
*/ + if (strcmp(schemabuf.data, "^(pg_temp)$") == 0 || +strcmp(schemabuf.data, "^(pg_toast_temp)$") == 0) +schemabuf.data[schemabuf.len-1] = '\0'; appendStringLiteralConn(buf, schemabuf.data, conn); if (PQserverVersion(conn) >= 12) appendPQExpBuf

Re: Remove redundant variable from transformCreateStmt

2021-05-02 Thread Amul Sul
On Fri, Apr 30, 2021 at 10:49 AM Bharath Rupireddy wrote: > > On Fri, Apr 30, 2021 at 7:07 AM Justin Pryzby wrote: > > > > On Thu, Apr 29, 2021 at 02:39:42PM -0400, Alvaro Herrera wrote: > > > On 2021-Apr-29, Tom Lane wrote: > > > > Alvaro Herrera writes: > > > > > I'd do it like this. Note I r

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-08 Thread Amul Sul
On Fri, May 7, 2021 at 1:23 AM Robert Haas wrote: > > On Mon, Apr 12, 2021 at 10:04 AM Amul Sul wrote: > > Rebased again. > > I started to look at this today, and didn't get very far, but I have a > few comments. The main one is that I don't think this patch impl

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-10 Thread Amul Sul
On Mon, May 10, 2021 at 9:21 PM Robert Haas wrote: > > On Sun, May 9, 2021 at 1:26 AM Amul Sul wrote: > > The state in the control file also gets cleared. Though, after > > clearing in memory the state patch doesn't really do the immediate > > change to the contro

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 11:33 AM Dilip Kumar wrote: > > On Mon, May 10, 2021 at 10:25 PM Amul Sul wrote: > > > > Yes, we don't want any write slip in before UpdateFullPageWrites(). > > Recently[1], we have decided to let the Checkpointed process call > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 2:26 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 2:16 PM Amul Sul wrote: > > > I get why you think that, I wasn't very precise in briefing the problem. > > > > Any new backend that gets connected right after the sh

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 4:13 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 3:38 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 2:26 PM Dilip Kumar wrote: > > > > > > On Tue, May 11, 2021 at 2:16 PM Amul Sul wrote: > > > > > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, May 11, 2021 at 6:48 PM Dilip Kumar wrote: > > On Tue, May 11, 2021 at 4:50 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 4:13 PM Dilip Kumar wrote: > > > I might be missing something, but assume the behavior should be like this > > > > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-05-11 Thread Amul Sul
On Tue, 11 May 2021 at 7:50 PM, Dilip Kumar wrote: > On Tue, May 11, 2021 at 6:56 PM Amul Sul wrote: > > > > On Tue, May 11, 2021 at 6:48 PM Dilip Kumar > wrote: > > > > > > On Tue, May 11, 2021 at 4:50 PM Amul Sul wrote: > > > > > > &g

Re: Refactor "mutually exclusive options" error reporting code in parse_subscription_options

2021-05-19 Thread Amul Sul
On Wed, May 19, 2021 at 2:09 PM Bharath Rupireddy wrote: > > Hi, > > parse_subscription_options function has some similar code when > throwing errors [with the only difference in the option]. I feel we > could just use a variable for the option and use it in the error. > While this has no benefit

remove duplicate comment.

2023-02-15 Thread Amul Sul
Hi, The attached patch removes the comment line noting the same as the previous paragraph of the ExecUpdateAct() prolog comment. -- Regards, Amul Sul EDB: http://www.enterprisedb.com diff --git a/src/backend/executor/nodeModifyTable.c b/src/backend/executor/nodeModifyTable.c index f419c47065a

Re: Convert macros to static inline functions

2022-10-03 Thread Amul Sul
On Tue, Oct 4, 2022 at 12:00 PM Peter Eisentraut wrote: > > On 16.05.22 10:27, Peter Eisentraut wrote: > > Inspired by [0], I looked to convert more macros to inline functions. > > Here is another one from the same batch of work that I somehow didn't > send in last time. > I think assertion can be

Re: Simplify standby state machine a bit in WaitForWALToBecomeAvailable()

2022-10-18 Thread Amul Sul
On Tue, Oct 18, 2022 at 12:01 PM Bharath Rupireddy wrote: > > Hi, > > In standby mode, the state machine in WaitForWALToBecomeAvailable() > reads WAL from pg_wal after failing to read from the archive. This is > currently implemented in XLogFileReadAnyTLI() by calling > XLogFileRead() with source

Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql

2022-10-27 Thread Amul Sul
On Thu, Oct 27, 2022 at 6:54 PM Tom Lane wrote: > > Nishant Sharma writes: > > We would like to share a proposal of a patch, where we have added order by > > clause in two select statements in src/test/regress/sql/insert.sql file and > > respective changes in src/test/regress/expected/insert.out

Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql

2022-10-27 Thread Amul Sul
On Fri, Oct 28, 2022 at 10:28 AM David Rowley wrote: > > On Fri, 28 Oct 2022 at 16:51, Amul Sul wrote: > > > > On Thu, Oct 27, 2022 at 6:54 PM Tom Lane wrote: > > > Please be specific about the circumstances in which the output is > > > unstable for you.

Re: [PROPOSAL] : Use of ORDER BY clause in insert.sql

2022-10-27 Thread Amul Sul
On Fri, Oct 28, 2022 at 10:43 AM Tom Lane wrote: > > David Rowley writes: > > On Fri, 28 Oct 2022 at 16:51, Amul Sul wrote: > >> If we > >> are too sure that the output usually comes in the same order then the > >> ORDER BY clause that exists i

Re: New committers: Daniel Gustafsson and John Naylor

2021-06-30 Thread Amul Sul
On Thu, Jul 1, 2021 at 2:14 AM Tom Lane wrote: > > The Core Team would like to extend our congratulations to > Daniel Gustafsson and John Naylor, who have accepted invitations > to become our newest Postgres committers. > Many congratulations to Daniel & John ! Regards, Amul

Re: "debug_invalidate_system_caches_always" is too long

2021-07-04 Thread Amul Sul
On Mon, Jul 5, 2021 at 1:57 AM Tom Lane wrote: > > As I've been poking around in this area, I find myself growing > increasingly annoyed at the new GUC name > "debug_invalidate_system_caches_always". It is too d*mn long. > It's a serious pain to type in any context where you don't have > autocomp

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-06 Thread Amul Sul
On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > Amul Sul writes: > > On Tue, Apr 20, 2021 at 6:59 AM Kyotaro Horiguchi > > wrote: > >> I don't mind RelationGetSmgr(index)->smgr_rnode alone or > >> &variable->member alone and there's

Re: when the startup process doesn't (logging startup delays)

2021-07-08 Thread Amul Sul
Few comments for v4 patch: @@ -7351,6 +7363,8 @@ StartupXLOG(void) (errmsg("redo starts at %X/%X", LSN_FORMAT_ARGS(ReadRecPtr; + InitStartupProgress(); + /* * main redo apply loop */ @@ -7358,6 +73

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-09 Thread Amul Sul
On Wed, Jul 7, 2021 at 9:44 AM Amul Sul wrote: > > On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > > > Amul Sul writes: > > > On Tue, Apr 20, 2021 at 6:59 AM Kyotaro Horiguchi > > > wrote: > > >> I don't mind RelationGetSmgr(index)-&g

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-11 Thread Amul Sul
On Fri, Jul 9, 2021 at 7:30 PM Alvaro Herrera wrote: > > On 2021-Jul-09, Amul Sul wrote: > > > > On Tue, Jul 6, 2021 at 11:06 PM Tom Lane wrote: > > > > > The point of the static-inline function idea was to be cheap enough > > > > that it

Re: Proposal for internal Numeric to Uint64 conversion function.

2022-05-02 Thread Amul Sul
On Mon, May 2, 2022 at 8:23 PM Peter Eisentraut wrote: > > On 22.04.22 14:26, Amul Sul wrote: > > Yes, I think we can do cleanup to some extent. Attaching the > > following patches that first intend to remove DirectFunctionCall as > > much as possible: > > Do y

Re: Proposal for internal Numeric to Uint64 conversion function.

2022-05-04 Thread Amul Sul
On Tue, May 3, 2022 at 8:04 PM Peter Eisentraut wrote: > > On 03.05.22 08:50, Amul Sul wrote: > >> Do you have any data that supports removing DirectionFunctionCall() > >> invocations? I suppose some performance benefit could be expected, or > >> what do you

Re: Make relfile tombstone files conditional on WAL level

2022-05-12 Thread Amul Sul
Hi Dilip, On Fri, Mar 4, 2022 at 11:07 AM Dilip Kumar wrote: > > On Mon, Feb 21, 2022 at 1:21 PM Dilip Kumar wrote: > > > > On Thu, Jan 6, 2022 at 1:43 PM Dilip Kumar wrote: > > > > 2) GetNewRelFileNode() will not loop for checking the file existence > > > and retry with other relfilenode. > >

Correct comment in ProcedureCreate() for pgstat_create_function() call.

2022-05-12 Thread Amul Sul
Hi, PFA, attached patch to $SUBJECT. -- Regards, Amul Sul EDB: http://www.enterprisedb.com

Re: Correct comment in ProcedureCreate() for pgstat_create_function() call.

2022-05-12 Thread Amul Sul
Sorry, hit the send button too early :| Attached here !! On Fri, May 13, 2022 at 10:20 AM Amul Sul wrote: > > Hi, > > PFA, attached patch to $SUBJECT. > > -- > Regards, > Amul Sul > EDB: http://www.enterprisedb.com code_comment.patch Description: Binary data

Re: Convert macros to static inline functions

2022-05-16 Thread Amul Sul
On Mon, May 16, 2022 at 1:58 PM Peter Eisentraut wrote: > > > Inspired by [0], I looked to convert more macros to inline functions. > The attached patches are organized "bottom up" in terms of their API > layering; some of the later ones depend on some of the earlier ones. > All the patches look

Re: PostgreSQL Limits: maximum number of columns in SELECT result

2022-05-31 Thread Amul Sul
On Tue, May 31, 2022 at 12:46 PM Vladimir Sitnikov wrote: > > Hi, > > Today I hit "ERROR: target lists can have at most 1664 entries", and I was > surprised the limit was not documented. > > I suggest that the limit of "1664 columns per tuple" (or whatever is the > right term) should be added >

GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere.

2022-07-20 Thread Amul Sul
eplayTLI; Thoughts? -- Regards, Amul Sul EDB: http://www.enterprisedb.com

Re: GetStandbyFlushRecPtr() : OUT param is not optional like elsewhere.

2022-07-20 Thread Amul Sul
Thanks Aleksander and Álvaro for your inputs. I understand this change is not making any improvement to the current code. I was a bit concerned regarding the design and consistency of the function that exists for the server in recovery and for the server that is not in recovery. I was trying to w

Re: making relfilenodes 56 bits

2022-07-25 Thread Amul Sul
On Fri, Jul 22, 2022 at 4:21 PM vignesh C wrote: > > On Wed, Jul 20, 2022 at 4:57 PM Dilip Kumar wrote: > > > > On Mon, Jul 18, 2022 at 4:51 PM Dilip Kumar wrote: > > > > > > I was doing some more testing by setting the FirstNormalRelFileNumber > > > to a high value(more than 32 bits) I have not

Re: [Patch] ALTER SYSTEM READ ONLY

2022-07-27 Thread Amul Sul
Hi, On Thu, Jul 28, 2022 at 4:05 AM Jacob Champion wrote: > > On Fri, Apr 8, 2022 at 7:27 AM Amul Sul wrote: > > Attached is rebase version for the latest maste head(#891624f0ec). > > Hi Amul, > > I'm going through past CF triage emails today; I noticed that th

Re: Refactoring postgres_fdw/connection.c

2022-08-03 Thread Amul Sul
evel) + return false; + + /* + * If there were any errors in subtransactions, and we made prepared + * statements, do a DEALLOCATE ALL to make sure we get rid of all prepared + * statements. This is annoying and not terribly bulletproof, but it's + * probably not worth trying harder. + * +

Unused variable in TAP tests file

2021-09-02 Thread Amul Sul
Few tap test files have the "tempdir_short" variable which isn't in use. The attached patch removes the same Regards, Amul From 0751895df64bcd6bc719933013edf1d76e31b784 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Fri, 3 Sep 2021 01:19:29 -0400 Subject: [PATCH] Remove unused var

Re: using an end-of-recovery record in all cases

2021-09-03 Thread Amul Sul
On Fri, Sep 3, 2021 at 10:23 AM Kyotaro Horiguchi wrote: > > At Thu, 2 Sep 2021 11:30:59 -0400, Robert Haas wrote > in > > On Mon, Aug 9, 2021 at 3:00 PM Robert Haas wrote: > > > I decided to try writing a patch to use an end-of-recovery record > > > rather than a checkpoint record in all cases

Re: Unused variable in TAP tests file

2021-09-05 Thread Amul Sul
Thank you ! Regards, Amul On Mon, Sep 6, 2021 at 7:58 AM Michael Paquier wrote: > > On Fri, Sep 03, 2021 at 04:03:36PM +0900, Michael Paquier wrote: > > Indeed. Let's clean up that. Thanks! > > And done. > -- > Michael

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-07 Thread Amul Sul
On Tue, 7 Sep 2021 at 8:43 PM, Mark Dilger wrote: > > > > On Aug 31, 2021, at 5:15 AM, Amul Sul wrote: > > > > Attached is the rebased version for the latest master head. > > Hi Amul! > > Could you please rebase again? > Ok will do that tomorrow, thanks. Regards, Amul

TAP test for recovery_end_command

2021-09-09 Thread Amul Sul
Hi, The attached patch adds a small test for recovery_end_command execution. Currently, patch tests execution of recovery_end_command by creating dummy file, I am not wedded only to this approach, other suggestions also welcome. Also, we don't have a good test for archive_cleanup_command as well

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-10 Thread Amul Sul
On Thu, Sep 9, 2021 at 11:12 PM Mark Dilger wrote: > > Thank you, for looking at the patch. Please see my reply inline below: > > > On Sep 8, 2021, at 6:44 AM, Amul Sul wrote: > > > > Here is the rebased version. > > v33-0004 > > This patch moves the

Re: TAP test for recovery_end_command

2021-09-12 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:44 AM Michael Paquier wrote: > > On Sun, Sep 12, 2021 at 09:25:32PM -0300, Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > >> Also, we don't have a good test for archive_cleanup_command as well, I > >> am no

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 5:56 AM Euler Taveira wrote: > > On Thu, Sep 9, 2021, at 8:18 AM, Amul Sul wrote: > > The attached patch adds a small test for recovery_end_command execution. > > Additional coverage is always a good thing. > Thanks for the confirmation. >

Re: TAP test for recovery_end_command

2021-09-13 Thread Amul Sul
On Mon, Sep 13, 2021 at 8:39 PM Euler Taveira wrote: > > On Mon, Sep 13, 2021, at 10:09 AM, Amul Sul wrote: > > Yeah, added that test too. I triggered the restartpoint via a > CHECKPOINT command in the attached version. > > +# archive_cleanup_command executed with every rest

Deduplicate code updating ControleFile's DBState.

2021-09-13 Thread Amul Sul
that. AFAICU, I don't see any problem there, since until the startup process exists other backends could not connect and write a WAL record. Regards, Amul Sul. EDB: http://www.enterprisedb.com From 4728be13bc17183f9869b1c040d5c72d2969e736 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Tue, 1

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-15 Thread Amul Sul
, On Sat, Jul 24, 2021 at 1:33 AM Robert Haas wrote: > > On Thu, Jun 17, 2021 at 1:23 AM Amul Sul wrote: > > Attached is rebase for the latest master head. Also, I added one more > > refactoring code that deduplicates the code setting database state in the > > control

Re: Deduplicate code updating ControleFile's DBState.

2021-09-15 Thread Amul Sul
On Wed, Sep 15, 2021 at 12:52 AM Bossart, Nathan wrote: > > On 9/13/21, 11:06 PM, "Amul Sul" wrote: > > The patch is straightforward but the only concern is that in > > StartupXLOG(), SharedRecoveryState now gets updated only with spin > > lock; earlier it also

Re: Deduplicate code updating ControleFile's DBState.

2021-09-19 Thread Amul Sul
On Thu, Sep 16, 2021 at 5:17 AM Michael Paquier wrote: > > On Wed, Sep 15, 2021 at 10:49:39PM +, Bossart, Nathan wrote: > > Ah, I was missing this context. Perhaps this should be included in > > the patch set for the other thread, especially if it will need to be > > exported. > > This part o

Re: Deduplicate code updating ControleFile's DBState.

2021-09-19 Thread Amul Sul
On Thu, Sep 16, 2021 at 4:19 AM Bossart, Nathan wrote: > > On 9/15/21, 4:47 AM, "Amul Sul" wrote: > > On Wed, Sep 15, 2021 at 12:52 AM Bossart, Nathan > > wrote: > >> It looks like ebdf5bf intentionally made sure that we hold > >> ControlFileLoc

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-20 Thread Amul Sul
n't need them. */ RemoveNonParentXlogFiles(EndOfLog, ThisTimeLineID); " > So I think you've covered most of the necessary things here, with > probably some more discussion needed on whether you've done the right > things... > Thanks, Robert, for your time. Re

Re: Deduplicate code updating ControleFile's DBState.

2021-09-20 Thread Amul Sul
On Tue, Sep 21, 2021 at 4:44 AM Bossart, Nathan wrote: > > On 9/19/21, 11:07 PM, "Amul Sul" wrote: > > +1, since skipping ControlFileLock for the DBState update is not the > > right thing, let's have two different functions as per your suggestion > >

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 15, 2021 at 4:34 AM Mark Dilger wrote: > > > > > On Jun 16, 2020, at 6:55 AM, amul sul wrote: > > > > (2) if the session is idle, we also need the top-level abort > > record to be written immediately, but can't send an error to the client &g

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 22, 2021 at 6:59 PM Mark Dilger wrote: > > > > > On Sep 22, 2021, at 6:14 AM, Amul Sul wrote: > > > >> Attached patch v34-0010 adds a test of cursors opened FOR UPDATE > >> interacting with a system that is set read-only by a different sessi

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-22 Thread Amul Sul
On Wed, Sep 22, 2021 at 7:33 PM Mark Dilger wrote: > > > > > On Sep 22, 2021, at 6:39 AM, Amul Sul wrote: > > > > Yes, that is a bit longer, here is the snip from v35-0010 patch > > Right, that's longer, and only tests one interaction. The isolation sp

Re: Deduplicate code updating ControleFile's DBState.

2021-09-22 Thread Amul Sul
On Tue, Sep 21, 2021 at 9:43 PM Bossart, Nathan wrote: > > On 9/20/21, 10:07 PM, "Amul Sul" wrote: > > On Tue, Sep 21, 2021 at 4:44 AM Bossart, Nathan wrote: > >> On 9/19/21, 11:07 PM, "Amul Sul" wrote: > >> > I have one additional concer

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-24 Thread Amul Sul
On Thu, Sep 23, 2021 at 11:56 PM Robert Haas wrote: > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul wrote: > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > and the refactoring patches start from 0003. > > I think it would be better in t

Re: [Patch] ALTER SYSTEM READ ONLY

2021-09-30 Thread Amul Sul
On Fri, Sep 24, 2021 at 5:07 PM Amul Sul wrote: > > On Thu, Sep 23, 2021 at 11:56 PM Robert Haas wrote: > > > > On Mon, Sep 20, 2021 at 11:20 AM Amul Sul wrote: > > > Ok, understood, I have separated my changes into 0001 and 0002 patch, > > > and the

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-05 Thread Amul Sul
On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia wrote: > > > > On Fri, Oct 1, 2021 at 2:29 AM Robert Haas wrote: >> >> On Thu, Sep 30, 2021 at 7:59 AM Amul Sul wrote: >> > To find the value of InRecovery after we clear it, patch still uses >> >

Re: using an end-of-recovery record in all cases

2021-10-05 Thread Amul Sul
I was trying to understand the v1 patch and found that at the end RequestCheckpoint() is called unconditionally, I think that should have been called if REDO had performed, here is the snip from the v1 patch: /* - * If this was a promotion, request an (online) checkpoint now. This isn't - * requ

Re: using an end-of-recovery record in all cases

2021-10-05 Thread Amul Sul
On Tue, 5 Oct 2021 at 9:04 PM, Robert Haas wrote: > On Tue, Oct 5, 2021 at 7:44 AM Amul Sul wrote: > > I was trying to understand the v1 patch and found that at the end > > RequestCheckpoint() is called unconditionally, I think that should > > have been called if REDO had

Re: TAP test for recovery_end_command

2021-10-06 Thread Amul Sul
On Wed, Oct 6, 2021 at 1:40 AM Andres Freund wrote: > > Hi, > > On 2021-09-14 10:34:09 +0530, Amul Sul wrote: > > +# recovery_end_command_file executed only on recovery end which can happen > > on > > +# promotion. > > +$standby3->promote;

Re: using an end-of-recovery record in all cases

2021-10-06 Thread Amul Sul
On Tue, Oct 5, 2021 at 10:42 PM Robert Haas wrote: > > On Tue, Oct 5, 2021 at 12:41 PM Amul Sul wrote: > > No, InRecovery flag get cleared before this point. I think, we can use > > lastReplayedEndRecPtr what you have suggested in other thread. > > Hmm, right, that makes

Re: prevent immature WAL streaming

2021-10-07 Thread Amul Sul
Hi, On Wed, Sep 29, 2021 at 8:14 PM Alvaro Herrera wrote: > > On 2021-Sep-24, Alvaro Herrera wrote: > > > Here's the set for all branches, which I think are really final, in case > > somebody wants to play and reproduce their respective problem scenarios. > > Nathan already confirmed that his rep

Re: [Patch] ALTER SYSTEM READ ONLY

2021-10-07 Thread Amul Sul
On Thu, Oct 7, 2021 at 5:56 AM Jaime Casanova wrote: > > On Tue, Oct 05, 2021 at 04:11:58PM +0530, Amul Sul wrote: > >On Mon, Oct 4, 2021 at 1:57 PM Rushabh Lathia > > wrote: > > > > > > I tried to apply the patch on the master branch head a

Re: prevent immature WAL streaming

2021-10-07 Thread Amul Sul
On Thu, 7 Oct 2021 at 6:41 PM, Alvaro Herrera wrote: > On 2021-Oct-07, Amul Sul wrote: > > > While reading this commit (ff9f111bce24), wondered can't we skip > > missingContrecPtr global variable declaration and calculate that from > > abortedRecPtr v

Re: [CLOBBER_CACHE]Server crashed with segfault 11 while executing clusterdb

2021-07-12 Thread Amul Sul
Thanks a lot Tom. On Tue, Jul 13, 2021 at 2:37 AM Tom Lane wrote: > > Amul Sul writes: > > [ v5_Add-RelationGetSmgr-inline-function.patch ] > > Pushed with minor cosmetic adjustments. > > RelationCopyStorage() kind of gives me the willies. > It's not really an

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-28 Thread Amul Sul
On Wed, Jul 28, 2021 at 2:26 AM Robert Haas wrote: > > On Fri, Jul 23, 2021 at 4:03 PM Robert Haas wrote: > > My 0003 is where I see some lingering problems. It creates > > XLogAcceptWrites(), moves the appropriate stuff there, and doesn't > > need the xlogreader. But it doesn't really solve the

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-28 Thread Amul Sul
On Wed, Jul 28, 2021 at 4:37 PM Amul Sul wrote: > > On Wed, Jul 28, 2021 at 2:26 AM Robert Haas wrote: > > > > On Fri, Jul 23, 2021 at 4:03 PM Robert Haas wrote: > > > My 0003 is where I see some lingering problems. It creates > > > XLogAcceptWrites(), mo

Re: needless complexity in StartupXLOG

2021-07-28 Thread Amul Sul
On Mon, Jul 26, 2021 at 9:43 PM Robert Haas wrote: > > StartupXLOG() has code beginning around line 7900 of xlog.c that > decides, at the end of recovery, between four possible courses of > action. It either writes an end-of-recovery record, or requests a > checkpoint, or creates a checkpoint, or

Re: [Patch] ALTER SYSTEM READ ONLY

2021-07-29 Thread Amul Sul
On Thu, Jul 29, 2021 at 4:47 PM Dilip Kumar wrote: > > On Wed, Jul 28, 2021 at 5:03 PM Amul Sul wrote: > > > > I was too worried about how I could miss that & after thinking more > > about that, I realized that the operation for ArchiveRecoveryRequested > > i

Re: Background writer and checkpointer in crash recovery

2021-08-02 Thread Amul Sul
On Mon, Aug 2, 2021 at 6:47 PM Robert Haas wrote: > > On Mon, Aug 2, 2021 at 1:37 AM Thomas Munro wrote: > > I pushed 0001. > > That's great. I just realized that this leaves us with identical > RequestCheckpoint() calls in two nearby places. Is there any reason > not to further simplify as in th

Re: Logical Replication of sequences

2024-06-10 Thread Amul Sul
On Sat, Jun 8, 2024 at 6:43 PM vignesh C wrote: > On Wed, 5 Jun 2024 at 14:11, Amit Kapila wrote: > [...] > A new catalog table, pg_subscription_seq, has been introduced for > mapping subscriptions to sequences. Additionally, the sequence LSN > (Log Sequence Number) is stored, facilitating deter

Re: Logical Replication of sequences

2024-06-10 Thread Amul Sul
On Mon, Jun 10, 2024 at 5:00 PM vignesh C wrote: > On Mon, 10 Jun 2024 at 12:24, Amul Sul wrote: > > > > > > > > On Sat, Jun 8, 2024 at 6:43 PM vignesh C wrote: > >> > >> On Wed, 5 Jun 2024 at 14:11, Amit Kapila > wrote: > >> [...

Re: New PostgreSQL Contributors

2023-07-30 Thread Amul Sul
On Fri, Jul 28, 2023 at 8:59 PM Christoph Berg wrote: > The PostgreSQL contributors team has been looking over the community > activity and, over the first half of this year, has been recognizing > new contributors to be listed on > > https://www.postgresql.org/community/contributors/ > > New Pos

ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-08-02 Thread Amul Sul
ELECT * FROM t1; x | y ---+ 1 | 4 2 | 8 3 | 12 (3 rows) Thank you. -- Regards, Amul Sul EDB: http://www.enterprisedb.com From ef1448f7852000d5b701f9e3c7fe88737670740a Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Mon, 31 Jul 2023 15:43:51 +0530 Subject: [PATCH v1 2/2] Allow to change gene

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-08-02 Thread Amul Sul
On Wed, Aug 2, 2023 at 9:16 PM jian he wrote: > On Wed, Aug 2, 2023 at 6:36 PM Amul Sul wrote: > > > > Hi, > > > > Currently, we have an option to drop the expression of stored generated > columns > > as: > > > > ALTER [ COLUMN ] column_name DROP

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-08-28 Thread Amul Sul
On Thu, Aug 24, 2023 at 9:36 AM Vaibhav Dalvi < vaibhav.da...@enterprisedb.com> wrote: > Hi Amul, > > > On Wed, Aug 2, 2023 at 4:06 PM Amul Sul wrote: > >> Hi, >> >> Currently, we have an option to drop the expression of stored generated >> columns &

Re: ALTER COLUMN ... SET EXPRESSION to alter stored generated column's expression

2023-08-28 Thread Amul Sul
On Fri, Aug 25, 2023 at 5:35 AM Vik Fearing wrote: > On 8/2/23 12:35, Amul Sul wrote: > > Hi, > > > > Currently, we have an option to drop the expression of stored generated > > columns > > as: > > > > ALTER [ COLUMN ] column_name DROP EXPRESSION [

Re: Add bump memory context type and use it for tuplesorts

2024-04-15 Thread Amul Sul
Attached is a small patch adding the missing BumpContext description to the README. Regards, Amul 0001-Add-BumpContext-description-to-mmgr-README.patch Description: Binary data

Re: Add bump memory context type and use it for tuplesorts

2024-04-16 Thread Amul Sul
On Tue, Apr 16, 2024 at 3:44 PM David Rowley wrote: > On Tue, 16 Apr 2024 at 17:13, Amul Sul wrote: > > Attached is a small patch adding the missing BumpContext description to > the > > README. > > Thanks for noticing and working on the patch. > > There were a

Re: New committers: Melanie Plageman, Richard Guo

2024-04-26 Thread Amul Sul
ease join us in wishing them much success and few reverts! > > Thanks, > > Jonathan > -- Regards, Amul Sul EDB: http://www.enterprisedb.com

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

2022-09-14 Thread Amul Sul
On Wed, Sep 14, 2022 at 12:16 PM wrote: > > I still wonder, if assert doesn't catch why that place is marked as > covered here? > https://coverage.postgresql.org/src/backend/access/gin/ginvacuum.c.gcov.html > Probably other tests cover that. Regards, Amul

Re: making relfilenodes 56 bits

2022-09-20 Thread Amul Sul
On Fri, Sep 9, 2022 at 3:32 PM Dilip Kumar wrote: > > On Thu, Sep 8, 2022 at 4:10 PM Dilip Kumar wrote: > > > On a separate note, while reviewing the latest patch I see there is some > > risk of using the unflushed relfilenumber in GetNewRelFileNumber() > > function. Basically, in the current

Dumping policy on a table belonging to an extension is expected?

2023-07-04 Thread Amul Sul
u try to drop this policy, get dropped without any warning/error unlike tables or other objects which are not allowed to drop at all. -- Regards, Amul Sul EDB: http://www.enterprisedb.com

Re: pg_verifybackup: TAR format backup verification

2024-08-21 Thread Amul Sul
On Tue, Aug 20, 2024 at 3:56 PM Amul Sul wrote: > > On Sat, Aug 17, 2024 at 1:34 AM Robert Haas wrote: > > > > On Fri, Aug 16, 2024 at 3:53 PM Robert Haas wrote: [...] > > There's probably more to look at here but I'm running out of energy for > > tod

Re: pg_verifybackup: TAR format backup verification

2024-08-29 Thread Amul Sul
On Sat, Aug 24, 2024 at 2:02 AM Robert Haas wrote: > > On Wed, Aug 21, 2024 at 7:08 AM Amul Sul wrote: > [] > Then the result verifies. But I feel like we should have some test > cases that do this kind of stuff so that there is automated > verification. In fact, the curr

Re: pg_verifybackup: TAR format backup verification

2024-09-12 Thread Amul Sul
ndle unpacking and repacking tar files and the required path formats for these tests but the "Cirrus CI / Windows - Server 2019, VS 2019" workflow doesn’t have any issues with them. I’ve removed the flag. > + my @files = glob("*"); > + system_or_bail($tar, 

Re: Support specify tablespace for each merged/split partition

2024-08-05 Thread Amul Sul
On Mon, Jul 15, 2024 at 11:19 AM Junwang Zhao wrote: > > In [1], it is suggested that it might be a good idea to support > specifying the tablespace for each merged/split partition. > > We can do the following after this feature is supported: > > CREATE TABLESPACE tblspc LOCATION '/tmp/tblspc'; >

Re: pg_verifybackup: TAR format backup verification

2024-08-05 Thread Amul Sul
On Mon, Aug 5, 2024 at 10:29 PM Robert Haas wrote: > > On Fri, Aug 2, 2024 at 7:43 AM Amul Sul wrote: > > Please consider the attached version for the review. > > Thanks. I committed 0001-0003. The only thing that I changed was that > in 0001, you forgot to pgindent, wh

Re: Support specify tablespace for each merged/split partition

2024-08-06 Thread Amul Sul
On Mon, Aug 5, 2024 at 9:05 PM Junwang Zhao wrote: > > Hi Amul, > > Thanks for your review. > > On Mon, Aug 5, 2024 at 8:38 PM Amul Sul wrote: > > > > On Mon, Jul 15, 2024 at 11:19 AM Junwang Zhao wrote: > > > > >[...] > > static Relat

Re: pg_combinebackup does not detect missing files

2024-08-06 Thread Amul Sul
On Fri, Aug 2, 2024 at 7:07 PM Robert Haas wrote: > > On Fri, Apr 19, 2024 at 11:47 AM Robert Haas wrote: > > > [...] > Here is a rebased version of the patch. No other changes since v1. > Here are two minor comments on this: $ pg_combinebackup /tmp/backup_full/ /tmp/backup_incr2/ /tmp/backup_

Re: pg_verifybackup: TAR format backup verification

2024-08-07 Thread Amul Sul
On Tue, Aug 6, 2024 at 10:39 PM Robert Haas wrote: > > On Thu, Aug 1, 2024 at 9:19 AM Amul Sul wrote: > > > I think I would have made this pass context->show_progress to > > > progress_report() instead of the whole verifier_context, but that's an > > > ar

Re: pg_verifybackup: TAR format backup verification

2024-08-07 Thread Amul Sul
On Wed, Aug 7, 2024 at 9:12 PM Robert Haas wrote: > > [ I committed 0001, then noticed I had a type in the subject line of > the commit message. Argh. ] > > On Wed, Aug 7, 2024 at 9:41 AM Amul Sul wrote: > > With the patch, I am concerned that we won't be able to giv

Re: pg_verifybackup: TAR format backup verification

2024-08-12 Thread Amul Sul
On Wed, Aug 7, 2024 at 11:28 PM Robert Haas wrote: > > On Wed, Aug 7, 2024 at 1:05 PM Amul Sul wrote: > > The main issue I have is computing the total_size of valid files that > > will be checksummed and that exist in both the manifests and the > > backup, in the ca

Re: pg_verifybackup: TAR format backup verification

2024-08-14 Thread Amul Sul
On Tue, Aug 13, 2024 at 10:49 PM Robert Haas wrote: > > On Mon, Aug 12, 2024 at 5:13 AM Amul Sul wrote: > > I tried this in the attached version and made a few additional changes > > based on Sravan's off-list comments regarding function names and > > descriptio

Ineffective Assert-check in CopyMultiInsertInfoNextFreeSlot()

2024-08-16 Thread Amul Sul
Hi, The Assert(buffer != NULL) is placed after the buffer is accessed, which could lead to a segmentation fault before the check is executed. Attached a small patch to correct that. -- Regards, Amul Sul EDB: http://www.enterprisedb.com diff --git a/src/backend/commands/copyfrom.c b/src/backend

Re: CI cpluspluscheck failures

2024-08-19 Thread Amul Sul
acb44cfb526bdabcd3a3d9c06443f1 Mon Sep 17 00:00:00 2001 From: Amul Sul Date: Tue, 20 Aug 2024 09:44:56 +0530 Subject: [PATCH] Remove unnecessary #include statements. --- src/bin/pg_verifybackup/pg_verifybackup.c | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/bin/pg_verify

Re: pg_verifybackup: TAR format backup verification

2024-08-20 Thread Amul Sul
etical: you added .tgz elsewhere > but not here. > Did this way. > There's probably more to look at here but I'm running out of energy for today. > Thank you for the review and committing 0004 and 0006 patches. Regards, Amul From dfaeebdc09fd689b7e45a705e32111cb226a0

<    1   2   3   4   5   >