Search Postgresql Archives

Re: URGENT: temporary table not recognized?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Fri, Jan 6, 2012 at 4:24 PM, Steve Crawford
<scrawford@xxxxxxxxxxxxxxxxxxxx> wrote:
> On 01/06/2012 01:11 PM, Phoenix Kiula wrote:
>>
>> On Fri, Jan 6, 2012 at 11:46 AM, Tom Lane<tgl@xxxxxxxxxxxxx>  wrote:
>>>
>>> Phoenix Kiula<phoenix.kiula@xxxxxxxxx>  writes:
>>>>
>>>> Hi. I'm using Postgresql 9.0.5, and the connection is made via
>>>> pgbouncer.
>>>
>>> Perhaps pgbouncer is redirecting the second command to a different
>>> session?
>>>
>>
>>
>> Thanks Tom. I'm in the exact same session in my terminal, and the
>> commands are entered within 2 seconds of each other. With copy/paste,
>> maybe split microseconds of each other.
>>
>> How can I make sure pgbouncer takes it all in the same session? I also
>> tried the two commands within a transaction.
>>
>
> Sounds like you are using statement pooling - every statement can be
> assigned to a different server connection. You may need transaction pooling
> or session pooling:
>
> http://pgbouncer.projects.postgresql.org/doc/usage.html



Thanks Steve. YES! I changed it to transaction pooling and now it works.

Another problem through.

I need to COPY a huge text file into a table, with about 350 million
lines in the file (i.e., 350 million rows in the table).

While copying, some lines do not have data. They are empty values.

How can I specify in COPY command that if data is not found, it should
be ignored? In my temp table definition, I set this column as "NULL"
anyway, so it should be ok if this column was left empty!

What can I do in my COPY command to circumvent this?

Thanks.

-- 
Sent via pgsql-general mailing list (pgsql-general@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-general



[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [Postgresql Jobs]     [Postgresql Admin]     [Postgresql Performance]     [Linux Clusters]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Postgresql & PHP]     [Yosemite]
  Powered by Linux