Discussion:
data not getting inserted into table
(too old to reply)
akanksha kulkarni
2004-10-21 13:51:56 UTC
Permalink
Hi,

I am trying a simple insert command with select
statement (Insert into <table> (<column list>) select
<column list> from <table>).
The data to be inserted is around 1 GB.
The problem is that at the end of the insert
operation, data is NOT inserted.

I was monitoring target table file size and it was
getting increased during the operation. However at the
end of insert operation, the size has returned to old
size.
I changed some parameters in postgres configuration
file which are as follows:
checkpoint_segments=20
sort_mem = 16384
checkpoint_timeout=500
This I did because during earlier operations, I was
getting message "too many checkpoints. Consider
increasing checkpoints_segments"

So please can someone tell me why data is not getting
inserted in table?

Thanks,
Akanksha Kulkarni








__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend
Robert Treat
2004-10-21 18:38:55 UTC
Permalink
Post by akanksha kulkarni
Hi,
I am trying a simple insert command with select
statement (Insert into <table> (<column list>) select
<column list> from <table>).
The data to be inserted is around 1 GB.
The problem is that at the end of the insert
operation, data is NOT inserted.
I was monitoring target table file size and it was
getting increased during the operation. However at the
end of insert operation, the size has returned to old
size.
I changed some parameters in postgres configuration
checkpoint_segments=20
sort_mem = 16384
checkpoint_timeout=500
This I did because during earlier operations, I was
getting message "too many checkpoints. Consider
increasing checkpoints_segments"
So please can someone tell me why data is not getting
inserted in table?
Unlikely that any of those config settings would anything to do with it,
but without more info we're kind of flying blind. I'm going to guess
your either not COMMITting your transaction when your done, or your
getting an error your unaware of. Check your database logs (or turn them
on in postgresql.conf if needed) and post back to the list with an error
message and version information.

Robert Treat
--
Build A Brighter Lamp :: Linux Apache {middleware} PostgreSQL


---------------------------(end of broadcast)---------------------------
TIP 1: subscribe and unsubscribe commands go to ***@postgresql.org
Rajesh Kumar Mallah
2004-10-25 05:57:58 UTC
Permalink
Are all the insert operations inside a transaction?
ie do you notice a

begin ; or
begin work;

line in the initial part of the .sql file
then there shud be a commit; line in the
end of the sql file otherwise the transaction
will rollback.


in case you are inserting from a program you
must send commit instruction to the server.
in DBI/perl eg its $dbh -> commit()


regds
mallah.
Post by akanksha kulkarni
Hi,
I am trying a simple insert command with select
statement (Insert into <table> (<column list>) select
<column list> from <table>).
The data to be inserted is around 1 GB.
The problem is that at the end of the insert
operation, data is NOT inserted.
I was monitoring target table file size and it was
getting increased during the operation. However at the
end of insert operation, the size has returned to old
size.
I changed some parameters in postgres configuration
checkpoint_segments=20
sort_mem = 16384
checkpoint_timeout=500
This I did because during earlier operations, I was
getting message "too many checkpoints. Consider
increasing checkpoints_segments"
So please can someone tell me why data is not getting
inserted in table?
Thanks,
Akanksha Kulkarni
__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com
---------------------------(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/ |
+---------------------------------------------------+


---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html
Loading...