Skip to content

Commit c6ad5c2

Browse files
author
Neil Conway
committed
Here's a tiny fix for a harmless typo in catalog.c:
Too much space is allocated for tablespace file path, I guess the directory name used to be "pg_tablespaces" instead of "pg_tblspc" at some point. Heikki Linnakangas
1 parent 1fcfa03 commit c6ad5c2

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/backend/catalog/catalog.c

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
*
1010
*
1111
* IDENTIFICATION
12-
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.57 2004/12/31 21:59:38 pgsql Exp $
12+
* $PostgreSQL: pgsql/src/backend/catalog/catalog.c,v 1.58 2005/03/07 04:15:34 neilc Exp $
1313
*
1414
*-------------------------------------------------------------------------
1515
*/
@@ -58,7 +58,7 @@ relpath(RelFileNode rnode)
5858
else
5959
{
6060
/* All other tablespaces are accessed via symlinks */
61-
pathlen = strlen(DataDir) + 16 + OIDCHARS + 1 + OIDCHARS + 1 + OIDCHARS + 1;
61+
pathlen = strlen(DataDir) + 11 + OIDCHARS + 1 + OIDCHARS + 1 + OIDCHARS + 1;
6262
path = (char *) palloc(pathlen);
6363
snprintf(path, pathlen, "%s/pg_tblspc/%u/%u/%u",
6464
DataDir, rnode.spcNode, rnode.dbNode, rnode.relNode);
@@ -99,7 +99,7 @@ GetDatabasePath(Oid dbNode, Oid spcNode)
9999
else
100100
{
101101
/* All other tablespaces are accessed via symlinks */
102-
pathlen = strlen(DataDir) + 16 + OIDCHARS + 1 + OIDCHARS + 1;
102+
pathlen = strlen(DataDir) + 11 + OIDCHARS + 1 + OIDCHARS + 1;
103103
path = (char *) palloc(pathlen);
104104
snprintf(path, pathlen, "%s/pg_tblspc/%u/%u",
105105
DataDir, spcNode, dbNode);

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy