Hi!
just playing with tablespaces...
- moved a existing table to a new tablespace
- tried to move it back to default tablespace
(ALTER TABLE accounts SET TABLESPACE pg_default;)
Got the following error in logfile:
ERROR: could not create relation 1663/317186/317191: Permission denied
Any suggestions?
Best regards,
Christian
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend 5 3319
Christian Traber wrote: Hi!
just playing with tablespaces...
- moved a existing table to a new tablespace - tried to move it back to default tablespace (ALTER TABLE accounts SET TABLESPACE pg_default;)
Got the following error in logfile:
ERROR: could not create relation 1663/317186/317191: Permission denied
Any suggestions?
are you able to create new tables in the default tablespace ? looks
like a permission issue did you initdb a fresh folder see if the
owner of $PGDATA/data/base is the user that running postmaster
(usually postgres) . It works fine for me though
Regds
mallah
test=# \d t_b
Table "public.t_b "
Column | Type | Modifiers
--------+---------+-----------
a | integer |
Tablespace: "space"
test=# ALTER TABLE t_b SET TABLESPACE pg_default;
ALTER TABLE
test=# SELECT version();
version
--------------------------------------------------------------------------------------------------------------
PostgreSQL 8.0.0beta1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC)
3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk)
(1 row)
test=# Best regards, Christian
---------------------------(end of broadcast)--------------------------- TIP 8: explain analyze is your friend
--
regds
Mallah.
Rajesh Kumar Mallah
+---------------------------------------------------+
| Tradeindia.com (3,11,246) Registered Users |
| Indias' Leading B2B eMarketPlace |
| http://www.tradeindia.com/ |
+---------------------------------------------------+
Rajesh Kumar Mallah wrote: are you able to create new tables in the default tablespace ?
Yes, permissions are ok.
looks like a permission issue did you initdb a fresh folder see if the owner of $PGDATA/data/base is the user that running postmaster (usually postgres) . It works fine for me though
initdb was run by windows installer Regds mallah
test=# \d t_b Table "public.t_b " Column | Type | Modifiers --------+---------+----------- a | integer | Tablespace: "space"
test=# ALTER TABLE t_b SET TABLESPACE pg_default; ALTER TABLE test=# SELECT version(); version -------------------------------------------------------------------------------------------------------------- PostgreSQL 8.0.0beta1 on i686-pc-linux-gnu, compiled by GCC gcc (GCC) 3.3.2 (Mandrake Linux 10.0 3.3.2-6mdk) (1 row)
test=#
Maybe its only win32 version?
Here what i tried:
CREATE TABLE test (name varchar(100));
CREATE TABLE
CREATE TABLESPACE test LOCATION 'C:\\tmp\\ts_te st';
CREATE TABLESPACE
\db
List of tablespaces
Name | Owner | Location
------------+----------+----------------
pg_default | postgres |
pg_global | postgres |
test | postgres | C:/tmp/ts_test
(3 rows)
ALTER TABLE test SET TABLESPACE test;
ALTER TABLE
\d+ test
Table "public.tes t"
Column | Type | Modifiers | Description
--------+------------------------+-----------+-------------
name | character varying(100) | |
Contains OIDs: yes
Tablespace: "test"
ALTER TABLE test SET TABLESPACE pg_default;
ERROR: could not create relation 1663/317186/1317654: Permission denied
select version();
version
----------------------------------------------------------------------------------------------------------
PostgreSQL 8.0.0beta1 on i686-pc-mingw32, compiled by GCC gcc.exe
(GCC) 3.2.3 (mingw special 20030504-1)
(1 row)
Thanks and regards
Christian
---------------------------(end of broadcast)---------------------------
TIP 6: Have you searched our list archives? http://archives.postgresql.org
Christian Traber <ch*******@trab er-net.de> writes: Maybe its only win32 version?
Well, I can't reproduce it on Unix. It seems awfully odd though that
you can create tables in that tablespace to begin with but can't move
them there. I'm cc'ing this to the pgsql-hackers-win32 to see if anyone
there has a clue ...
regards, tom lane
Here what i tried:
CREATE TABLE test (name varchar(100)); CREATE TABLE
CREATE TABLESPACE test LOCATION 'C:\\tmp\\ts_te st'; CREATE TABLESPACE
\db List of tablespaces Name | Owner | Location ------------+----------+---------------- pg_default | postgres | pg_global | postgres | test | postgres | C:/tmp/ts_test (3 rows)
ALTER TABLE test SET TABLESPACE test; ALTER TABLE
\d+ test Table "public.tes t" Column | Type | Modifiers | Description --------+------------------------+-----------+------------- name | character varying(100) | | Contains OIDs: yes Tablespace: "test"
ALTER TABLE test SET TABLESPACE pg_default; ERROR: could not create relation 1663/317186/1317654: Permission denied
select version(); version
---------------------------------------------------------------------------------------------------------- PostgreSQL 8.0.0beta1 on i686-pc-mingw32, compiled by GCC gcc.exe (GCC) 3.2.3 (mingw special 20030504-1) (1 row)
---------------------------(end of broadcast)---------------------------
TIP 4: Don't 'kill -9' the postmaster
Tom Lane wrote: Christian Traber <ch*******@trab er-net.de> writes:
Maybe its only win32 version?
Well, I can't reproduce it on Unix. It seems awfully odd though that you can create tables in that tablespace to begin with but can't move them there. I'm cc'ing this to the pgsql-hackers-win32 to see if anyone there has a clue ...
I just reproduced this on win32. The file already exists, and is locked.
Apparently, in this case it's the very same backend that's locking the
file; closing the connection that was used to move the table into the
other tablespace will remove the file immediately.
Regards,
Andreas
---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ma*******@postg resql.org
Andreas Pflug <pg*****@pse-consulting.de> writes: I just reproduced this on win32. The file already exists, and is locked.
Oh, I'll bet it's the original copy of the table that hasn't been
removed yet. We may have an issue with SET TABLESPACE failing to close
the old file, so it can't be deleted yet on Windows ...
regards, tom lane
---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: Peter Jenny |
last post by:
Hi NG
what is the easiest way to move a table from one tablespace to another ?
Thanks
Peter
|
by: xixi |
last post by:
There is one thing I don't understand, I have default tablespace
userspace1 is database managed type, with total freepages 506048.
another one called tmpxx is DMS type too, with 525120 free pages. When
I create a new table (did not specify on which tablespace), why the
table not created on the userspace1 but instead on tmpxx? what is the
rule to create a table on tablespace without specify in which
tablespace
if I have both tablespace...
|
by: robert |
last post by:
just got out of a "class" on EXPLAIN, from a 390/v6 maven. was told
that ACCESSTYPE = 'R' in the plan_table meant a TableSpace scan.
hmmmm. next step up (or down, depending on your outlook) wasn't a
Table Scan.
thought this might be a MainFrame thing; but a look at DB2Info on my
UDB 7.2 server showed the same thing.
this is truly puzzling. is there an explanation of EXPLAIN which
describes how to get a Table Scan???? or are we...
|
by: db2dude |
last post by:
Hello all,
I have a database around 600GB and all tables were self-created by the
application. Hence, we have only one huge SMS tablespace where all the
tables are stored. To get better performance, we are planning to move
the tables to a DMS tablespace with multiple containers. There are LOTS
of tables and some tables have almost 40GB of data. Can you please
suggest and efficient way of doing this.
Also, I know that even a 32KB page...
|
by: fuzzybr80 |
last post by:
I am using MySQL 5.0 with a number of innodb tables whose ibdata files
are growing quite quickly and filling up the /var partition (file is
/var/mysql/ibdata1). Earlier on I followed instructions in the docs to
create a new ibdata file on a bigger partition
/disk2/var/mysql/ibdata2) and set that to autoextend instead.
However I would like to reclaim the disk space on /var by moving the
existing ibdata1 file to /disk2/var/mysql/ibdata1....
| |
by: rAinDeEr |
last post by:
Hi,
I have Db2 9 installed in Windows. Am trying to create a table with the
following DDL
CREATE TABLE DB2N.T_CO (
a1 VARCHAR(100) NOT NULL,
b1 VARCHAR(255),
c1 VARCHAR(255),
d1 VARCHAR(255),
|
by: Sam Durai |
last post by:
Env: DB2 v9.1 Server / Win XP. DB is enabled for Archival Logging.
Was playing around with rebuild tablespace feature. My database 'CARD'
has tablespace named t1,t2,t3.
Taken couple of individual tablespace backup as below
C:\dir1>db2 "backup db card tablespace(syscatspace,userspace1,t1)"
Backup successful. The timestamp for this backup image is :
20070402114435
|
by: Troels Arvin |
last post by:
Hello,
Every so often, I'm asked to help people recover data from tables that
were either dropped or where to much data was DELETEed.
The complications related to restoring data are a problem. The SAS users
are laughing because they can (to a certain extend) easily go back to an
earlier SAS table by simply starting dsm. Of course, a flat file table is
different than a relational table; but still, the trouble related to
restoring DB2...
|
by: happyse27 |
last post by:
Hi All,
I got this apache errors(see section A1 and A2 below) when I used a html(see section b below) to activate acctman.pl(see section c below). Section D below is part of the configuration of section c.
Not sure where went wrong as the web page displayed internal server error.
Also, what is the error 543? and error 2114. Where to find the list of errors in websites as it is not the standard apache error. I could not find...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
| |
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
by: tracyyun |
last post by:
Dear forum friends,
With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
by: isladogs |
last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM).
In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |