Re: pgsql: At promotion, archive last segment from old timeline with .parti

From: Peter Eisentraut <peter_e(at)gmx(dot)net>
To: Heikki Linnakangas <heikki(dot)linnakangas(at)iki(dot)fi>, pgsql-committers(at)postgresql(dot)org
Subject: Re: pgsql: At promotion, archive last segment from old timeline with .parti
Date: 2015-05-22 16:05:36
Message-ID: 555F53D0.7050506@gmx.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On 5/8/15 3:07 PM, Heikki Linnakangas wrote:
> At promotion, archive last segment from old timeline with .partial suffix.

There appears to be a mixup here:

+ char origpath[MAXPGPATH];
+ char partialfname[MAXFNAMELEN];
+ char partialpath[MAXPGPATH];
+
+ XLogFilePath(origpath, EndOfLogTLI, endLogSegNo);
+ snprintf(partialfname, MAXPGPATH, "%s.partial", origfname);
+ snprintf(partialpath, MAXPGPATH, "%s.partial", origpath);

Some compilers are complaining that the snprintf(partialfname, ...)
could overflow.

In response to

Browse pgsql-committers by date

  From Date Subject
Next Message Alvaro Herrera 2015-05-22 18:08:07 Re: [COMMITTERS] pgsql: Row-Level Security Policies (RLS)
Previous Message Andrew Dunstan 2015-05-22 14:33:01 pgsql: Unpack jbvBinary objects passed to pushJsonbValue

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2015-05-22 16:09:25 Re: pg_dump quietly ignore missing tables - is it bug?
Previous Message Tom Lane 2015-05-22 16:02:11 Re: Run pgindent now?