Re: after restore the size of the database is increased

2019-07-15 Thread Luca Ferrari
On Mon, Jul 15, 2019 at 7:21 PM Peter Geoghegan wrote: > Sometimes B-Tree indexes can be *larger* after a REINDEX (or after > they're recreated with a CREATE INDEX). It's not that common, but it > does happen. There isn't actually a very large size difference here, > so it seems worth comparing in

Re: after restore the size of the database is increased

2019-07-15 Thread Luca Ferrari
On Mon, Jul 15, 2019 at 7:07 PM Adrian Klaver wrote: > What does \l+ show? The same as pg_size_pretty: foo=# \l+ List of databases Name| Owner | Encoding | Collate | Ctype | Access privileges | Size | Tablespace |

Re: Tablespace column value null on select * from pg_tables

2019-07-15 Thread Adrian Klaver
On 7/15/19 12:53 PM, Alex Williams wrote: Hi Adrian, "Not if you did: CREATE DATABASE name ... [ TABLESPACE [=] tablespace_name ] ALTER DATABASE name SET TABLESPACE new_tablespace This makes the tablespace the default for the database and the default shows up as null in pg_tables: https://www

Re: Tablespace column value null on select * from pg_tables

2019-07-15 Thread Thomas Kellerer
Alex Williams schrieb am 15.07.2019 um 20:35: But in my case, I have a database that's in a user-defined tablespace (data2) and all the tables/indexes there are also in data2 and I want to do a select into a table the results of all the tables / tablespaces they are in that database...when doing

Re: Tablespace column value null on select * from pg_tables

2019-07-15 Thread Alex Williams
Hi Adrian, "Not if you did: CREATE DATABASE name ... [ TABLESPACE [=] tablespace_name ] ALTER DATABASE name SET TABLESPACE new_tablespace This makes the tablespace the default for the database and the default shows up as null in pg_tables: https://www.postgresql.org/docs/9.5/view-pg-tables.html

Re: Tablespace column value null on select * from pg_tables

2019-07-15 Thread Adrian Klaver
On 7/15/19 11:35 AM, Alex Williams wrote: Hi, Server Version 9.5 I found this old thread on something similar to the results I'm getting: https://www.postgresql.org/message-id/1308615192339-4508750.post%40n5.nabble.com But in my case, I have a database that's in a user-defined tablespace (d

Tablespace column value null on select * from pg_tables

2019-07-15 Thread Alex Williams
Hi, Server Version 9.5 I found this old thread on something similar to the results I'm getting: https://www.postgresql.org/message-id/1308615192339-4508750.post%40n5.nabble.com But in my case, I have a database that's in a user-defined tablespace (data2) and all the tables/indexes there are al

RE: Issue: Creating Symlink for data directory of postgresql in CentOS7

2019-07-15 Thread Chatterjee, Shibayan
I found a work around for the problem: After changing access permissions and ownership of the symlink data directory, I logged into postgres using 'postgres' login as: >>> sudo -i -u postgres Then force started postgres from there as mentioned below. The execution doesn't return back to prompt,

Re: after restore the size of the database is increased

2019-07-15 Thread Peter Geoghegan
On Mon, Jul 15, 2019 at 6:22 AM Luca Ferrari wrote: > What am I missing here? Sometimes B-Tree indexes can be *larger* after a REINDEX (or after they're recreated with a CREATE INDEX). It's not that common, but it does happen. There isn't actually a very large size difference here, so it seems wo

Re: after restore the size of the database is increased

2019-07-15 Thread Adrian Klaver
On 7/15/19 6:21 AM, Luca Ferrari wrote: Hi all, this should be trivial, but if I dump and restore the very same database the restored one is bigger than the original one. I did vacuumed the database foo, then dumped and restored into bar, and the latter, even when vacuumed, remains bigger then th

migration of a logical replication configuration

2019-07-15 Thread ROS Didier
Hi I would like to know the impact of migrating from 10 to 11 the source PostgreSQL cluster of a logical replication configuration? should we also migrate the target PostgreSQL cluster? Or is it possible to setup logical replication from a PostgreSQL 11 instance to a

Re: help understanding pgbench results

2019-07-15 Thread Fabio Pardi
On 15/07/2019 15:14, Luca Ferrari wrote: >> Assuming that the 'background activity' writes data, a value of >> (checkpoint_completion_target) 0.9 means that when your test starts, the >> system might be still busy in writing data from the previous checkpoint >> (which started before your pgb

after restore the size of the database is increased

2019-07-15 Thread Luca Ferrari
Hi all, this should be trivial, but if I dump and restore the very same database the restored one is bigger than the original one. I did vacuumed the database foo, then dumped and restored into bar, and the latter, even when vacuumed, remains bigger then the original one. No other activity was runn

Re: help understanding pgbench results

2019-07-15 Thread Luca Ferrari
On Mon, Jul 15, 2019 at 1:35 PM Fabio Pardi wrote: > unlogged tables are not written to WAL, therefore checkpoints do not fit into > the picture (unless something else is writing data..). That's my thought, and I was not expecting any big change in tps due to checkpoint_completion_target on unlo

Re: CRecordset::Open postgresql procedure call don't work

2019-07-15 Thread Pavel Stehule
Hi Dne po 15. 7. 2019 13:40 uživatel jeanclaude marzin < jeanclaude.mar...@sfr.fr> napsal: > ‌Hi > I migrate from MSSQL to postgresql 11. I translate MSSQL stored procedure > to Postgresql one : > > CREATE PROCEDURE procacp () > LANGUAGE SQL > AS $$ > SELECT tabjdbexploit.jdbeid, tabjdbexploit.jd

Re: CRecordset::Open postgresql procedure call don't work

2019-07-15 Thread John McKown
On Mon, Jul 15, 2019 at 6:40 AM jeanclaude marzin wrote: > ‌Hi > I migrate from MSSQL to postgresql 11. I translate MSSQL stored procedure > to Postgresql one : > > CREATE PROCEDURE procacp () > LANGUAGE SQL > AS $$ > SELECT tabjdbexploit.jdbeid, tabjdbexploit.jdbeproc, > tabjdbexploit.jdbeda

CRecordset::Open postgresql procedure call don't work

2019-07-15 Thread jeanclaude marzin
‌Hi I migrate from MSSQL to postgresql 11. I translate MSSQL stored procedure to Postgresql one : CREATE PROCEDURE procacp () LANGUAGE SQL AS $$ SELECT tabjdbexploit.jdbeid, tabjdbexploit.jdbeproc,     tabjdbexploit.jdbedate, tabjdbexploit.jdbetypemsg,     tabjdbexploit.jdbeurg, tabjdbexploit.jdb

Re: help understanding pgbench results

2019-07-15 Thread Fabio Pardi
Hi Luca (I tried to reproduce your tests, but I got similar results over different checkpoint_completion_target) The rest is in line here below: On 12/07/2019 12:04, Luca Ferrari wrote: > > shared_buffers = 1 GB > checkpoint_timeout = 5 min > > I've created a pgbench database as follows (ar

Re: How to run a task continuously in the background

2019-07-15 Thread Luca Ferrari
On Fri, Jul 12, 2019 at 7:06 AM Dirk Mika wrote: > > > > A cron job will only run once a minute, not wake up every second. > > > > I would like to avoid external programs if possible. In the current Oracle > environment, there are potentially multiple schemas on a server in which > processing ca