Return value of pg_promote() - Mailing list pgsql-hackers

From Ashutosh Sharma
Subject Return value of pg_promote()
Date
Msg-id CAE9k0P=QTrwptL0t4J0fuBRDDjgsT-0PVKd-ikd96i1hyL7Bcg@mail.gmail.com
Whole thread Raw
Responses Re: Return value of pg_promote()
List pgsql-hackers
Hi All,

At present, pg_promote() returns true to the caller on successful
promotion of standby, however it returns false in multiple scenarios
which includes:

1) The SIGUSR1 signal could not be sent to the postmaster process.
2) The postmaster died during standby promotion.
3) Standby couldn't be promoted within the specified wait time.

For an application calling this function, if pg_promote returns false,
it is hard to interpret the reason behind it. So I think we should
*only* allow pg_promote to return false when the server could not be
promoted in the given wait time and in other scenarios it should just
throw an error (FATAL, ERROR ... depending on the type of failure that
occurred). Please let me know your thoughts on this change. thanks.!

--
With Regards,
Ashutosh Sharma.



pgsql-hackers by date:

Previous
From: Amit Kapila
Date:
Subject: Re: Support logical replication of DDLs
Next
From: Peter Eisentraut
Date:
Subject: Re: Simplify pg_collation.collversion for Windows libc