Skip site navigation (1) Skip section navigation (2)

Re: [HACKERS] Moving tablespaces

From: Magnus Hagander <magnus(at)hagander(dot)net>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: Andrew Dunstan <andrew(at)dunslane(dot)net>, Bruce Momjian <bruce(at)momjian(dot)us>, PostgreSQL-documentation <pgsql-docs(at)postgresql(dot)org>, PostgreSQL-development <pgsql-hackers(at)postgresql(dot)org>
Subject: Re: [HACKERS] Moving tablespaces
Date: 2011-12-07 09:38:59
Message-ID: CABUevEwM9x1LWkS7XhTTDqP=OAgoApuik+4js9FK3RuwdbuDfA@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-docspgsql-hackers
On Wed, Dec 7, 2011 at 10:05, Magnus Hagander <magnus(at)hagander(dot)net> wrote:
> On Tue, Dec 6, 2011 at 17:07, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Magnus Hagander <magnus(at)hagander(dot)net> writes:
>>> There is some nice precedent in the CREATE TABLESPACE command (though
>>> dependent on HAVE_SYMLINK and not HAVE_READLINK), so I'm just going to
>>> copy the error message from there.
>>
>> Fair enough.
>>
>> Looking at the existing readlink use in port/exec.c, it strikes me that
>> another thing you'd better do is include a check for buffer overrun,
>> ie the test needs to be more like
>>
>>                rllen = readlink(fname, link_buf, sizeof(link_buf));
>>                if (rllen < 0 || rllen >= sizeof(link_buf))
>>                        ... fail ...
>
> Seems reasonable, yeah. I'll go put a similar check in the
> basebackup.c file as well when I'm done here.

To close this thread (hopefully): Fixed and applied.

-- 
 Magnus Hagander
 Me: http://www.hagander.net/
 Work: http://www.redpill-linpro.com/

In response to

pgsql-docs by date

Next:From: Jaime CasanovaDate: 2011-12-09 21:09:25
Subject: CREATE USER
Previous:From: Magnus HaganderDate: 2011-12-07 09:05:19
Subject: Re: [HACKERS] Moving tablespaces

pgsql-hackers by date

Next:From: Teodor SigaevDate: 2011-12-07 10:09:44
Subject: Re: WIP: SP-GiST, Space-Partitioned GiST
Previous:From: Magnus HaganderDate: 2011-12-07 09:05:19
Subject: Re: [HACKERS] Moving tablespaces

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group