Skip to content

Commit

Permalink
[BUGFIX] Remettre les options d'execa pour la réplication incrémentale
Browse files Browse the repository at this point in the history
  • Loading branch information
pix-service-auto-merge authored Dec 10, 2024
2 parents 79c8fb2 + e65dad9 commit 54b6801
Showing 1 changed file with 8 additions and 2 deletions.
10 changes: 8 additions & 2 deletions src/steps/incremental.js
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,14 @@ async function run(configuration) {
`\\copy ${escapeSQLIdentifier(table.name)} from stdin`,
];

const { stdout: copyStdout } = await execa `psql ${copyToStdOutArgs}`
.pipe `psql ${copyFromStdInArgs}`;
const subprocess = execa({
all: true, // join stdout and stderr
}) `psql ${copyFromStdInArgs}`;
const { stdout: copyStdout } = await execa({
stdin: 'ignore', stdout: 'pipe', stderr: 'inherit',
buffer: false, // disable execa's buffering otherwise it interferes with the transfer
}) `psql ${copyToStdOutArgs}`
.pipe(subprocess);

logger.info(`${table.name} table copy returned: ` + copyStdout);

Expand Down

0 comments on commit 54b6801

Please sign in to comment.