Is there a way to execute queries in plpython without increasing txid after each query?

2020-06-30 Thread Marcin Barczynski
I noticed that each query in plpython3 is executed in its own
subtransaction (
https://github.com/postgres/postgres/blob/257ee34e733aba0fc371177f1a7fd97f3cb98d74/src/pl/plpython/plpy_spi.c#L226)
which increases txid.
For example:


CREATE EXTENSION IF NOT EXISTS plpython3u;

DROP TABLE IF EXISTS demo;
CREATE TABLE demo(key BIGINT, val BIGINT);

CREATE OR REPLACE FUNCTION py_insert(k BIGINT)
RETURNS VOID AS $$
plans_by_key = SD.setdefault("plans_by_key", {})
if not plans_by_key.get(k):
plans_by_key[k] = plpy.prepare(f"INSERT INTO demo VALUES ({k},
{k})")
for _ in range(1):
plans_by_key[k].execute()
$$ LANGUAGE plpython3u;

SELECT txid_current();
SELECT * FROM py_insert(3);
SELECT txid_current();


CREATE EXTENSION
DROP TABLE
CREATE TABLE
CREATE FUNCTION
 txid_current
--
42541
(1 row)

 py_insert
---

(1 row)

 txid_current
--
52543
(1 row)


Similar loop in plpgsql doesn't create a subtransaction per each query
unless it's in BEGIN ... EXCEPTION ... END block.
High transaction rate is undesirable, because it means more often emergency
vacuums to prevent transaction id wraparound.
Is there a way to work around the problem?

-- 
Best regards,
Marcin Barczyński


Logical Replication Issue

2020-06-30 Thread Donzell White
Hi,
I have set up logical replication from an AWS RDS instance to a postgreSQL 
database on an EC2 instance. I am getting an “out of memory” error during the 
initial for one of the tables. I have include a snippet of the error at the 
bottom of this email. The snippet below repeats every four or eight hours, 
depending on the work_mem and maintenance_work_mem values. The other 500 plus 
tables load with no problem. 

Does anyone have experience with this issue. Suggestions on what to try would 
be greatly appreciated.

Both databases are running PostgreSQL 11.5.
The database is 5 TB in size and has over 500 tables.  The "out of memory" 
error every eight hours.  The table is 578GB in the RDS database and ate up 
over 9TB before it ran out of space on the EC2 instance.  The table has a bytea 
column but there is no data in that column. It also has a text column and the 
largest text length is 978MB.  

The odd thing is that this is not the largest table in the database. The 
largest table took 57 hours to initial load and it does have bytea data.  The 
largest table is about 4 times larger from a size perspective.  I have 
increases the work_mem and the maintenance_work_mem parameters and tried 
loading only the problem table.  This resulted in the “out of memory” error 
occurring every 4 hours instead of every eight hours. Note that the source 
database is static (no changes).

020-06-17 07:52:28.618 UTC [8410] LOCATION:  LogCheckpointStart, xlog.c:8508
2020-06-17 07:52:52.505 UTC [8410] LOG:  0: checkpoint complete: wrote 
69088 buffers (1.6%); 0 WAL file(s) added, 0 removed, 42 recycled; write=23.548 
s, sync=0.271 s, total=23.886 s; sync files=14, longest=0.165 s, average=0.019 
s; distance=688856 kB, estimate=701162 kB
2020-06-17 07:52:52.505 UTC [8410] LOCATION:  LogCheckpointEnd, xlog.c:8590
2020-06-17 07:53:15.960 UTC [8410] LOG:  0: checkpoint starting: xlog
2020-06-17 07:53:15.960 UTC [8410] LOCATION:  LogCheckpointStart, xlog.c:8508
2020-06-17 07:53:23.933 UTC [14390] ERROR:  XX000: could not receive data from 
WAL stream: ERROR:  out of memory
DETAIL:  Cannot enlarge string buffer containing 1073741802 bytes by 28 
more bytes.
2020-06-17 07:53:23.933 UTC [14390] CONTEXT:  COPY product, line 15568244
2020-06-17 07:53:23.933 UTC [14390] LOCATION:  libpqrcv_receive, 
libpqwalreceiver.c:772
2020-06-17 07:53:24.160 UTC [19873] LOG:  0: logical replication table 
synchronization worker for subscription "subscription_test_tables", table 
“product" has started
2020-06-17 07:53:24.160 UTC [19873] LOCATION:  ApplyWorkerMain, worker.c:1662



Re: Logical Replication Issue

2020-06-30 Thread Michael Lewis
Per the release notes, there are some enhancements to logical replication
that came after 11.5 like 11.8 particularly related to replication identity
full. Do you have a primary key or unique index that is being used for the
replication identity?


PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread FOUTE K . Jaurès
Hi everyone,

I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04 and
all is working fine until i faced this error below.

ERROR:  could not rename file
"pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
"pg_logical/snapshots/1A-7C00D890.snap": No space left on device

Is there someone who faced this problem?
Any idea how I can solve it ?

BTW: I don't have any problem with space.

Best Regard

-- 
Jaurès FOUTE


Re: Logical Replication Issue

2020-06-30 Thread Donzell White
My table has a primary key.  In addition, this is an initial load issue where 
the replication identity should not matter.


-Original Message-
From: Michael Lewis 
To: Donzell White 
Cc: pgsql-general 
Sent: Tue, Jun 30, 2020 1:05 pm
Subject: Re: Logical Replication Issue

Per the release notes, there are some enhancements to logical replication that 
came after 11.5 like 11.8 particularly related to replication identity full. Do 
you have a primary key or unique index that is being used for the replication 
identity?

Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread Adrian Klaver

On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:

Hi everyone,

I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04 
and all is working fine until i faced this error below.


From below it looks like you are using pg_logical which is a third 
party package. It is what the builtin logical replication is derived 
from, but it is not the same thing. So what version of pg_logical are 
you using?




ERROR:  could not rename file 
"pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to 
"pg_logical/snapshots/1A-7C00D890.snap": No space left on device


Is there someone who faced this problem?
Any idea how I can solve it ?

BTW: I don't have any problem with space.


The error says you do.
Where is pg_logical/snapshots/ mounted?
Are there specific restrictions on that mount?



Best Regard

--
Jaurès FOUTE



--
Adrian Klaver
adrian.kla...@aklaver.com




Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread Bruce Momjian
On Tue, Jun 30, 2020 at 01:16:58PM -0700, Adrian Klaver wrote:
> On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:
> > Hi everyone,
> > 
> > I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04
> > and all is working fine until i faced this error below.
> 
> From below it looks like you are using pg_logical which is a third party
> package. It is what the builtin logical replication is derived from, but it
> is not the same thing. So what version of pg_logical are you using?
> 
> > 
> > ERROR:  could not rename file
> > "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> > "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> > 
> > Is there someone who faced this problem?
> > Any idea how I can solve it ?
> > 
> > BTW: I don't have any problem with space.
> 
> The error says you do.
> Where is pg_logical/snapshots/ mounted?
> Are there specific restrictions on that mount?

I would also look at your kernel log.

-- 
  Bruce Momjian  https://momjian.us
  EnterpriseDB https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee





Re: Connecting Powerbuilder / EAserver to PostgreSQL server 11 via ODBC or JDBC

2020-06-30 Thread Rene de Gek
>
> So what operation is eroding out?
> Can you try to isolate it?
>
> Thank you.

Hi,

Thank you for posting the question Matthias! And for your replies.

We've now managed to collect the log files now from the application,
driver manager and driver.
And there are actually some things that might be more interesting that
the 999 'invalid handle' that the application gives us:

1. The driver manager also shows [SQLGetInfo.c][528]Error: SQL_INVALID_HANDLE
2. The driver log has 'Unrecognized key passed to PGAPI_GetInfo' for
fInfoType=1. I've found this infotype 1 as SQL_XOPEN_CLI_YEAR,
in https://pubs.opengroup.org/onlinepubs/9695949899/toc.pdf and I am
wondering if this can cause things to fail.
3. Also, the driver log shows a message: syntax error at or near
"prepareThreshold". I don't know there this prepareThreshold statement
comes from. Is it the application? Or can it be the driver manager?

I've added the logs top this message.

Thanks for your help.


APPLICATION LOG


DBHandle is 0
Setting up n_tr
DBMS: ODBC
DBParm: CacheName='pgsqlODBC12'
Autocommit: false
connect using i_tr...
dberror event triggered on n_tr
code: 999
sqlerrortext: An invalid handle was passed in a call to the database driver.
sqlsyntax:
SQLErrText: An invalid handle was passed in a call to the database driver.
sqldbcode: 999
sqlcode: -1

==
UNIX-ODBC LOG
==
[ODBC][8732][SQLAllocHandle.c][345]
Entry:
Handle Type = 2
Input Handle = 0xad6f9b98
[ODBC][8732][SQLAllocHandle.c][463]
Exit:[SQL_SUCCESS]
Output Handle = 0xac4d31c8
[ODBC][8732][SQLDriverConnect.c][678]
Entry:
Connection = 0xac4d31c8
Window Hdl = (nil)
Str In = [DSN=PG12;UID=thedb_dbo;PWD=**][length = 33 (SQL_NTS)]
Str Out = 0xac2bf7b8
Str Out Max = 2048
Str Out Ptr = 0xa8caaa7a
Completion = 0
UNICODE Using encoding ASCII 'ISO8859-1' and UNICODE 'UCS-2LE'

DIAG [01S02] ERROR: syntax error at or near "prepareThreshold"

[ODBC][8732][SQLDriverConnect.c][1487]
Exit:[SQL_SUCCESS_WITH_INFO]
Connection Out [DSN=PG12;DATABASE=thedb;SERVER=server.domain.org;PORT=5...]
DIAG [HYC00] Unrecognized key passed to PGAPI_GetInfo.

[ODBC][8732][SQLSetConnectAttr.c][318]
Entry:
Connection = 0xac4d31c8
Attribute = SQL_ATTR_AUTOCOMMIT
Value = (nil)
StrLen = 0
[ODBC][8732][SQLSetConnectAttr.c][671]
Exit:[SQL_SUCCESS]
[ODBC][8732][SQLEndTran.c][315]
Entry:
Connection = 0xac4d31c8
Completion Type = 0
[ODBC][8732][SQLGetInfo.c][214]
Entry:
Connection = 0xac4d31c8
Info Type = SQL_CURSOR_COMMIT_BEHAVIOR (23)
Info Value = 0xa8caaaee
Buffer Length = 8
StrLen = 0xa8caaaec
[ODBC][8732][SQLGetInfo.c][528]
Exit:[SQL_SUCCESS]
[ODBC][8732][SQLEndTran.c][488]
Exit:[SQL_SUCCESS]
[ODBC][8732][1593175526.538650][SQLGetInfo.c][528]Error: SQL_INVALID_HANDLE
[ODBC][8732][1593175526.538683][SQLGetInfo.c][528]Error: SQL_INVALID_HANDLE


===
DRIVER LOG
===

[ab4ffb40]   mylog.c[logs_on_off]274: mylog_on=1 qlog_on=0
[ab4ffb40]connection[CC_connect]1069: entering...sslmode=disable
[ab4ffb40]connection[LIBPQ_CC_connect]1041: entering...
[ab4ffb40]connection[CC_initial_log]989: [QLOG]Driver
Version='12.00.,Oct 29 2019'
[ab4ffb40]connection[CC_initial_log]1024: DSN = 'PG12', server =
'server.domain.org', port = '5601', database = 'thedb', username =
'thedb_dbo', password='x'
[ab4ffb40]connection[LIBPQ_connect]2706: connecting to the database
using server.domain.org as the server and pqopt={}
[ab4ffb40]connection[LIBPQ_connect]2818: [QLOG]PQconnectdbParams:
host='server.domain.org' port='5601' dbname='thedb' user='thedb_dbo'
sslmode='disable' password='thepassword'
[ab4ffb40]connection[LIBPQ_connect]2857: libpq connection to the
database established.
[ab4ffb40]connection[LIBPQ_connect]2864: protocol=3
[ab4ffb40]connection[LIBPQ_connect]2871: Server version=12.0.2
[ab4ffb40]connection[LIBPQ_connect]2895: leaving 1
[ab4ffb40]connection[CC_send_query_append]1769: conn=0xa5c69680,
query='SET DateStyle = 'ISO';SET extra_float_digits = 2;show
transaction_isolation'
[ab4ffb40]connection[CC_send_query_append]1849: query_len=75
[ab4ffb40]connection[CC_send_query_append]1892: [QLOG]PQsendQuery:
0xa5c4d1a8 'SET DateStyle = 'ISO';SET extra_float_digits = 2;show
transaction_isolation'
[ab4ffb40] qresult.c[QR_Constructor]173: entering
[ab4ffb40] qresult.c[QR_Constructor]242: leaving
[ab4ffb40]connection[CC_send_query_append]1934: [QLOG] ok: - 'C' - SET
[ab4ffb40]connection[CC_send_query_append]1950:  setting cmdbuffer = 'SET'
[ab4ffb40]connection[CC_send_query_append]2034:  returning res = 0xa5c4cec8
[ab4ffb40]connection[CC_send_query_append]1934: [QLOG] ok: - 'C' - SET
[ab4ffb40] qresult.c[QR_Constructor]173: entering
[ab4ffb40] qresult.c[QR_Constructor]242: leaving
[ab4ffb40]connection[CC_send_query_append]1950:  setting cmdbuffer = 'SET'
[ab4ffb40]connection[CC_send_query_append]2034:  returning res = 0xa5c4cf90
[ab4ffb40] qresult.c[QR_Constructor]173: entering
[ab4ffb40] qresult.c[QR_Constructor]242: leaving
[ab4ffb40]connection[CC_send_query_a

Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread FOUTE K . Jaurès
Le mar. 30 juin 2020 à 21:23, Bruce Momjian  a écrit :

> On Tue, Jun 30, 2020 at 01:16:58PM -0700, Adrian Klaver wrote:
> > On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:
> > > Hi everyone,
> > >
> > > I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04
> > > and all is working fine until i faced this error below.
> >
> > From below it looks like you are using pg_logical which is a third party
> > package. It is what the builtin logical replication is derived from, but
> it
> > is not the same thing. So what version of pg_logical are you using?
> >
> > >
> > > ERROR:  could not rename file
> > > "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> > > "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> > >
> > > Is there someone who faced this problem?
> > > Any idea how I can solve it ?
> > >
> > > BTW: I don't have any problem with space.
> >
> > The error says you do.
> > Where is pg_logical/snapshots/ mounted?
> > Are there specific restrictions on that mount?
>
> I would also look at your kernel log.
>
[image: image.png]


>
> --
>   Bruce Momjian  https://momjian.us
>   EnterpriseDB https://enterprisedb.com
>
>   The usefulness of a cup is in its emptiness, Bruce Lee
>
>

-- 
Jaurès FOUTE
Technology Consultant
ISNOV SARL - Business Technology Consulting
Tel: +237 79395671 / +237 96248793
Email: *jauresfo...@gmail.com *,
  jauresmelki...@yahoo.fr
Compte Skype: jauresmelkiore


Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread Bruce Momjian
On Tue, Jun 30, 2020 at 10:03:52PM +0100, FOUTE K. Jaurès wrote:
> Le mar. 30 juin 2020 à 21:23, Bruce Momjian  a écrit :
> 
> On Tue, Jun 30, 2020 at 01:16:58PM -0700, Adrian Klaver wrote:
> > On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:
> > > Hi everyone,
> > >
> > > I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04
> > > and all is working fine until i faced this error below.
> >
> > From below it looks like you are using pg_logical which is a third party
> > package. It is what the builtin logical replication is derived from, but
> it
> > is not the same thing. So what version of pg_logical are you using?
> >
> > >
> > > ERROR:  could not rename file
> > > "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> > > "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> > >
> > > Is there someone who faced this problem?
> > > Any idea how I can solve it ?
> > >
> > > BTW: I don't have any problem with space.
> >
> > The error says you do.
> > Where is pg_logical/snapshots/ mounted?
> > Are there specific restrictions on that mount?
> 
> I would also look at your kernel log.
> 
> image.png

OK, are you using SAN/iSCSI or NAS, which uses Ethernet to communicate
with the storage?

-- 
  Bruce Momjian  https://momjian.us
  EnterpriseDB https://enterprisedb.com

  The usefulness of a cup is in its emptiness, Bruce Lee





Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread Adrian Klaver

On 6/30/20 1:47 PM, FOUTE K. Jaurès wrote:



Le mar. 30 juin 2020 à 21:23, Bruce Momjian > a écrit :


On Tue, Jun 30, 2020 at 01:16:58PM -0700, Adrian Klaver wrote:
 > On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:
 > > Hi everyone,
 > >
 > > I am use a native logical replication in PostgreSQL 12 on
Ubuntu 16.04
 > > and all is working fine until i faced this error below.
 >
 > From below it looks like you are using pg_logical which is a
third party
 > package. It is what the builtin logical replication is derived
from, but it
 > is not the same thing. So what version of pg_logical are you using?

I only install Postgresql 12. I dont use pg_logical


My mistake, I remembered the location for the logical files wrong.




/var/lib/postgresql/12/main/pg_logical (default location)


From /var/lib/postgresql/12/main/pg_logical what does du -sh  show?
Please show results as text, you can copy from terminal screen.




 > Are there specific restrictions on that mount?

image.png


I would also look at your kernel log.

-- 
   Bruce Momjian  mailto:br...@momjian.us>>

https://momjian.us
   EnterpriseDB https://enterprisedb.com

   The usefulness of a cup is in its emptiness, Bruce Lee



--
Jaurès FOUTE



--
Adrian Klaver
adrian.kla...@aklaver.com




restart_lsn is not advancing

2020-06-30 Thread Radoslav Nedyalkov
Hello All,
we are in a situation where restart_lsn for logical replication slots is
not advancing.
We have two slots. Both  are active, confirmed_flush_lsn also is updated.
Client side all looks okay. remote_lsn for subscritions is advancing.

The effect of restart_lsn being 'stopped' is the disk is filling up.

Any idea what could be the cause?
We will try to re-establish replication by dropping current slots ,
although we have to do it very carefully. We should avoid initial loading
(these are 4T of data)

Thanks and regards,
Rado


Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread raf
FOUTE K. Jaurès wrote:

> Hi everyone,
> 
> I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04 and
> all is working fine until i faced this error below.
> 
> ERROR:  could not rename file
> "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> 
> Is there someone who faced this problem?
> Any idea how I can solve it ?
> 
> BTW: I don't have any problem with space.
> 
> Best Regard
> 
> -- 
> Jaurès FOUTE

If you really haven't run out of space,
you might have run out of inodes.
The -i option of df should show you.
100,000 empty files could cause that.
I wouldn't think that renaming would
require a new inode, but I also wouldn't
think that renaming would require any
more space on a file system.

cheers,
raf





Re: restart_lsn is not advancing

2020-06-30 Thread Radoslav Nedyalkov
one more detail:  pg_replication_slots.catalog_xmin shows the biggest age
in the system.
How could  transaction on catalogues may affect logical slot. Any clue
here ?
Thank you,
Rado

On Wed, Jul 1, 2020 at 2:09 AM Radoslav Nedyalkov 
wrote:

> Hello All,
> we are in a situation where restart_lsn for logical replication slots is
> not advancing.
> We have two slots. Both  are active, confirmed_flush_lsn also is updated.
> Client side all looks okay. remote_lsn for subscritions is advancing.
>
> The effect of restart_lsn being 'stopped' is the disk is filling up.
>
> Any idea what could be the cause?
> We will try to re-establish replication by dropping current slots ,
> although we have to do it very carefully. We should avoid initial loading
> (these are 4T of data)
>
> Thanks and regards,
> Rado
>


Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread FOUTE K . Jaurès
Le mar. 30 juin 2020 à 22:36, Adrian Klaver  a
écrit :

> On 6/30/20 1:47 PM, FOUTE K. Jaurès wrote:
> >
> >
> > Le mar. 30 juin 2020 à 21:23, Bruce Momjian  > > a écrit :
> >
> > On Tue, Jun 30, 2020 at 01:16:58PM -0700, Adrian Klaver wrote:
> >  > On 6/30/20 11:03 AM, FOUTE K. Jaurès wrote:
> >  > > Hi everyone,
> >  > >
> >  > > I am use a native logical replication in PostgreSQL 12 on
> > Ubuntu 16.04
> >  > > and all is working fine until i faced this error below.
> >  >
> >  > From below it looks like you are using pg_logical which is a
> > third party
> >  > package. It is what the builtin logical replication is derived
> > from, but it
> >  > is not the same thing. So what version of pg_logical are you
> using?
> >
> > I only install Postgresql 12. I dont use pg_logical
>
> My mistake, I remembered the location for the logical files wrong.
>
>
> >
> > /var/lib/postgresql/12/main/pg_logical (default location)
>
>  From /var/lib/postgresql/12/main/pg_logical what does du -sh  show?
> Please show results as text, you can copy from terminal screen.
>
root@hybride:/var/lib/postgresql/12/main/pg_logical# du -sh
16K .


>
>
> >
> >  > Are there specific restrictions on that mount?
> >
> > image.png
> >
> >
> > I would also look at your kernel log.
> >
> > --
> >Bruce Momjian  mailto:br...@momjian.us>>
> > https://momjian.us
> >EnterpriseDB https://enterprisedb.com
> >
> >The usefulness of a cup is in its emptiness, Bruce Lee
> >
> >
> >
> > --
> > Jaurès FOUTE
>
>
> --
> Adrian Klaver
> adrian.kla...@aklaver.com
>


-- 
Jaurès FOUTE
Technology Consultant
ISNOV SARL - Business Technology Consulting
Tel: +237 79395671 / +237 96248793
Email: *jauresfo...@gmail.com *,
  jauresmelki...@yahoo.fr
Compte Skype: jauresmelkiore


Re: PostgreSQL 12 - ERROR: could not rename file "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to "pg_logical/snapshots/1A-7C00D890.snap": No space left on device

2020-06-30 Thread FOUTE K . Jaurès
Le mer. 1 juil. 2020 à 00:11, raf  a écrit :

> FOUTE K. Jaurčs wrote:
>
> > Hi everyone,
> >
> > I am use a native logical replication in PostgreSQL 12 on Ubuntu 16.04
> and
> > all is working fine until i faced this error below.
> >
> > ERROR:  could not rename file
> > "pg_logical/snapshots/1A-7C00D890.snap.13594.tmp" to
> > "pg_logical/snapshots/1A-7C00D890.snap": No space left on device
> >
> > Is there someone who faced this problem?
> > Any idea how I can solve it ?
> >
> > BTW: I don't have any problem with space.
> >
> > Best Regard
> >
> > --
> > Jaurčs FOUTE
>
> If you really haven't run out of space,
> you might have run out of inodes.
> The -i option of df should show you.
> 100,000 empty files could cause that.
> I wouldn't think that renaming would
> require a new inode, but I also wouldn't
> think that renaming would require any
> more space on a file system.


The result of df -i

Sys. de fichiers   Inœuds IUtil.   ILibre IUti% Monté sur
udev  3065149433  30647161% /dev
tmpfs 3072780665  30721151% /run
/dev/sdb259973632 356029 596176031% /
tmpfs 3072780  7  30727731% /dev/shm
tmpfs 3072780 10  30727701% /run/lock
tmpfs 3072780 17  30727631% /sys/fs/cgroup
/dev/sdb1   0  00 - /boot/efi
tmpfs 3072780 19  30727611% /run/user/108
tmpfs 3072780  5  30727751% /run/user/1001
tmpfs 3072780  5  30727751% /run/user/1000


>
> cheers,
> raf
>
>
>
>

-- 
Jaurès FOUTE
Technology Consultant
ISNOV SARL - Business Technology Consulting
Tel: +237 79395671 / +237 96248793
Email: *jauresfo...@gmail.com *,
  jauresmelki...@yahoo.fr
Compte Skype: jauresmelkiore


BDR node status stays as C, not ready

2020-06-30 Thread Emrah Tema
I am trying to make multimaster replication but when I use bdr_init_copy
the database is copied from remote node but the status of the node stays as
C, not R so Ready and for this reason the replication is not made. What
should I do?