Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers - Mailing list pgsql-hackers

From Petr Jelinek
Subject Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers
Date
Msg-id 65453ced-5ddd-b1f4-9ffa-c474c0449afd@2ndquadrant.com
Whole thread Raw
In response to Re: Re: BUGFIX: standby disconnect can corrupt serialized reorder buffers  (Craig Ringer <craig@2ndquadrant.com>)
List pgsql-hackers
On 06/03/18 09:37, Craig Ringer wrote:
> 
>     Revised patch attached.
> 
>     I have _not_ rewritten to use sscanf yet. I'll do that next, so you
>     can choose the fewer-changes patch for backpatching if desired. 
> 
> 
> ... and I'm not convinced it's really an improvement.
> 
>         uint32 xid, lsn_high, lsn_low;
> 
>         if (sscanf(spill_de->d_name, REORDERBUFFER_TXN_FILENAME_FORMAT,
>                xid, lsn_high, lsn_low) == 3)
>         {
> 
> since we don't use the scanned-out information.
> 
> I guess my answer to causing problems if you create a file named
> "xidfoo" in a slot directory is yeah, don't do that.
> 
> Note that this patch changes the PANIC to ERROR. This will promote to
> FATAL during the startup process, which I think is fine. Objections?
> 
You mean because PG_exception_stack is not initialized for startup
process? That deserves comment I think.

Other than that if I am very nitpicky, I'd call the new function
ReorderBufferCleanupSerializedTXNs.

-- 
  Petr Jelinek                  http://www.2ndQuadrant.com/
  PostgreSQL Development, 24x7 Support, Training & Services


pgsql-hackers by date:

Previous
From: Darafei "Komяpa" Praliaskouski
Date:
Subject: Re: All Taxi Services need Index Clustered Heap Append
Next
From: Sergei Kornilov
Date:
Subject: Re: using index or check in ALTER TABLE SET NOT NULL