RE: Reject negative max_retention_duration values - Mailing list pgsql-hackers

From Hayato Kuroda (Fujitsu)
Subject RE: Reject negative max_retention_duration values
Date
Msg-id OS9PR01MB12149836FBEA44F70CE3CBFD5F51D2@OS9PR01MB12149.jpnprd01.prod.outlook.com
Whole thread
Responses Re: Reject negative max_retention_duration values
List pgsql-hackers
Dear Chao,

+1 the idea to reject the negative value.

```
@@ -4796,7 +4796,7 @@ should_stop_conflict_info_retention(RetainDeadTuplesData *rdt_data)
     Assert(rdt_data->phase == RDT_WAIT_FOR_PUBLISHER_STATUS ||
            rdt_data->phase == RDT_WAIT_FOR_LOCAL_FLUSH);
 
-    if (!MySubscription->maxretention)
+    if (MySubscription->maxretention <= 0)
         return false;
```

IIUC, the negative value can be rejected at CREATE/ALTER SUBSCRIPTION phase, right?
Why do we have to update even here? For the clarification purpose?

Best regards,
Hayato Kuroda
FUJITSU LIMITED

pgsql-hackers by date:

Previous
From: Marcos Pegoraro
Date:
Subject: Re: Get rid of "Section.N.N.N" on DOCs
Next
From: Henson Choi
Date:
Subject: Re: Row pattern recognition