Thread: does postgres has snapshot standby feature?

does postgres has snapshot standby feature?

From
milist ujang
Date:
hi all,

read about removing standby.signal file behavior in pg14 from 

I was shocked about the hidden feature of snapshot standby, does it really exist?
I could not find anything about snapshot standby in docs so far.

I have removed the standby.signal file in pg12 but got strange behavior until I have to recreate the standby. 

--

Re: does postgres has snapshot standby feature?

From
Laurenz Albe
Date:
On Fri, 2022-10-14 at 16:20 +0700, milist ujang wrote:
> read about removing standby.signal file behavior in pg14 from 
> https://dbaclass.com/article/how-to-open-postgres-standby-database-for-read-writesnapshot-standby/
> 
> I was shocked about the hidden feature of snapshot standby, does it really exist?
> I could not find anything about snapshot standby in docs so far.

The referenced article talks about "pg_rewind", so look under that name.

> I have removed the standby.signal file in pg12 but got strange behavior until I have to recreate the standby.

If you removed the file, you did something wrong.
You have to promote the standby properly.

Yours,
Laurenz Albe
-- 
Cybertec | https://www.cybertec-postgresql.com



Re: does postgres has snapshot standby feature?

From
Christoph Moench-Tegeder
Date:
## milist ujang (ujang.milist@gmail.com):

> read about removing standby.signal file behavior in pg14 from
> https://dbaclass.com/article/how-to-open-postgres-standby-database-for-read-writesnapshot-standby/

That article is fractally wrong, and that starts right in the first
sentence. See
https://www.postgresql.org/docs/15/functions-info.html#FUNCTIONS-PG-SNAPSHOT
(not getting into detail discussions, but still).

Anyhow, the article does not discuss requirements and limitations of
pg_rewind, and promotes unsafe practices. After reading this article,
I'd be more than careful with anything else published by that source.

> I was shocked about the hidden feature of snapshot standby, does it really
> exist?

It's not an official feature. There's a limited amount of thing you can
get away with when breaking and rewinding replication, but the guarantees
on those are rather weak.

Regards,
Christoph

-- 
Spare Space.