Search Postgresql Archives

Re: Survey on backing up unlogged tables: help us with PostgreSQL development!

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

 



I would like to choose the table behaviour on restart (restore/forget it)

	
Currently, I'm looking for a way to split large transaction on different threads (with dblink).
AN issue is to efficiently share temp data across the threads. unlogged tables would be here fine, something like global temp tables with shared data.

here an example to illustrate the current situation:


select cic_connect_me('c');
select dblink_exec   ('c', 'drop table if exists my_share');
select dblink_exec   ('c', 'create table my_share( a int)');
select dblink_disconnect ('c');

SELECT cic_multithread(ARRAY[
  'insert into my_share select * from generate_series(1,10000)',
   'insert into my_share select * from generate_series(1,10000)',
   'insert into my_share select * from generate_series(1,10000)',
   'insert into my_share select * from generate_series(1,10000)',
   'insert into my_share select * from generate_series(1,10000)',
  'insert into my_share select * from generate_series(1,10000)']
,max_threads=4);

create temp table my_result as select * from my_share;
drop table my_share;

select * from my_result;

For pg dump, I guess that having an optional flag is fine, but:
unlogged tables could also be useful to store very large 'raw' data to be processed,
whereas the client would only query the processed results.
In such a case, restoring the logged table has a higher priority.
The best solution in my opinion, would allow to dump/restore these 2 table types in separate processes (or threads..).

(and by the way: would it be possible to choose the compress tool as an option for pg_dump)

pgdump -F.. -Compress pigz -f out.dmp -f_unlogged out_unlogged.dmp.

regards, 

Marc Mamin

-- 
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