First thought is make sure you are looking in the right database.
pg_locks shows data over the entire server, not just the connected database.
pg_class exists for each database so if you are connected to 'my_database' but
the object is in 'your_database', it won't show up in pg_class on 'my_data
I'd recommend setting up group roles (roles which cannot login) to grant
your various permission sets to, and then add users to the appropriate
groups, using permission inheritence. Then any grants/revokes you make in
the future to the groups automatically apply to the users. You may wish to
divi
"Campbell, Lance" writes:
> What I see:
> UPDATE abc.table set def=$1 WHERE id=$2
> What I want to see:
> UPDATE abc.table set def='hi bob' WHERE id=12
It doesn't work that way. What you should be seeing, though, is that
the value of each parameter is included in a DETAIL line just after
the st
Shams Khan writes:
> I want to check the last reset valued of sequence and the date of foreign
> key constraint when it was created. Is that possible in postgres 9.1
> version??
No, the system doesn't track any such thing. You could possibly set
log_statement to record all commands of interest i
I got a way which works fine: use bigint first, and then convert it to bit(32),
and convert it to int4 at last.
declare i integer := 0;
declare h bigint := 0;
begin
for i in 1..length(str) loop
h = (h * 31 + ascii(substring(str, i, 1))) & 4294967295;
end loop;
return cast(cast(h as bit(
I got a way which works fine: use bigint first, and then convert it to bit(32),
and convert it to int4 at last.
declare i integer := 0;
declare h bigint := 0;
begin
for i in 1..length(str) loop
h = (h * 31 + ascii(substring(str, i, 1))) & 4294967295;
end loop;
return cast(cast(h as bit(
On Thu, Sep 20, 2012 at 7:56 PM, Haifeng Liu wrote:
>
> On Sep 20, 2012, at 10:34 PM, Craig James wrote:
>
>
>
> On Thu, Sep 20, 2012 at 1:55 AM, Haifeng Liu wrote:
>
>> I want to write a hash function which acts as String.hashCode() in java:
>> hash = hash * 31 + s.charAt(i)... but I got integ
On Sep 20, 2012, at 10:34 PM, Craig James wrote:
>
>
> On Thu, Sep 20, 2012 at 1:55 AM, Haifeng Liu wrote:
> I want to write a hash function which acts as String.hashCode() in java: hash
> = hash * 31 + s.charAt(i)... but I got integer out of range error. How can I
> avoid this? I saw java
On Thu, Sep 20, 2012 at 1:55 AM, Haifeng Liu wrote:
> I want to write a hash function which acts as String.hashCode() in java:
> hash = hash * 31 + s.charAt(i)... but I got integer out of range error. How
> can I avoid this? I saw java do not care overflow of int, it just make the
> result negati
On Aug 9, 2012, at 7:11 PM, Sergey Konoplev
wrote:
> On Thu, Aug 9, 2012 at 2:53 PM, Sergey Konoplev
> wrote:
>>> How can I make the row changes inside the trigger function visible to the
>>> top level statement?
>>
>> your redirecting function is okay. However the only way to get the
>> ins
On Thu, Aug 9, 2012 at 2:53 PM, Sergey Konoplev
wrote:
>> How can I make the row changes inside the trigger function visible to the
>> top level statement?
>
> your redirecting function is okay. However the only way to get the
> inserted row back is to do it from a subsequent statement in the
> p
On Mon, Aug 6, 2012 at 1:14 PM, haifeng liu wrote:
> Hello,
>
> I am doing table partitioning, all is ok except that after executing 'insert'
> sql statement I can't get affected rows, it always be 0. After searching on
> the documents, I found that row changes inside trigger function is not
>
On 08/06/2012 06:50 PM, Haifeng Liu wrote:
Hello,
I am doing table partitioning, all is ok except that after executing 'insert'
sql statement I can't get affected rows, it always be 0. After searching on the
documents, I found that row changes inside trigger function is not visible to
the top
* Craig Ringer wrote:
On 06/16/2012 08:36 PM, Christian Ullrich wrote:
The one-click installer (assuming you used that) left you with
PostgreSQL running under a local account named "postgres". First, you
have to change that, because SSPI requires that the service uses a
domain account:
That
On 06/16/2012 08:36 PM, Christian Ullrich wrote:
* Peter Cheung wrote:
I’m new to PostgreSQL. I installed PostgreSQL on a Windows Server
2008
R2 server. I have created a database and an user in Windows Active
Directory. How can I configure that user to access that database?
The one-cli
* Peter Cheung wrote:
I’m new to PostgreSQL. I installed PostgreSQL on a Windows Server 2008
R2 server. I have created a database and an user in Windows Active
Directory. How can I configure that user to access that database?
The one-click installer (assuming you used that) left you with
On Jun 13, 2012 4:21 AM, "Craig Ringer" wrote:
>
> On 06/13/2012 02:37 AM, Peter Cheung wrote:
>>
>> According to http://www.postgresql.org/docs/9.1/static/auth-methods.html,
SSPI only works when GSSAPI is available and GSSAPI support has to be
enabled when PostgreSQL is built. Does it mean that
On 06/13/2012 02:37 AM, Peter Cheung wrote:
According to
http://www.postgresql.org/docs/9.1/static/auth-methods.html, SSPI only
works when GSSAPI is available and GSSAPI support has to be enabled
when PostgreSQL is built. Does it mean that I need to uninstall
PostgreSQL and reinstall it wi
installer downloaded
from http://www.postgresql.org/download/windows to install PostgreSQL and I'm
not sure how to include GSSAPI support.
From: Craig Ringer [mailto:ring...@ringerc.id.au]
Sent: Tuesday, June 12, 2012 1:11 AM
To: Peter Cheung
Cc: 'pgsql-admin@postgresql.org'
Subject: Re:
On 06/12/2012 10:00 AM, Peter Cheung wrote:
Hi,
I'm new to PostgreSQL. I installed PostgreSQL on a Windows Server
2008 R2 server. I have created a database and an user in Windows
Active Directory. How can I configure that user to access that database?
By default, Windows users and Pos
On Thu, Jun 7, 2012 at 8:12 AM, ROMAIN, ERICKA W CTR DISA PEO-MA
wrote:
> I am trying to get Postgres to use SHA as the password hash algorithm instead
> of MD5. This is a security requirement. I am running PostgreSQL 8.4 on a Red
> Hat Linux platform. I have installed pgcrypto and ran pgcrypto.
hi, i tried the exact setup that you described here, but unfortunately i had to
restart the new master(former slave) in order to get the new settings and this
will conduct to a downtime and service interruption.
anyway thanks for sharing your experience.
Adrian Videanu
--- On Fri, 4/20/12, jen
hi
we did a new shell script named recovery_config_chage.sh at standby server.
the script I wanted to change the fail down postgres master config ,let it
start as standby server
and build the communication with the former standby now is master server,then
started it by remotestart.sh
the abo
so, just to make sure that i understand:
after the master failed, the slave become the new master, the you have changed
postgresql.conf from master to slave and viceversa and restarted the old master
as slave ?
--- On Thu, 4/19/12, jenopob [via PostgreSQL]
wrote:
From: jenopob [via PostgreSQ
Hi there,
i have the exact same problem. Did you find a solution for this ?
thanks,
Adrian Videanu
--
View this message in context:
http://postgresql.1045698.n5.nabble.com/How-to-auto-swtich-the-roles-of-primary-and-standby-tp4546630p5645680.html
Sent from the PostgreSQL - admin mailing list arc
Piyush Lenka wrote:
> How can i backup only 5 records from that table using pg_dump or psql
or
> both.
In psql:
\copy ( select * from that_table where ... ) to 'filename'
http://www.postgresql.org/docs/9.1/interactive/app-psql.html
Search the page for \copy
-Kevin
--
Sent via pgsql-a
> > So I've stopped software caused these inserts and deletes, but
> > reindexing shows same warnings. I've restarted postgresql server.
>
> How did you restart PostgreSQL?
>
> If there were backends hung in the vfs, did the eventually terminate
> by themselves? If not, did you terminate them you
On 09/11/11 21:37, Ruslan A. Bondar wrote:
> This database isn't mission critical, so if you want - I can
experiment on this.
Brilliant! It's rare for people to be able to investigate issues like
this, most of the time they just have to get up and running ASAP and
often destroy data required to u
"Ruslan A. Bondar" wrote:
> No, this was a clean install of 9.0.x.
Then it isn't related to the issue I raised.
> Maybe It was upgraded from 9.0.3 to 9.0.4. I'm not sure.
You don't normally use pg_upgrade for that; this was a pg_upgrade bug.
-Kevin
--
Sent via pgsql-admin mailing list
No, this was a clean install of 9.0.x.
Maybe It was upgraded from 9.0.3 to 9.0.4. I'm not sure.
On Wed, 09 Nov 2011 09:21:18 -0600
"Kevin Grittner" wrote:
> "Ruslan A. Bondar" wrote:
>
> > ERROR: could not access status of transaction 15892843
> > DETAIL: Could not open file "pg_subtrans/0
"Ruslan A. Bondar" wrote:
> ERROR: could not access status of transaction 15892843
> DETAIL: Could not open file "pg_subtrans/00F2": No such file or
directory.
> postgres version: 9.0.4
Did you move to 9.0.x using pg_upgrade version 9.0.3 or earlier?
http://wiki.postgresql.org/wiki/20110
There were no unexpected reboots.
First issue was some kind of deadlock (concurrent insert and concurrent delete
on a table) I saw them wile reindexing the database.
Also mesages like this were in dmesg:
[3681001.529179] INFO: task postgres:12432 blocked for more than 120 seconds.
[3681001.52919
On 11/09/2011 07:02 PM, Ruslan A. Bondar wrote:
Hello all.
This is a first time I receive such an issue.
My database was corrupted some way.
Before you do ANYTHING else, make a copy of your database somewhere
safe. See:
http://wiki.postgresql.org/wiki/Corruption
When I'm trying to access the
"Gnanakumar" writes:
> My question is, how do I find out or REINDEX *only* GiST indexes in the
> database? Is there a single syntax/command that does this?
You might find this article useful:
http://tapoueh.org/blog/2010/08/05-querying-the-catalog-to-plan-an-upgrade.html
Regards,
--
Dimitr
"Gnanakumar" wrote:
> how do I find out or REINDEX *only* GiST indexes in the
> database? Is there a single syntax/command that does this?
I would probably capture the output from:
SELECT indexdef || ';'
FROM pg_indexes
WHERE indexdef ~ ' USING gist ';
-Kevin
--
Sent via pgsql-admin
"Gnanakumar" writes:
> My question is, how do I find out or REINDEX *only* GiST indexes in the
> database? Is there a single syntax/command that does this?
You could do something like
select relname from pg_class where relam = (select oid from pg_am where amname
= 'gist');
Στις Wednesday 12 October 2011 15:46:45 ο/η Gnanakumar έγραψε:
> Hi,
>
> We're planning to upgrade our Production server from PostgreSQL v8.2.3 to
> the latest version in 8.2 series, that is v8.2.22.
>
> In 8.2.11 Release Notes here
> http://www.postgresql.org/docs/current/interactive/release-8
Thanks for the information Tom.
It solved my confusion.
On Sun, Sep 18, 2011 at 10:03 PM, Tom Lane wrote:
> Craig Ringer writes:
> > On 18/09/2011 5:51 PM, Melaka Gunasekara wrote:
> >> Merge Full Join (cost=174.40..193.69 rows=1159
> width=286)
>
> >> Can you suggest why the me
Craig Ringer writes:
> On 18/09/2011 5:51 PM, Melaka Gunasekara wrote:
>> Merge Full Join (cost=174.40..193.69 rows=1159 width=286)
>> Can you suggest why the merge join is being suggested when I have
>> turned it off ?
> AFAIK SETting a join type to "off" really just increases
On 18/09/2011 5:51 PM, Melaka Gunasekara wrote:
Merge Full Join (cost=174.40..193.69 rows=1159 width=286)
Can you suggest why the merge join is being suggested when I have
turned it off ?
AFAIK SETting a join type to "off" really just increases the cost
estimate so high th
Hi Raghavendra,
Thanks for your quick reply,
I did as you suggessted and following is my output.
melaka=# set enable_mergejoin to off;
SET
melaka=# show enable_mergejoin;
enable_mergejoin
--
off
(1 row)
Then I executed the following query
melaka=# EXPLAIN select * from distribu
postgres=# set enable_hashjoin to off;
SET
postgres=# show enable_hashjoin;
enable_hashjoin
-
off
(1 row)
Above, changes applies for the current session (its Session-Level). If you
want to do at Database-level use ALTER DATABASE and for entire Cluster-level
edit postgresql.conf a
> -Original Message-
> From: pgsql-admin-ow...@postgresql.org [mailto:pgsql-admin-
> ow...@postgresql.org] On Behalf Of Bill MacArthur
> Sent: Friday, August 26, 2011 10:21 AM
> To: pgsql-admin@postgresql.org
> Subject: [ADMIN] how to tell if a replication server has stopped
> replicating
A J wrote:
> I am running a test to find the impact of corrupt indexes on
> queries. I corrupted the index file but observed that the queries
> continued to perform without issues. It was only on restart of the
> database that postgres realized that the indexes are corrupt and
> my queries start
Christoph Anton Mitterer
wrote:
> Well I'm still very unsure on how to configure many values...
> We've increased e.g. shared_buffers, temp_buffers, work_mem,
> maintenance_work_mem, max_stack_depth... and this greatly improved
> performance. But I can hardly judge to which values I should
> in
Hi,
On 14 July 2011 14:17, Jenish Vyas wrote:
> Hi All,
> Can you guide me how to find out the read activities for stored functions in
> database?
> (How many times function called in specific time frame)
I hope this will help you
http://www.postgresql.org/docs/current/interactive/pgstatstatemen
>Christoph Anton Mitterer
wrote:
> What we have here at the institute is a quite powerful server,
> whit about 100GB RAM that has a PostgreSQL running on it (with
> several DBs).
In one cluster (postmaster instance) or separate?
> Currently it's 8.4 but we shall switch to 9.x eventually. Th
2011/7/14 Christoph Anton Mitterer
:
> Hi.
>
> I've read through the documentation and while I've seen dozens of
> options which allow to set which kind of buffer/cache/shared-mem gets
> how big... I do not quite understand how to reach the following.
>
> What we have here at the institute is a qui
hi
you could use pgpool-II failover_command to trigger the script what you want
to
something you can take at
http://pgpool.projects.postgresql.org/pgpool-II/doc/pgpool-en.html
and pgpool-II works in Master/Slave Mode will meet your requirements
best regards
jenopob
--
View this message in c
On Sat, 2011-07-09 at 11:58 +, Greg Sabino Mullane wrote:
> > Is it possible to start a postgres cluster or 1 postgres database in
> > readonly mode? And - if yes - how can this be done?
>
> Clusterwide: edit postgresql.conf and set
> default_transaction_read_only = on;
>
> No restart needed,
-BEGIN PGP SIGNED MESSAGE-
Hash: RIPEMD160
> Is it possible to start a postgres cluster or 1 postgres database in
> readonly mode? And - if yes - how can this be done?
Clusterwide: edit postgresql.conf and set
default_transaction_read_only = on;
No restart needed, just a reload (HUP)
Hello
Στις Thursday 07 July 2011 10:26:19 ο/η Simon Riggs έγραψε:
> On Thu, Jul 7, 2011 at 8:08 AM, Paul Schluck wrote:
>
> > Is it possible to start a postgres cluster or 1 postgres database in
> > readonly mode? And - if yes - how can this be done?
>
> There is no formal, explicit command to d
On Thu, Jul 7, 2011 at 8:08 AM, Paul Schluck wrote:
> Is it possible to start a postgres cluster or 1 postgres database in
> readonly mode? And - if yes - how can this be done?
There is no formal, explicit command to do that. Just avoid doing
writes, either in the application or by removing priv
On Thu, Jun 23, 2011 at 2:41 PM, Kevin Grittner wrote:
> "Kevin Grittner" wrote:
>
> > || ' set schema newschema;'
>
> Oops; you wanted to change the owner, but I'll leave that as an
> exercise for the reader. :-)
>
>
Beat me to it :)
Replace , and
psql -qAt -d -c "SELECT 'AL
"Kevin Grittner" wrote:
> || ' set schema newschema;'
Oops; you wanted to change the owner, but I'll leave that as an
exercise for the reader. :-)
-Kevin
--
Sent via pgsql-admin mailing list (pgsql-admin@postgresql.org)
To make changes to your subscription:
http://www.postgre
"Campbell, Lance" wrote:
> PostgreSQL: 9.0.x
>
> How do I change the ownership of all objects within a schema from
> X to Y? The objects within each schema would be tables and
> sequences.
I would use DO statements. What could be done as a one-liner to
handle the tables is shown below with
On 06/20/2011 09:23 AM, Nils Gösche wrote:
Can I simply use the 9.0.4 pg_upgrade on this since the bug has been fixed
in 9.0.4, or would I first have to upgrade the 8.4 installation to 8.4.8?
Unless this 8.4 install was itself upgraded from 8.3 using pg_upgrade,
you can go right from 8.4.3
Hello there...
If you perform a fresh installation from source code, you can have a better
control of that issue.
Cheers,
Marcelo Leite
Mlondolozi Ncapayi wrote:
> I installed PostgreSql 8.4 and now I want to delete/ uninstall it
> completely to start a new fresh installation.
> Can you please give me clear instructions on how to do that or
> maybe a script that I can run.
That's going to depend entirely on how you installed
On 11-04-13 12:37 PM, Kevin Grittner wrote:
Eric Comeau wrote:
We currently have statement timeout set
statement_timeout = 1080 # 3 hrs
and we receive the following in the postgresql.log
[1-1] ERROR: canceling statement due to statement timeout
Is there a way to have the
Eric Comeau wrote:
> We currently have statement timeout set
>
> statement_timeout = 1080 # 3 hrs
>
> and we receive the following in the postgresql.log
>
>[1-1] ERROR: canceling statement due to statement timeout
>
> Is there a way to have the SQL statement logged as well?
* Gnanakumar wrote:
We're using PostgreSQL v8.2.3.
How do I get the schema name in which TEMPORARY table is created using
"CREATE TEMP TABLE mytable " syntax?
SELECT nspname FROM pg_namespace WHERE oid = pg_my_temp_schema();
I don't have an 8.2.3 lying around, but git says that function
>> How do I get the schema name in which TEMPORARY table is created using
>> "CREATE TEMP TABLE mytable " syntax?
> Do you need the real schema name, or will the "pg_temp" alias be
> sufficient?
I need the real schema name (for example, pg_temp_xxx) in which it is
created and not just the ali
"Gnanakumar" writes:
> We're using PostgreSQL v8.2.3.
> How do I get the schema name in which TEMPORARY table is created using
> "CREATE TEMP TABLE mytable " syntax?
Do you need the real schema name, or will the "pg_temp" alias be
sufficient?
regression=# create temp table foo(f1 int);
CREA
> select n.nspname from pg_class c join pg_namespace n on
n.oid=c.relnamespace
> where c.relname ='foo' and n.nspname like 'pg_temp%';
This will return all the schema name that are available which were created
using TEMP TABLE syntax. Since our application is web-based, of course,
there will be
On Tuesday 08 March 2011 15:02:57 Gnanakumar wrote:
Hi,
> How do I get the schema name in which TEMPORARY table is created using
> "CREATE TEMP TABLE mytable " syntax?
select n.nspname from pg_class c join pg_namespace n on n.oid=c.relnamespace
where c.relname ='foo' and n.nspname like 'pg_
On Fri, Mar 04, 2011 at 08:37:46AM -0600, Kenneth Marshall wrote:
> On Thu, Mar 03, 2011 at 07:43:46PM -0800, Uwe Schroeder wrote:
> > > > Did you read the paragraph above?
> > > > Install latest version, and restart postmaster.
> > > Installing of latest version as-is will keep overwriting the exi
On Thu, Mar 03, 2011 at 07:43:46PM -0800, Uwe Schroeder wrote:
>
> > > ? Did you read the paragraph above?
> > >
> > > Install latest version, and restart postmaster.
> >
> > Installing of latest version as-is will keep overwriting the existing
> > installed directories/files/binaries but not th
> > ? Did you read the paragraph above?
> >
> > Install latest version, and restart postmaster.
>
> Installing of latest version as-is will keep overwriting the existing
> installed directories/files/binaries but not the "/usr/local/pgsql/data/"
> directory right? Since this is our production s
> ? Did you read the paragraph above?
> Install latest version, and restart postmaster.
Installing of latest version as-is will keep overwriting the existing installed
directories/files/binaries but not the "/usr/local/pgsql/data/" directory
right? Since this is our production server database,
On Mar 1, 2011, at 1:23 PM, Gnanakumar wrote:
>
> PostgreSQL Versioning policy says: "Upgrading to a minor release does not
> require a dump and restore; merely stop the database server, install the
> updated binaries, and restart the server."
Install the Binaries of Specific Minor Release and
On Tue, 2011-03-01 at 13:23 +0530, Gnanakumar wrote:
>
> PostgreSQL Versioning policy says: "Upgrading to a minor release does
> not require a dump and restore; merely stop the database server,
> install the updated binaries, and restart the server."
>
> Now, without a dump/restore, what are the
Nicolas Thauvin wrote:
> On 06/02/2011 17:30, Kevin Grittner wrote:
>> Guy Deleeuw wrote:
>>
>> My hardware : lapto hp envy I7 processor with a ssd disk
>>
>>> Memory :
>>> totalused free shared buffers cached
>>>8129356 2866516 5262840 0 387172 9
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1
On 06/02/2011 17:30, Kevin Grittner wrote:
> Guy Deleeuw wrote:
>
> My hardware : lapto hp envy I7 processor with a ssd disk
>
>> Memory :
>> totalused free shared buffers cached
>> Mem: 8129356 2866516
Hello Kevin,
>
> You should probably look at reqorking the v_stock view to use joins
> instead of subqueries -- they often optimize much better.
This is the problem effectively.
For creating this view I use a query tools that generate the code, not a
good idea.
I update and work now :-)
Best rega
Guy Deleeuw wrote:
My hardware : lapto hp envy I7 processor with a ssd disk
> Memory :
> totalused free shared buffers cached
> Mem: 8129356 2866516 5262840 0 387172 948132
> -/+ buffers/cache: 1531212 6598144
> Swap: 156252
Guy Deleeuw wrote:
> Why with the clause WHERE the time are 10x greater than ? How can I
> work around this ?
Nobody can answer that without a bit more detail. Could you show an
EXPLAIN ANALYZE of both queries and the definition of v_stock_status?
I that is a view, then we would need definiti
Le 15/10/2010 00:53, Shoaib Mir a écrit :
> On Fri, Oct 15, 2010 at 9:39 AM, Guillaume Lelarge
> wrote:
>
>> Le 14/10/2010 23:18, Rudolf van der Leeden a écrit :
>>> [...]
>>> quick question to the PG 9 community.
>>>
>>> I can query a hot standby server if recovery is still active using
>>> the a
On Fri, Oct 15, 2010 at 9:39 AM, Guillaume Lelarge
wrote:
> Le 14/10/2010 23:18, Rudolf van der Leeden a écrit :
> > [...]
> > quick question to the PG 9 community.
> >
> > I can query a hot standby server if recovery is still active using
> > the administration function pg_is_in_recovery(). Is th
Le 14/10/2010 23:18, Rudolf van der Leeden a écrit :
> [...]
> quick question to the PG 9 community.
>
> I can query a hot standby server if recovery is still active using
> the administration function pg_is_in_recovery(). Is there also a way
> to query for the 'primary server', i.e. which server
Little, Douglas wrote:
The only admin function that look close is
pg_terminate_backend(pid int) boolean Terminate a backend
I tried it and it couldn't be found. It is newist. We're running
PG8.2.13/GP3.3.7
Yes, that's an 8.4 function.
We tried pgpool for awhile, but I think I'll hav
Thanks
The only admin function that look close is
pg_terminate_backend(pid int) boolean Terminate a backend
I tried it and it couldn't be found. It is newist. We're running
PG8.2.13/GP3.3.7
>Oh, these connections aren't waiting for *database* events? Then
>you should either restructure
"Little, Douglas" wrote:
> Kevin Grittner [mailto:kevin.gritt...@wicourts.gov] wrote:
>> "Little, Douglas" wrote:
>>
>>> We have a number of long running java/jdbc applications that
>>> wait for events and then extract data from PG.
>>> During the time the apps are running, The app is maintai
Sent: Friday, October 01, 2010 9:01 AM
To: Little, Douglas; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] how to PG close session
"Little, Douglas" wrote:
> We have a number of long running java/jdbc applications that wait
> for events and then extract data from PG.
> During
"Little, Douglas" wrote:
> We have a number of long running java/jdbc applications that wait
> for events and then extract data from PG.
> During the time the apps are running, The app is maintaining
> active connections to PG.
> Is there a way that we can close/terminate the pg session so tha
Lou Picciano wrote:p { margin: 0; }
Both errors above make sense to me; COPY is running into either a cr
or a tab character in each case.
Even though they might seem very similar at first, text mode and CSV
mode work very differently here. To quote TFM at
http://www.postgresql.org/docs/curre
Craig James wrote:
> If you have a slow network, then run pg_dump on the machine where
> the database lives and use compression (--format=c) and restore
> using pg_restore. It will cut WAY down on the amount of data that
> has to move across the net.
If you don't mind dancing around a bit you
On 8/9/10 5:14 PM, Bruce Momjian wrote:
ENGEMANN, DAYSE wrote:
Hi Kevin,
Sorry to disturb you.. But I am really new in it...
Let me see if I understood...
pg_dump -h sourcemachine -U sourceuser source_dbname | psql target_dbname
Has anyone done any measurement of whether it is faster to do
Bruce Momjian wrote:
> ENGEMANN, DAYSE wrote:
>> pg_dump -h sourcemachine -U sourceuser source_dbname \
>> | psql target_dbname
>
> Has anyone done any measurement of whether it is faster to do the
> dump on the local machine with psql remote or from a remote
> machine (where psql would be l
ENGEMANN, DAYSE wrote:
> Hi Kevin,
> Sorry to disturb you.. But I am really new in it...
> Let me see if I understood...
>
> pg_dump -h sourcemachine -U sourceuser source_dbname | psql target_dbname
Has anyone done any measurement of whether it is faster to do the dump
on the local machine with
On Mon, Jul 19, 2010 at 10:49 AM, ENGEMANN, DAYSE wrote:
> How can I create it as the same that I have in the other server?
What you likely want here is the same database name, with the same
encoding and collation. And then the global stuff, like user
accounts.
psql -h olddbserver postgres
\l
"ENGEMANN, DAYSE" wrote:
> How can I create it as the same that I have in the other server?
Well, you could use CREATE DATABASE, and maybe a few REVOKE and/or
GRANT statements. Is there some particular concern you have about
this?
-Kevin
--
Sent via pgsql-admin mailing list (pgsql-admin@
How can I create it as the same that I have in the other server?
-Original Message-
From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov]
Sent: segunda-feira, 19 de julho de 2010 13:43
To: ENGEMANN, DAYSE; pgsql-admin@postgresql.org
Subject: RE: [ADMIN] How to move a database from
"ENGEMANN, DAYSE" wrote:
> pg_dump -h sourcemachine -U sourceuser source_dbname | psql
> target_dbname
>
> Is that?
Yes. You need to enter passwords unless they are specified in
.pgpass or you have some form of authorization which doesn't require
typing a password (for example, trust or iden
...@wicourts.gov]
Sent: segunda-feira, 19 de julho de 2010 13:07
To: ENGEMANN, DAYSE; pgsql-admin@postgresql.org
Subject: RE: [ADMIN] How to move a database from HP server to Linux Server that
had already one database.
"ENGEMANN, DAYSE" wrote:
> If I use the :
> Origim: pg_dum
"ENGEMANN, DAYSE" wrote:
> If I use the :
> Origim: pg_dump -Ft -b db_name > file.tar
> Target: pg_restore -d new_db file.tar
>
> The target server has a db, using PGDATA=/postgres, the same in
> the other server... There is any risk to lost any data?
Restoring to a new database should not p
org
[mailto:pgsql-admin-ow...@postgresql.org] On Behalf Of ENGEMANN, DAYSE
Sent: sexta-feira, 16 de julho de 2010 15:22
To: Kevin Grittner; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to move a database from HP server to Linux Server that
had already one database.
I am not sure if I can do
ira, 16 de julho de 2010 15:12
To: ENGEMANN, DAYSE; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to move a database from HP server to Linux Server that
had already one database.
"ENGEMANN, DAYSE" wrote:
> Kevin Grittner wrote:
>> pg_dump | psql
> And to restore it.
"ENGEMANN, DAYSE" wrote:
> Kevin Grittner wrote:
>> pg_dump | psql
> And to restore it.. Can I use pg_restore -d new_db_name ??
I usually pipe the output of pg_dump to psql, and thereby avoid
making a copy of the dump output entirely. If you want to dump in
custom format, yeah, you would
And to restore it.. Can I use pg_restore -d new_db_name ??
-Original Message-
From: Kevin Grittner [mailto:kevin.gritt...@wicourts.gov]
Sent: sexta-feira, 16 de julho de 2010 14:47
To: ENGEMANN, DAYSE; pgsql-admin@postgresql.org
Subject: Re: [ADMIN] How to move a database from HP server
1 - 100 of 700 matches
Mail list logo